diff options
author | Matt Messier <mmessier@grapetv.org> | 2007-05-12 14:18:38 -0400 |
---|---|---|
committer | Matt Messier <mmessier@grapetv.org> | 2007-05-12 14:18:38 -0400 |
commit | aa6b402b7a240b6f55c063b021c5c211f46ec8bd (patch) | |
tree | a4c14e2633b549f8d2ffe3d1bef9363a4c771cb3 /m4 | |
parent | 67b0ebb21185cb8ea2972dead6870bab8306724e (diff) | |
download | xine-lib-aa6b402b7a240b6f55c063b021c5c211f46ec8bd.tar.gz xine-lib-aa6b402b7a240b6f55c063b021c5c211f46ec8bd.tar.bz2 |
More configure/Makefile cleanups
-- Make a pass at cleaning up contrib/ Makefile.am files
-- Rename many AM_CONDITIONALS for consistency and give them better names to
better indicate what they mean
-- Remove some dead input plugin tests
-- Clean up AM_PATH_DVDNAV
Diffstat (limited to 'm4')
-rw-r--r-- | m4/audio_out.m4 | 20 | ||||
-rw-r--r-- | m4/decoders.m4 | 37 | ||||
-rw-r--r-- | m4/directx.m4 | 2 | ||||
-rw-r--r-- | m4/dvdnav.m4 | 262 | ||||
-rw-r--r-- | m4/input.m4 | 46 | ||||
-rw-r--r-- | m4/summary.m4 | 18 | ||||
-rw-r--r-- | m4/video_out.m4 | 32 |
7 files changed, 192 insertions, 225 deletions
diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index e802c66a9..625124ac7 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -76,7 +76,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_MSG_ERROR([ALSA support requested but not found.]) fi fi - AM_CONDITIONAL([HAVE_ALSA], [test x"$have_alsa" = x"yes"]) + AM_CONDITIONAL([ENABLE_ALSA], [test x"$have_alsa" = x"yes"]) dnl aRts support @@ -89,7 +89,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ else no_arts=yes fi - AM_CONDITIONAL([HAVE_ARTS], [test x"$no_arts" != x"yes"]) + AM_CONDITIONAL([ENABLE_ARTS], [test x"$no_arts" != x"yes"]) dnl CoreAudio for Mac OS X @@ -98,7 +98,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], [have_coreaudio="$enableval"], [test $default_enable_coreaudio = disable && have_coreaudio="no"]) - AM_CONDITIONAL([HAVE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) + AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) dnl EsounD support @@ -113,7 +113,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) fi fi - AM_CONDITIONAL([HAVE_ESD], [test x"$have_esound" = x"yes"]) + AM_CONDITIONAL([ENABLE_ESD], [test x"$have_esound" = x"yes"]) dnl FusionSound support @@ -126,7 +126,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ else no_fusionsound=yes fi - AM_CONDITIONAL([HAVE_FUSIONSOUND], [test x"$no_fusionsound" != x"yes"]) + AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$no_fusionsound" != x"yes"]) dnl IRIX style audio interface @@ -145,7 +145,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_SUBST(IRIXAL_STATIC_LIB) fi fi - AM_CONDITIONAL([HAVE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"]) + AM_CONDITIONAL([ENABLE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"]) dnl JACK support @@ -158,7 +158,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_MSG_ERROR([Jack support requested, but Jack not found]) fi fi - AM_CONDITIONAL([HAVE_JACK], [test x"$have_jack" = x"yes"]) + AM_CONDITIONAL([ENABLE_JACK], [test x"$have_jack" = x"yes"]) dnl OSS (Open Sound System) @@ -179,7 +179,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ #endif ]) fi - AM_CONDITIONAL([HAVE_OSS], [test x"$have_ossaudio" = x"yes"]) + AM_CONDITIONAL([ENABLE_OSS], [test x"$have_ossaudio" = x"yes"]) dnl PulseAudio @@ -189,7 +189,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ if test x"$with_pulseaudio" != x"no"; then PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"]) fi - AM_CONDITIONAL([HAVE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"]) + AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"]) dnl SUN style audio interface @@ -209,5 +209,5 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ AC_CHECK_MEMBERS([audio_info_t.output_muted]) fi fi - AM_CONDITIONAL([HAVE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"]) ])dnl XINE_AUDIO_OUT_PLUGINS diff --git a/m4/decoders.m4 b/m4/decoders.m4 index dda82f2d9..2b048c1dd 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -86,7 +86,7 @@ use internal ffmpeg. [], [enable_ffmpeg_popular_codecs=yes]) AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) fi - AM_CONDITIONAL([HAVE_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) dnl gdk-pixbuf (optional; enabled by default) @@ -101,7 +101,7 @@ use internal ffmpeg. else no_gdkpixbuf=yes fi - AM_CONDITIONAL([HAVE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) + AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) dnl ImageMagick (optional; enabled by default) @@ -116,7 +116,7 @@ use internal ffmpeg. AC_DEFINE([HAVE_WAND], 1, [Define this if you have ImageMagick installed]) fi fi - AM_CONDITIONAL([HAVE_WAND], [test x"$have_imagemagick" = x"yes"]) + AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" != x"no"]) dnl libdts (optional; enabled by default; external version allowed) @@ -142,8 +142,8 @@ use internal ffmpeg. AC_SUBST(LIBDTS_LIBS) fi fi - AM_CONDITIONAL([DTS], [test x"$enable_dts" != x"no"]) - AM_CONDITIONAL([EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) + AM_CONDITIONAL([ENABLE_DTS], [test x"$enable_dts" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) dnl libFLAC (optional; disabled by default) @@ -153,7 +153,7 @@ use internal ffmpeg. if test x"$with_libflac" != x"no"; then AM_PATH_LIBFLAC([have_libflac=yes]) fi - AM_CONDITIONAL([HAVE_LIBFLAC], [test x"$have_libflac" = x"yes"]) + AM_CONDITIONAL([ENABLE_LIBFLAC], [test x"$have_libflac" = x"yes"]) dnl libmad (optional; enabled by default; external version allowed) @@ -205,8 +205,8 @@ use internal ffmpeg. esac fi fi - AM_CONDITIONAL([MAD], [test x"$enable_mad" = x"yes"]) - AM_CONDITIONAL([EXTERNAL_LIBMAD], [test x"$have_mad" = x"yes"]) + AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" = x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_mad" = x"yes"]) dnl libmodplug (optional; enabled by default) @@ -218,7 +218,7 @@ use internal ffmpeg. [AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])], [enable_modplug=no]) fi - AM_CONDITIONAL([HAVE_MODPLUG], [test x"$have_modplug" = x"yes"]) + AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"]) dnl libmpcdec (optional; enabled by default; external version allowed) @@ -247,12 +247,11 @@ use internal ffmpeg. AC_SUBST(MPCDEC_DEPS) AC_SUBST(MPCDEC_LIBS) fi - AM_CONDITIONAL([MUSEPACK], [test x"$enable_musepack" != x"no"]) - AM_CONDITIONAL([EXTERNAL_MPCDEC], [test x"$have_mpcdec" = x"yes"]) + AM_CONDITIONAL([ENABLE_MUSEPACK], [test x"$enable_musepack" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_mpcdec" = x"yes"]) dnl libw32dll (optional; x86 only; enabled if using GNU as; GNU as required) - dnl REVISIT: fixup with_gnu_as stuff AC_ARG_ENABLE([w32dll], [AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support])], [], [enable_w32dll="$with_gnu_as"]) @@ -278,7 +277,7 @@ use internal ffmpeg. [], [w32_path="/usr/lib/codecs"]) AC_SUBST(w32_path) fi - AM_CONDITIONAL([HAVE_W32DLL], [test x"$enable_w32dll" != x"no"]) + AM_CONDITIONAL([ENABLE_W32DLL], [test x"$enable_w32dll" != x"no"]) dnl mlib @@ -323,10 +322,10 @@ use internal ffmpeg. [], [enable_mng=yes]) if test x"$with_mng" != x"no"; then AC_CHECK_LIB([mng], [mng_initialize], - [AC_CHECK_HEADERS([libmng.h], [MNG_LIBS="-lmng"], [enable_mng=no])], [enable_mng=no]) + [AC_CHECK_HEADERS([libmng.h], [MNG_LIBS="-lmng"], [enable_mng=yes])], [enable_mng=no]) AC_SUBST(MNG_LIBS) fi - AM_CONDITIONAL([HAVE_LIBMNG], [test x"$enable_mng" != x"no"]) + AM_CONDITIONAL([ENABLE_MNG], [test x"$enable_mng" != x"no"]) dnl Ogg/Speex (optional; enabled by default; external) @@ -340,7 +339,7 @@ use internal ffmpeg. AC_DEFINE([HAVE_SPEEX], 1, [Define this if you have speex]) fi fi - AM_CONDITIONAL([HAVE_SPEEX], [test x"$have_speex" = x"yes"]) + AM_CONDITIONAL([ENABLE_SPEEX], [test x"$have_speex" = x"yes"]) dnl Ogg/Theora (optional; enabled by default; external) @@ -354,7 +353,7 @@ use internal ffmpeg. AC_DEFINE([HAVE_THEORA], 1, [Define this if you have theora]) fi fi - AM_CONDITIONAL([HAVE_THEORA], [test x"$have_theora" = x"yes"]) + AM_CONDITIONAL([ENABLE_THEORA], [test x"$have_theora" = x"yes"]) dnl Ogg/Vorbis (optional; enabled by default; external) @@ -366,7 +365,7 @@ use internal ffmpeg. AC_MSG_ERROR([Vorbis support requested, but libvorbis not found]) fi fi - AM_CONDITIONAL([HAVE_VORBIS], [test x"$have_vorbis" = x"yes"]) + AM_CONDITIONAL([ENABLE_VORBIS], [test x"$have_vorbis" = x"yes"]) dnl real (optional; default depends on platform) @@ -404,7 +403,7 @@ use internal ffmpeg. if test x"$with_wavpack" != x"no"; then PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes]) fi - AM_CONDITIONAL([HAVE_WAVPACK], [test x"$have_wavpack" = x"yes"]) + AM_CONDITIONAL([ENABLE_WAVPACK], [test x"$have_wavpack" = x"yes"]) dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are enabled diff --git a/m4/directx.m4 b/m4/directx.m4 index 4aa13cbf3..fc8e22e16 100644 --- a/m4/directx.m4 +++ b/m4/directx.m4 @@ -37,7 +37,7 @@ AC_DEFUN([AM_PATH_DIRECTX], [ AC_SUBST(DIRECTX_CPPFLAGS) AC_SUBST(DIRECTX_AUDIO_LIBS) AC_SUBST(DIRECTX_VIDEO_LIBS) - AM_CONDITIONAL([HAVE_DIRECTX], [test x"$have_directx" = x"yes"]) + AM_CONDITIONAL([ENABLE_DIRECTX], [test x"$have_directx" = x"yes"]) AC_MSG_RESULT([$have_directx]) if test x"$have_directx" = x"yes"; then diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4 index 0f24080f7..72e1a577f 100644 --- a/m4/dvdnav.m4 +++ b/m4/dvdnav.m4 @@ -26,93 +26,96 @@ dnl dnl AM_PATH_DVDNAV([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for DVDNAV, and define DVDNAV_CFLAGS and DVDNAV_LIBS dnl -AC_DEFUN([AM_PATH_DVDNAV], -[dnl -dnl Get the cflags and libraries from the dvdnav-config script -dnl -AC_ARG_WITH(dvdnav-prefix, - AS_HELP_STRING([--with-dvdnav-prefix=DIR], [prefix where DVDNAV is installed (optional)]), - dvdnav_config_prefix="$withval", dvdnav_config_prefix="") -AC_ARG_WITH(dvdnav-exec-prefix, - AS_HELP_STRING([--with-dvdnav-exec-prefix=DIR], [exec prefix where DVDNAV is installed (optional)]), - dvdnav_config_exec_prefix="$withval", dvdnav_config_exec_prefix="") -AC_ARG_ENABLE(dvdnavtest, - AS_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program]), - enable_dvdnavtest=$enableval, enable_dvdnavtest=yes) +AC_DEFUN([AM_PATH_DVDNAV], [ + AC_ARG_WITH([dvdnav-prefix], + [AS_HELP_STRING([--with-dvdnav-prefix=PATH], [prefix where DVDNAV is installed (optional)])], + [dvdnav_config_prefix="$withval"], [dvdnav_config_prefix=""]) + AC_ARG_WITH([dvdnav-exec-prefix], + [AS_HELP_STRING([--with-dvdnav-exec-prefix=DIR], [exec prefix where DVDNAV is installed (optional)])], + [dvdnav_config_exec_prefix="$withval"], [dvdnav_config_exec_prefix=""]) + AC_ARG_ENABLE([dvdnavtest], + [AS_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program])], + [], [enable_dvdnavtest=yes]) - AC_LANG_PUSH([C]) + AC_LANG_PUSH([C]) - if test x$dvdnav_config_exec_prefix != x ; then - dvdnav_config_args="$dvdnav_config_args --exec-prefix=$dvdnav_config_exec_prefix" - if test x${DVDNAV_CONFIG+set} != xset ; then - DVDNAV_CONFIG=$dvdnav_config_exec_prefix/bin/dvdnav-config - fi - fi - if test x$dvdnav_config_prefix != x ; then - dvdnav_config_args="$dvdnav_config_args --prefix=$dvdnav_config_prefix" - if test x${DVDNAV_CONFIG+set} != xset ; then - DVDNAV_CONFIG=$dvdnav_config_prefix/bin/dvdnav-config - fi - fi + if test x"$dvdnav_config_exec_prefix" != x""; then + dvdnav_config_args="$dvdnav_config_args --exec-prefix=$dvdnav_config_exec_prefix" + if test x"${DVDNAV_CONFIG+set}" != x"set"; then + DVDNAV_CONFIG=$dvdnav_config_exec_prefix/bin/dvdnav-config + fi + fi + if test x"$dvdnav_config_prefix" != x""; then + dvdnav_config_args="$dvdnav_config_args --prefix=$dvdnav_config_prefix" + if test x"${DVDNAV_CONFIG+set}" != x"set"; then + DVDNAV_CONFIG=$dvdnav_config_prefix/bin/dvdnav-config + fi + fi - min_dvdnav_version=ifelse([$1], ,0.0.0,$1) - if test "x$enable_dvdnavtest" != "xyes" ; then - AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version]) - else - AC_PATH_TOOL(DVDNAV_CONFIG, dvdnav-config, no) - AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version]) - no_dvdnav="" - if test "$DVDNAV_CONFIG" = "no" ; then - no_dvdnav=yes + min_dvdnav_version=ifelse([$1], , [0.0.0], [$1]) + if test x"$enable_dvdnavtest" = x"no"; then + AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version]) else - DVDNAV_CFLAGS=`$DVDNAV_CONFIG $dvdnav_config_args --cflags` - DVDNAV_LIBS=`$DVDNAV_CONFIG $dvdnav_config_args --libs` - dvdnav_config_major_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - dvdnav_config_minor_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - dvdnav_config_sub_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - dnl if test "x$enable_dvdnavtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $DVDNAV_CFLAGS" - LIBS="$DVDNAV_LIBS $LIBS" -dnl -dnl Now check if the installed DVDNAV is sufficiently new. (Also sanity -dnl checks the results of dvdnav-config to some extent -dnl - rm -f conf.dvdnavtest - AC_RUN_IFELSE([AC_LANG_SOURCE([[ + AC_PATH_TOOL([DVDNAV_CONFIG], [dvdnav-config], [no]) + AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version]) + + if test x"$DVDNAV_CONFIG" = x"no"; then + with_external_dvdnav=no + else + DVDNAV_CFLAGS=`$DVDNAV_CONFIG $dvdnav_config_args --cflags` + DVDNAV_LIBS=`$DVDNAV_CONFIG $dvdnav_config_args --libs` + dvdnav_config_major_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + dvdnav_config_minor_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + dvdnav_config_sub_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $DVDNAV_CFLAGS" + ac_save_LIBS="$LIBS" LIBS="$DVDNAV_LIBS $LIBS" + + # Now check if the installed DVDNAV is sufficiently new. (Also sanity + # checks the results of dvdnav-config to some extent + + rm -f conf.dvdnavtest + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <dvdnav.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -int -main () +int main(int argc, char *argv[]) { - int major, minor, sub; - char *tmp_version; + int major, minor, sub; + char *tmp_version; + FILE *fp; - system ("touch conf.dvdnavtest"); + if ((fp = fopen("conf.dvdnavtest", "w")) != NULL) { + fclose(fp); + } + else { + printf("*** could not write to file conf.dvdnavtest\n"); + exit(1); + } + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_dvdnav_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) { + printf("%s, bad version string\n", "$min_dvdnav_version"); + exit(1); + } + free(tmp_version); - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = (char *) strdup("$min_dvdnav_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) { - printf("%s, bad version string\n", "$min_dvdnav_version"); - exit(1); - } - - if (($dvdnav_config_major_version > major) || - (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version > minor)) || - (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version == minor) && ($dvdnav_config_sub_version >= sub))) { - return 0; - } else { + if (($dvdnav_config_major_version > major) || + (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version > minor)) || + (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version == minor) && + ($dvdnav_config_sub_version >= sub))) + { + return 0; + } printf("\n*** An old version of libdvdnav (%d.%d.%d) was found.\n", - $dvdnav_config_major_version, $dvdnav_config_minor_version, $dvdnav_config_sub_version); + $dvdnav_config_major_version, $dvdnav_config_minor_version, $dvdnav_config_sub_version); printf("*** You need a version of libdvdnav newer than %d.%d.%d. The latest version of\n", - major, minor, sub); + major, minor, sub); printf("*** libdvdnav is always available from:\n"); printf("*** http://dvd.sourceforge.net\n"); printf("***\n"); @@ -123,65 +126,64 @@ main () printf("*** correct copy of dvdnav-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); - } - return 1; + + return 1; } -]])],[],[no_dvdnav=yes],[no_dvdnav=cc]) - if test "x$no_dvdnav" = xcc; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include <dvdnav.h> -#include <stdio.h> -]], [[ return 0; ]])],[no_dvdnav=''],[no_dvdnav=yes]) - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi + ]])], [], [with_external_dvdnav=no], [with_external_dvdnav=cc]) + if test x"$no_dvdnav" = x"cc"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <dvdnav.h> + #include <stdio.h>]], [[return 0]])], + [], [with_external_dvdnav=no]) + fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi fi - if test "x$no_dvdnav" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) + + if test x"$with_external_dvdnav" != x"no"; then + AC_MSG_RESULT([yes]) + ifelse([$2], , :, [$2]) else - AC_MSG_RESULT(no) - if test "$DVDNAV_CONFIG" = "no" ; then - echo "*** The dvdnav-config script installed by DVDNAV could not be found" - echo "*** If DVDNAV was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the DVDNAV_CONFIG environment variable to the" - echo "*** full path to dvdnav-config." - else - if test -f conf.dvdnavtest ; then - : - else - echo "*** Could not run DVDNAV test program, checking why..." - CFLAGS="$CFLAGS $DVDNAV_CFLAGS" - LIBS="$LIBS $DVDNAV_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include <dvdnav.h> -#include <stdio.h> -]], [[ return 0; ]])], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding DVDNAV or finding the wrong" - echo "*** version of DVDNAV. If it is not finding DVDNAV, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means DVDNAV was incorrectly installed" - echo "*** or that you have moved DVDNAV since it was installed. In the latter case, you" - echo "*** may want to edit the dvdnav-config script: $DVDNAV_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" + AC_MSG_RESULT([no]) + if test x"$enable_dvdnavtest" != x"no"; then + if test x"$DVDNAV_CONFIG" = x"no"; then + echo "*** The dvdnav-config script installed by DVDNAV could not be found" + echo "*** If DVDNAV was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the DVDNAV_CONFIG environment variable to the" + echo "*** full path to dvdnav-config." + else + if test ! -f conf.dvdnavtest ; then + echo "*** Could not run DVDNAV test program, checking why..." + CFLAGS="$CFLAGS $DVDNAV_CFLAGS" + LIBS="$LIBS $DVDNAV_LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <dvdnav.h> + #include <stdio.h>]], [[return 0]])], + [echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding DVDNAV or finding the wrong" + echo "*** version of DVDNAV. If it is not finding DVDNAV, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***"], + [echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means DVDNAV was incorrectly installed" + echo "*** or that you have moved DVDNAV since it was installed. In the latter case, you" + echo "*** may want to edit the dvdnav-config script: $DVDNAV_CONFIG"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + else + rm -f conf.dvdnavtest + fi + fi fi - fi - DVDNAV_CFLAGS="" - DVDNAV_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(DVDNAV_CFLAGS) - AC_SUBST(DVDNAV_LIBS) - AC_LANG_POP([C]) - rm -f conf.dvdnavtest + DVDNAV_CFLAGS="" + DVDNAV_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(DVDNAV_CFLAGS) + AC_SUBST(DVDNAV_LIBS) + AC_LANG_POP([C]) ]) diff --git a/m4/input.m4 b/m4/input.m4 index d88676e8c..0255f879e 100644 --- a/m4/input.m4 +++ b/m4/input.m4 @@ -32,7 +32,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ else no_gnome_vfs=yes fi - AM_CONDITIONAL([HAVE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"]) + AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"]) dnl libsmbclient @@ -45,7 +45,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ LIBSMBCLIENT_LIBS="-lsmbclient"])]) AC_SUBST(LIBSMBCLIENT_LIBS) fi - AM_CONDITIONAL([HAVE_LIBSMBCLIENT], [test x"$have_libsmbclient" = x"yes"]) + AM_CONDITIONAL([ENABLE_LIBSMBCLIENT], [test x"$have_libsmbclient" = x"yes"]) dnl video-for-linux (v4l) @@ -59,7 +59,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.]) fi fi - AM_CONDITIONAL([HAVE_V4L], [test x"$have_v4l" = x"yes"]) + AM_CONDITIONAL([ENABLE_V4L], [test x"$have_v4l" = x"yes"]) dnl cdrom ioctls (common for dvdnav and vcd) @@ -73,43 +73,20 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ ;; esac AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h]) - AC_CACHE_CHECK([if cdrom ioctls are available], [am_cv_have_cdrom_ioctls], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>]], [[CDROM_DRIVE_STATUS]])], - [am_cv_have_cdrom_ioctls=yes], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>]], [[CDIOCALLOW]])], - [am_cv_have_cdrom_ioctls=yes], - [AC_EGREP_CPP([we_have_cdrom_ioctls], - [#include <sys/ioctl.h> - #ifdef HAVE_SYS_CDIO_H - # include <sys/cdio.h> - #endif - #ifdef HAVE_LINUX_CDROM_H - # include <linux/cdrom.h> - #endif - #if defined(CDROM_DRIVE_STATUS) || defined(CDIOCALLOW) || defined(CDROMCDXA) - we_have_cdrom_ioctls - #endif], - [am_cv_have_cdrom_ioctls=yes], [am_cv_have_cdrom_ioctls=no])])])]) - have_cdrom_ioctls="$am_cv_have_cdrom_ioctls" - if test x"$have_cdrom_ioctls" = x"yes"; then - AC_DEFINE([HAVE_CDROM_IOCTLS], 1, [Define this if you have CDROM ioctls]) - fi - AM_CONDITIONAL([HAVE_CDROM_IOCTLS], [test x"$have_cdrom_ioctls" = x"yes"]) dnl dvdnav - dnl REVISIT: Something doesn't feel right about this ... I'm not sure it works as intended AC_ARG_WITH([external-dvdnav], [AS_HELP_STRING([--with-external-dvdnav], [use external dvdnav library (not recommended)])], - [external_dvdnav="$withval"], [no_dvdnav=yes external_dvdnav=no]) - if test "x$external_dvdnav" = "xyes"; then + [], [with_external_dvdnav=no]) + if test x"$with_external_dvdnav" != x"no"; then AM_PATH_DVDNAV([0.1.9], [AC_DEFINE([HAVE_DVDNAV], 1, [Define this if you have a suitable version of libdvdnav])], [AC_MSG_RESULT([*** no usable version of libdvdnav found, using internal copy ***])]) else AC_MSG_RESULT([Using included DVDNAV support]) fi - AM_CONDITIONAL([HAVE_DVDNAV], [test x"$no_dvdnav" != x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_DVDNAV], [test x"$with_external_dvdnav" != x"no"]) dnl Video CD @@ -293,15 +270,6 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [ AC_SUBST(LIBVCD_CFLAGS) AC_SUBST(LIBVCD_LIBS) AC_SUBST(LIBVCDINFO_LIBS) - AM_CONDITIONAL([HAVE_VCDNAV], [test x"$with_internval_vcdlibs" = x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_VCDLIBS], [test x"$with_internal_vcdlibs" != x"no"]) AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" = x"yes"]) ]) - - - - - - - - - diff --git a/m4/summary.m4 b/m4/summary.m4 index a1a270f4b..a93e3f79c 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -13,22 +13,20 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - http - mms" echo " - pnm - rtsp" echo " - dvb" - if test "x$external_dvdnav" = "xyes"; then + if test "x$with_external_dvdnav" = "xyes"; then echo " - dvd (external libs)" else echo " - dvd (internal libs)" fi - if test "x$have_cdrom_ioctls" = "xyes"; then - if test "x$enable_vcd" = "xyes"; then - if test "x$internal_vcdnav" = "xno"; then - echo " - vcd (external libs)" - else - echo " - vcd (internal libs)" - fi + if test "x$enable_vcd" = "xyes"; then + if test "x$internal_vcdnav" = "xno"; then + echo " - vcd (external libs)" + else + echo " - vcd (internal libs)" fi - echo " - vcdo" - echo " - cdda" fi + echo " - vcdo" + echo " - cdda" if test "x$no_gnome_vfs" = "xno"; then echo " - gnome-vfs" fi diff --git a/m4/video_out.m4 b/m4/video_out.m4 index ea9933eb7..2e89d3588 100644 --- a/m4/video_out.m4 +++ b/m4/video_out.m4 @@ -69,7 +69,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ else ac_have_xinerama=no fi - AM_CONDITIONAL([HAVE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) + AM_CONDITIONAL([ENABLE_XINERAMA], [test x"$ac_have_xinerama" = x"yes"]) dnl OpenGL, including GLut and/or GLU AM_PATH_OPENGL @@ -88,7 +88,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ else no_aalib=yes fi - AM_CONDITIONAL([HAVE_AA], [test x"$no_aalib" != x"yes"]) + AM_CONDITIONAL([ENABLE_AA], [test x"$no_aalib" != x"yes"]) dnl Color AsCii Art @@ -101,7 +101,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found]) fi fi - AM_CONDITIONAL([HAVE_CACA], [test x"$have_caca" = x"yes"]) + AM_CONDITIONAL([ENABLE_CACA], [test x"$have_caca" = x"yes"]) dnl dha (Linux only) @@ -128,7 +128,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ if test "x$enable_directfb" = "xyes"; then PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb="yes"], [have_directfb="no"]) fi - AM_CONDITIONAL([HAVE_DIRECTFB], [test x"$have_directfb" = x"yes"]) + AM_CONDITIONAL([ENABLE_DIRECTFB], [test x"$have_directfb" = x"yes"]) dnl DirectX @@ -165,7 +165,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ else have_dxr3=no have_libfame=no have_librte=no have_encoder=no fi - AM_CONDITIONAL([HAVE_DXR3], [test x"$have_dxr3" = x"yes"]) + AM_CONDITIONAL([ENABLE_DXR3], [test x"$have_dxr3" = x"yes"]) AM_CONDITIONAL([HAVE_LIBFAME], [test x"$have_libfame" = x"yes"]) AM_CONDITIONAL([HAVE_LIBRTE], [test x"$have_librte" = x"yes"]) @@ -180,7 +180,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_MSG_ERROR([libstk support requested, but libstk not found]) fi fi - AM_CONDITIONAL([HAVE_STK], [test x"$have_libstk" = x"yes"]) + AM_CONDITIONAL([ENABLE_STK], [test x"$have_libstk" = x"yes"]) dnl Linux framebuffer device @@ -192,7 +192,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ [AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support]) have_fb=yes]) fi - AM_CONDITIONAL([HAVE_FB], [test x"$have_fb" = x"yes"]) + AM_CONDITIONAL([ENABLE_FB], [test x"$have_fb" = x"yes"]) dnl Mac OS X OpenGL video output @@ -201,7 +201,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ [AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output])], [have_macosx_video="$enableval"], [test $default_enable_macosx_video = disable && have_macosx_video=no]) - AM_CONDITIONAL([HAVE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) + AM_CONDITIONAL([ENABLE_MACOSX_VIDEO], [test x"$have_macosx_video" != x"no"]) dnl SDL @@ -216,7 +216,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_DEFINE([HAVE_SDL], 1, [Define this if you have SDL installed]) fi fi - AM_CONDITIONAL([HAVE_SDL], [test x"$have_sdl" = x"yes"]) + AM_CONDITIONAL([ENABLE_SDL], [test x"$have_sdl" = x"yes"]) dnl Solaris framebuffer device support (exists for more than just Solaris) @@ -233,15 +233,15 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ AC_SUBST(SUNDGA_CPPFLAGS) AC_SUBST(SUNDGA_LIBS) fi - AM_CONDITIONAL([HAVE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) - AM_CONDITIONAL([HAVE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNDGA], [test x"$ac_have_sundga" = x"yes"]) + AM_CONDITIONAL([ENABLE_SUNFB], [test x"$ac_have_sunfb" = x"yes"]) dnl syncfb (Linux only) AC_ARG_ENABLE([syncfb], [AS_HELP_STRING([--enable-syncfb], [enable support for syncfb (Linux only)])], [], [test $default_enable_syncfb = disable && enable_syncfb=no]) - AM_CONDITIONAL([HAVE_SYNCFB], [test x"$enable_syncfb" != x"no"]) + AM_CONDITIONAL([ENABLE_SYNCFB], [test x"$enable_syncfb" != x"no"]) dnl xcb @@ -255,9 +255,9 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv="yes"], [have_xcbxv="no"]) fi fi - AM_CONDITIONAL([HAVE_XCB], [test x"$have_xcb" = x"yes"]) - AM_CONDITIONAL([HAVE_XCBSHM], [test x"$have_xcbshm" = x"yes"]) - AM_CONDITIONAL([HAVE_XCBXV], [test x"$have_xcbxv" = x"yes"]) + AM_CONDITIONAL([ENABLE_XCB], [test x"$have_xcb" = x"yes"]) + AM_CONDITIONAL([ENABLE_XCBSHM], [test x"$have_xcbshm" = x"yes"]) + AM_CONDITIONAL([ENABLE_XCBXV], [test x"$have_xcbxv" = x"yes"]) dnl vidix/libdha @@ -280,5 +280,5 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [ fi fi fi - AM_CONDITIONAL([HAVE_VIDIX], test x"$enable_vidix" != x"no") + AM_CONDITIONAL([ENABLE_VIDIX], test x"$enable_vidix" != x"no") ])dnl XINE_VIDEO_OUT_PLUGINS |