mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
siddec checks that work not extremely robust, but functional
Original commit message from CVS: siddec checks that work not extremely robust, but functional
This commit is contained in:
parent
88b8dc6b63
commit
7c8600b831
3 changed files with 32 additions and 133 deletions
13
configure.ac
13
configure.ac
|
@ -75,11 +75,9 @@ GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plugins],,
|
||||||
[HAVE_EXPERIMENTAL=yes],disabled,
|
[HAVE_EXPERIMENTAL=yes],disabled,
|
||||||
[
|
[
|
||||||
AC_MSG_WARN(building experimental plugins)
|
AC_MSG_WARN(building experimental plugins)
|
||||||
USE_LIBMIKMOD="yes"
|
|
||||||
USE_SMOOTHWAVE="yes"
|
USE_SMOOTHWAVE="yes"
|
||||||
],[
|
],[
|
||||||
AC_MSG_NOTICE(not building experimental plugins)
|
AC_MSG_NOTICE(not building experimental plugins)
|
||||||
USE_LIBMIKMOD="no"
|
|
||||||
USE_SMOOTHWAVE="no"
|
USE_SMOOTHWAVE="no"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -567,13 +565,9 @@ GST_CHECK_FEATURE(SHOUT, [shout plugin], icecastsend, [
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl *** sidplay ***
|
dnl *** sidplay ***
|
||||||
dnl FIXME : make this work
|
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
|
||||||
GST_CHECK_FEATURE(SIDPLAY, [sidplay plugin], sidplay, [
|
GST_CHECK_FEATURE(SIDPLAY, [sidplay plugin], sidplay, [
|
||||||
AC_LANG_PUSH(C++)
|
GST_PATH_SIDPLAY()
|
||||||
AC_CHECK_HEADER(sidplay/sidtune.h, SIDPLAY_LIBS="-lsidplay", )
|
|
||||||
AC_SUBST(SIDPLAY_LIBS)
|
|
||||||
AC_LANG_POP()
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl *** smoothwave ***
|
dnl *** smoothwave ***
|
||||||
|
@ -656,7 +650,7 @@ AC_ARG_ENABLE(debug,
|
||||||
no) USE_DEBUG=no ;;
|
no) USE_DEBUG=no ;;
|
||||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||||
esac],
|
esac],
|
||||||
[USE_DEBUG=no]) dnl Default value
|
[USE_DEBUG=yes]) dnl Default value
|
||||||
|
|
||||||
AC_ARG_ENABLE(DEBUG,
|
AC_ARG_ENABLE(DEBUG,
|
||||||
[ --enable-DEBUG compiles in a large number of debugging messages],
|
[ --enable-DEBUG compiles in a large number of debugging messages],
|
||||||
|
@ -665,7 +659,7 @@ AC_ARG_ENABLE(DEBUG,
|
||||||
no) ENABLE_DEBUG=no ;;
|
no) ENABLE_DEBUG=no ;;
|
||||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
|
||||||
esac],
|
esac],
|
||||||
[ENABLE_DEBUG=no]) dnl Default value
|
[ENABLE_DEBUG=yes]) dnl Default value
|
||||||
if test x$ENABLE_DEBUG = xyes; then
|
if test x$ENABLE_DEBUG = xyes; then
|
||||||
AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
|
AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
|
||||||
fi
|
fi
|
||||||
|
@ -888,7 +882,6 @@ AM_CONDITIONAL(HAVE_LIBDV, test "x$HAVE_LIBDV" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_GNOME_VFS, test "x$HAVE_GNOME_VFS" = "xyes")
|
AM_CONDITIONAL(HAVE_GNOME_VFS, test "x$HAVE_GNOME_VFS" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_LIBGSM, test "x$HAVE_LIBGSM" = "xyes")
|
AM_CONDITIONAL(HAVE_LIBGSM, test "x$HAVE_LIBGSM" = "xyes")
|
||||||
AM_CONDITIONAL(PLUGINS_USE_BUILDDIR, test "x$PLUGINS_USE_BUILDDIR" = "xyes")
|
AM_CONDITIONAL(PLUGINS_USE_BUILDDIR, test "x$PLUGINS_USE_BUILDDIR" = "xyes")
|
||||||
AM_CONDITIONAL(HAVE_SIDPLAY, test "x$have_sidplay" = "xyes")
|
|
||||||
|
|
||||||
|
|
||||||
dnl ############################
|
dnl ############################
|
||||||
|
|
|
@ -156,11 +156,11 @@ else
|
||||||
SDL_DIR=
|
SDL_DIR=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
## if USE_SIDPLAY
|
if USE_SIDPLAY
|
||||||
## SIDPLAY_DIR=sidplay
|
SIDPLAY_DIR=sidplay
|
||||||
## else
|
else
|
||||||
SIDPLAY_DIR=
|
SIDDPLAY_DIR=
|
||||||
## endif
|
endif
|
||||||
|
|
||||||
if USE_SHOUT
|
if USE_SHOUT
|
||||||
SHOUT_DIR=shout
|
SHOUT_DIR=shout
|
||||||
|
|
142
m4/gst-sid.m4
142
m4/gst-sid.m4
|
@ -1,133 +1,39 @@
|
||||||
dnl FIXME: the longest macro for one of the small plugins ?
|
dnl check for sidplay
|
||||||
dnl there must be a way to make this simpler !
|
|
||||||
dnl sidplay stuff (taken from xmms)
|
|
||||||
AC_DEFUN(AC_FIND_FILE,
|
|
||||||
[
|
|
||||||
$3=NO
|
|
||||||
for i in $2; do
|
|
||||||
for j in $1; do
|
|
||||||
if test -r "$i/$j"; then
|
|
||||||
$3=$i
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN(AC_PATH_LIBSIDPLAY,
|
AC_DEFUN(GST_PATH_SIDPLAY,
|
||||||
[
|
[
|
||||||
AC_MSG_CHECKING([for SIDPLAY includes and library])
|
AC_MSG_CHECKING([for libsidplay])
|
||||||
ac_sidplay_cflags=NO
|
|
||||||
ac_sidplay_library=NO
|
|
||||||
sidplay_cflags=""
|
|
||||||
sidplay_library=""
|
|
||||||
AC_ARG_WITH(sidplay-includes,
|
|
||||||
[ --with-sidplay-includes=DIR
|
|
||||||
where the sidplay includes are located],
|
|
||||||
[ac_sidplay_cflags="$withval"
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_ARG_WITH(sidplay-library,
|
AC_LANG_PUSH(C++)
|
||||||
[ --with-sidplay-library=DIR
|
|
||||||
where the sidplay library is installed],
|
|
||||||
[ac_sidplay_library="$withval"
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then
|
|
||||||
|
|
||||||
#search common locations
|
AC_CHECK_HEADER(sidplay/player.h, HAVE_SIDPLAY="yes", HAVE_SIDPLAY="no")
|
||||||
|
|
||||||
AC_CACHE_VAL(ac_cv_have_sidplay,
|
|
||||||
[
|
|
||||||
sidplay_incdirs="$ac_sidplay_cflags /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include"
|
|
||||||
AC_FIND_FILE(sidplay/sidtune.h,$sidplay_incdirs,sidplay_foundincdir)
|
|
||||||
sidplay_libdirs="$ac_sidplay_library /usr/lib /usr/local/lib /usr/lib/sidplay /usr/local/lib/sidplay"
|
|
||||||
AC_FIND_FILE(libsidplay.so libsidplay.so.1 libsidplay.so.1.36 libsidplay.so.1.37,$sidplay_libdirs,sidplay_foundlibdir)
|
|
||||||
ac_sidplay_library=$sidplay_foundlibdir
|
|
||||||
|
|
||||||
if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then
|
if test $HAVE_SIDPLAY = "yes"; then
|
||||||
ac_cv_have_sidplay="have_sidplay=no"
|
SIDPLAY_LIBS="-lsidplay"
|
||||||
ac_sidplay_notfound=""
|
|
||||||
if test "$ac_sidplay_cflags" = NO; then
|
|
||||||
if test "$ac_sidplay_library" = NO; then
|
|
||||||
ac_sidplay_notfound="(headers and library)";
|
|
||||||
else
|
|
||||||
ac_sidplay_notfound="(headers)";
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
ac_sidplay_notfound="(library)";
|
|
||||||
fi
|
|
||||||
eval "$ac_cv_have_sidplay"
|
|
||||||
AC_MSG_RESULT([$have_sidplay])
|
|
||||||
else
|
|
||||||
have_sidplay=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
]) dnl AC_CACHE_VAL(ac_cv_have_sidplay,
|
|
||||||
else
|
|
||||||
have_sidplay=yes
|
|
||||||
fi dnl if (have_to_search)
|
|
||||||
|
|
||||||
eval "$ac_cv_have_sidplay"
|
|
||||||
if test "$have_sidplay" != yes; then
|
|
||||||
AC_MSG_RESULT([$have_sidplay]);
|
|
||||||
else
|
|
||||||
ac_cv_have_sidplay="have_sidplay=yes \
|
|
||||||
ac_sidplay_cflags=$ac_sidplay_cflags
|
|
||||||
ac_sidplay_library=$ac_sidplay_library"
|
|
||||||
AC_MSG_RESULT([library $ac_sidplay_library, headers $ac_sidplay_cflags])
|
|
||||||
|
|
||||||
sidplay_library=$ac_sidplay_library
|
AC_MSG_CHECKING([whether -lsidplay works])
|
||||||
sidplay_cflags=$ac_sidplay_cflags
|
ac_libs_safe=$LIBS
|
||||||
SIDPLAY_LIBS="-L$sidplay_library -lsidplay"
|
|
||||||
all_libraries="$SIDPLAY_LIBS $all_libraries"
|
|
||||||
SIDPLAY_CFLAGS="-I$sidplay_cflags"
|
|
||||||
all_includes="$SIDPLAY_CFLAGS $all_includes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Test compilation.
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether -lsidplay works])
|
|
||||||
ac_cxxflags_safe=$CXXFLAGS
|
|
||||||
ac_ldflags_safe=$LDFLAGS
|
|
||||||
ac_libs_safe=$LIBS
|
|
||||||
|
|
||||||
CXXFLAGS="$CXXFLAGS -I$sidplay_cflags"
|
|
||||||
LDFLAGS="$LDFLAGS -L$sidplay_library"
|
|
||||||
LIBS="-lsidplay"
|
|
||||||
|
|
||||||
AC_CACHE_VAL(ac_cv_sidplay_works,
|
LIBS="-lsidplay"
|
||||||
[
|
|
||||||
|
|
||||||
AC_LANG_CPLUSPLUS
|
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <sidplay/player.h>
|
#include <sidplay/player.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{ sidTune tune = sidTune(0); }
|
||||||
sidTune tune = sidTune(0);
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
ac_cv_sidplay_works="yes",
|
HAVE_SIDPLAY="yes",
|
||||||
ac_cv_sidplay_works="no",
|
HAVE_SIDPLAY="no",
|
||||||
ac_cv_sidplay_works="no")
|
HAVE_SIDPLAY="no")
|
||||||
AC_LANG_C
|
|
||||||
])
|
|
||||||
|
|
||||||
CXXFLAGS="$ac_cxxflags_safe"
|
|
||||||
LDFLAGS="$ac_ldflags_safe"
|
|
||||||
LIBS="$ac_libs_safe"
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$ac_cv_sidplay_works])
|
|
||||||
|
|
||||||
have_sidplay=no
|
LIBS="$ac_libs_safe"
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$HAVE_SIDPLAY])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(SIDPLAY_CFLAGS)
|
|
||||||
AC_SUBST(SIDPLAY_LIBS)
|
|
||||||
|
|
||||||
AC_SUBST(sidplay_library)
|
|
||||||
AC_SUBST(sidplay_cflags)
|
|
||||||
|
|
||||||
])
|
|
||||||
|
|
||||||
|
SIDPLAY_CFLAGS=
|
||||||
|
SIDPLAY_LIBS="-lsidplay"
|
||||||
|
AC_SUBST(SIDPLAY_CFLAGS)
|
||||||
|
AC_SUBST(SIDPLAY_LIBS)
|
||||||
|
|
||||||
|
AC_LANG_POP(C++)
|
||||||
|
])
|
||||||
|
|
Loading…
Reference in a new issue