diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/.hgignore (renamed from m4/.cvsignore) | 0 | ||||
-rw-r--r-- | m4/Makefile.am | 5 | ||||
-rw-r--r-- | m4/_xine.m4 | 70 | ||||
-rw-r--r-- | m4/aa.m4 | 223 | ||||
-rw-r--r-- | m4/arts.m4 | 19 | ||||
-rw-r--r-- | m4/as.m4 | 21 | ||||
-rw-r--r-- | m4/attributes.m4 | 177 | ||||
-rw-r--r-- | m4/directx.m4 | 7 | ||||
-rw-r--r-- | m4/dl.m4 | 5 | ||||
-rw-r--r-- | m4/dvdnav.m4 | 26 | ||||
-rw-r--r-- | m4/gas.m4 | 120 | ||||
-rw-r--r-- | m4/ioctl_request.m4 | 52 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 2 | ||||
-rw-r--r-- | m4/libFLAC.m4 | 26 | ||||
-rw-r--r-- | m4/libfame.m4 | 6 | ||||
-rw-r--r-- | m4/libtool15.m4 | 16 | ||||
-rw-r--r-- | m4/opengl.m4 | 9 | ||||
-rw-r--r-- | m4/optimizations.m4 | 12 | ||||
-rw-r--r-- | m4/pthreads.m4 | 59 | ||||
-rw-r--r-- | m4/symbol.m4 | 86 | ||||
-rw-r--r-- | m4/xine.m4 | 20 |
21 files changed, 652 insertions, 309 deletions
diff --git a/m4/.cvsignore b/m4/.hgignore index 282522db0..282522db0 100644 --- a/m4/.cvsignore +++ b/m4/.hgignore diff --git a/m4/Makefile.am b/m4/Makefile.am index 2236e9bfc..3a5209dc3 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -11,7 +11,6 @@ m4data_DATA = xine.m4 EXTRA_DIST = glibc2.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4 \ aa.m4 \ arts.m4 \ - as.m4 \ attributes.m4 \ codeset.m4 \ directx.m4 \ @@ -32,4 +31,6 @@ EXTRA_DIST = glibc2.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-p progtest.m4 \ xine.m4 \ _xine.m4 \ - xv.m4 + xv.m4 \ + pthreads.m4 \ + gas.m4 diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 60baed8c1..930703bbb 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -9,7 +9,7 @@ AC_DEFUN([AC_C_ALWAYS_INLINE], AC_MSG_CHECKING([for always_inline]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" - AC_TRY_COMPILE([],[inline __attribute__ ((__always_inline__)) void f (void);], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[inline __attribute__ ((__always_inline__)) void f (void);]])], [ac_cv_always_inline=yes],[ac_cv_always_inline=no]) CFLAGS="$SAVE_CFLAGS" AC_MSG_RESULT([$ac_cv_always_inline]) @@ -69,7 +69,7 @@ AC_DEFUN([AC_PREREQ_LIBTOOL], dnl AC_DEFUN([AC_CHECK_LIRC], [AC_ARG_ENABLE(lirc, - AC_HELP_STRING([--disable-lirc], [turn off LIRC support]), + AS_HELP_STRING([--disable-lirc], [turn off LIRC support]), enable_lirc=$enableval, enable_lirc=yes) if test x"$enable_lirc" = xyes; then @@ -101,7 +101,7 @@ AC_DEFUN([AC_CHECK_LIRC], dnl AC_LINUX_PATH(DEFAULT PATH) AC_DEFUN([AC_LINUX_PATH], [AC_ARG_WITH(linux-path, - AC_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located]), + AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located]), linux_path="$withval", linux_path="$1") LINUX_INCLUDE="-I$linux_path/include" ]) @@ -110,7 +110,7 @@ dnl AC_CHECK_DXR3() AC_DEFUN([AC_CHECK_DXR3], [ AC_ARG_ENABLE(dxr3, - AC_HELP_STRING([--disable-dxr3], [do not build the DXR3/HW+ plugins]), + AS_HELP_STRING([--disable-dxr3], [do not build the DXR3/HW+ plugins]), enable_dxr3=$enableval, enable_dxr3=yes) if test x"$enable_dxr3" = xyes; then have_dxr3=yes @@ -142,31 +142,13 @@ AC_DEFUN([AC_CHECK_DXR3], fi ]) - -dnl AC_C_ATTRIBUTE_ALIGNED -dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is supported -AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED], - [AC_CACHE_CHECK([__attribute__ ((aligned ())) support], - [ac_cv_c_attribute_aligned], - [ac_cv_c_attribute_aligned=0 - for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do - AC_TRY_COMPILE([], - [static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0 -; return c;], - [ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try]) - done]) - if test x"$ac_cv_c_attribute_aligned" != x"0"; then - AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], - [$ac_cv_c_attribute_aligned],[maximum supported data alignment]) - fi]) - dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) dnl check if $CC supports a given set of cflags AC_DEFUN([AC_TRY_CFLAGS], [AC_MSG_CHECKING([if $CC supports $1 flags]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$1" - AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no]) CFLAGS="$SAVE_CFLAGS" AC_MSG_RESULT([$ac_cv_try_cflags_ok]) if test x"$ac_cv_try_cflags_ok" = x"yes"; then @@ -175,6 +157,20 @@ AC_DEFUN([AC_TRY_CFLAGS], ifelse([$3],[],[:],[$3]) fi]) +dnl AC_TRY_LDFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) +dnl check if $CC supports a given set of ldflags +AC_DEFUN([AC_TRY_LDFLAGS], + [AC_MSG_CHECKING([if $CC supports $1 flags]) + SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no]) + LDFLAGS="$SAVE_LDFLAGS" + AC_MSG_RESULT([$ac_cv_try_ldflags_ok]) + if test x"$ac_cv_try_ldflags_ok" = x"yes"; then + ifelse([$2],[],[:],[$2]) + else + ifelse([$3],[],[:],[$3]) + fi]) dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY) dnl generate a default inttypes.h if the header file does not exist already @@ -366,7 +362,7 @@ dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE) dnl abort if the given type does not have the supposed size AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], [AC_MSG_CHECKING(that size of $1 is $2) - AC_TRY_COMPILE([],[switch (0) case 0: case (sizeof ($1) == $2):;],[], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) case 0: case (sizeof ($1) == $2):;]])],[], [AC_MSG_ERROR([can not build a default inttypes.h])]) AC_MSG_RESULT([yes])]) @@ -549,26 +545,18 @@ AC_DEFUN([AC_CHECK_SOCKLEN_T], [ AC_LANG_PUSH(C++) AC_CACHE_VAL(ac_cv_socklen_t, [ - AC_TRY_COMPILE( -#include <sys/types.h> + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> #include <sys/socket.h> - , -socklen_t a=0; + ]], [[socklen_t a=0; getsockname(0,(struct sockaddr*)0, &a); - , - ac_cv_socklen_t=socklen_t, - [ - AC_TRY_COMPILE( -#include <sys/types.h> -#include <sys/socket.h> - , + ]])],[ac_cv_socklen_t=socklen_t],[ac_cv_socklen_t='']) + if test "x$ac_cv_socklen_t" = x; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> +#include <sys/socket.h>]], [[ int a=0; -getsockname(0,(struct sockaddr*)0, &a); - , - ac_cv_socklen_t=int, - ac_cv_socklen_t=size_t - )] - ) +getsockname(0,(struct sockaddr*)0, &a);]])], + [ac_cv_socklen_t=int],[ac_cv_socklen_t=size_t]) + fi ]) AC_LANG_POP([C++]) @@ -35,19 +35,92 @@ dnl * use aalib-config instead of aainfo now. dnl 17/06/2001 dnl * First shot dnl + +dnl Internal bits, used by AM_PATH_AALIB. +dnl Requires AALIB_CFLAGS and AALIB_FLAGS to be defined +AC_DEFUN([_AALIB_CHECK_VERSION], [ + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$AALIB_CFLAGS $CFLAGS" + LIBS="$AALIB_LIBS $LIBS" + +dnl Now check if the installed AALIB is sufficiently new. (Also sanity +dnl checks the results of aalib-config to some extent.) + + rm -f conf.aalibtest + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include <stdio.h> +#include <stdlib.h> +#include <aalib.h> + +int main () { + int major, minor; + char *tmp_version; + + system ("touch conf.aalibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *) strdup("$min_aalib_version"); + if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) { + printf("%s, bad version string\n", "$min_aalib_version"); + exit(1); + } + + if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) && +#ifdef AA_LIB_MINNOR + (AA_LIB_MINNOR >= minor) +#else + (AA_LIB_MINOR >= minor) +#endif + )) { + return 0; + } + else { +#ifdef AA_LIB_MINNOR + printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR); +#else + printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR); +#endif + printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor); + printf("*** AALIB is always available from:\n"); + printf("*** http://www.ta.jcu.cz://aa\n"); + printf("***\n"); + } + return 1; +} +]])],[],[no_aalib=yes],[no_aalib=cc]) + if test "x$no_aalib" = xcc; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include <stdio.h> +#include <aalib.h> +]], [[ return ((AA_LIB_VERSION) || +#ifdef AA_LIB_MINNOR + (AA_LIB_MINNOR) +#else + (AA_LIB_MINOR) +#endif + ); ]])],[no_aalib=''],[no_aalib=yes]) + fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" +]) + + AC_DEFUN([AM_PATH_AALIB], [dnl dnl AC_ARG_WITH(aalib-prefix, - AC_HELP_STRING([--with-aalib-prefix=DIR], [prefix where AALIB is installed (optional)]), + AS_HELP_STRING([--with-aalib-prefix=DIR], [prefix where AALIB is installed (optional)]), aalib_config_prefix="$withval", aalib_config_prefix="") AC_ARG_WITH(aalib-exec-prefix, - AC_HELP_STRING([--with-aalib-exec-prefix=DIR], [exec prefix where AALIB is installed (optional)]), + AS_HELP_STRING([--with-aalib-exec-prefix=DIR], [exec prefix where AALIB is installed (optional)]), aalib_config_exec_prefix="$withval", aalib_config_exec_prefix="") AC_ARG_ENABLE(aalibtest, - AC_HELP_STRING([--disable-aalibtest], [do not try to compile and run a test AALIB program]), + AS_HELP_STRING([--disable-aalibtest], [do not try to compile and run a test AALIB program]), enable_aalibtest=$enableval, enable_aalibtest=yes) + AC_LANG_PUSH([C]) + if test x$aalib_config_exec_prefix != x ; then aalib_config_args="$aalib_config_args --exec-prefix=$aalib_config_exec_prefix" if test x${AALIB_CONFIG+set} != xset ; then @@ -124,78 +197,14 @@ dnl gpmdep="yes" dnl fi done - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$AALIB_CFLAGS $CFLAGS" - LIBS="$AALIB_LIBS $LIBS" - -dnl -dnl Now check if the installed AALIB is sufficiently new. (Also sanity -dnl checks the results of xine-config to some extent -dnl - AC_LANG_SAVE() - AC_LANG_C() - rm -f conf.aalibtest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <aalib.h> - -int main () { - int major, minor; - char *tmp_version; - - system ("touch conf.aalibtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = (char *) strdup("$min_aalib_version"); - if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) { - printf("%s, bad version string\n", "$min_aalib_version"); - exit(1); - } - - if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) && -#ifdef AA_LIB_MINNOR - (AA_LIB_MINNOR >= minor) -#else - (AA_LIB_MINOR >= minor) -#endif - )) { - return 0; - } - else { -#ifdef AA_LIB_MINNOR - printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR); -#else - printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR); -#endif - printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor); - printf("*** AALIB is always available from:\n"); - printf("*** http://www.ta.jcu.cz://aa\n"); - printf("***\n"); - } - return 1; -} -],, no_aalib=yes, - AC_TRY_LINK([ -#include <stdio.h> -#include <aalib.h> -], [ return ((AA_LIB_VERSION) || -#ifdef AA_LIB_MINNOR - (AA_LIB_MINNOR) -#else - (AA_LIB_MINOR) -#endif - ); ],, no_aalib=yes)) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" + _AALIB_CHECK_VERSION fi else dnl AALIB_CONFIG AC_MSG_CHECKING([for AALIB version >= $min_aalib_version]) no_aalib="" - AALIB_CFLAGS=`$AALIB_CONFIG $aalib_config_args --cflags` - AALIB_LIBS=`$AALIB_CONFIG $aalib_config_args --libs` + AALIB_CFLAGS="`$AALIB_CONFIG $aalib_config_args --cflags`" + AALIB_LIBS="`$AALIB_CONFIG $aalib_config_args --libs`" aalib_config_major_version=`$AALIB_CONFIG $aalib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` aalib_config_minor_version=`$AALIB_CONFIG $aalib_config_args --version | \ @@ -203,71 +212,7 @@ int main () { aalib_config_sub_version=`$AALIB_CONFIG $aalib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $AALIB_CFLAGS" - LIBS="$AALIB_LIBS $LIBS" - -dnl -dnl Now check if the installed AALIB is sufficiently new. (Also sanity -dnl checks the results of aalib-config to some extent -dnl - AC_LANG_SAVE() - AC_LANG_C() - rm -f conf.aalibtest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <aalib.h> - -int main () { - int major, minor; - char *tmp_version; - - system ("touch conf.aalibtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = (char *) strdup("$min_aalib_version"); - if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) { - printf("%s, bad version string\n", "$min_aalib_version"); - exit(1); - } - - if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) && -#ifdef AA_LIB_MINNOR - (AA_LIB_MINNOR >= minor) -#else - (AA_LIB_MINOR >= minor) -#endif - )) { - return 0; - } - else { -#ifdef AA_LIB_MINNOR - printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR); -#else -printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR); -#endif - printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor); - printf("*** AALIB is always available from:\n"); - printf("*** http://www.ta.jcu.cz://aa\n"); - printf("***\n"); - } - return 1; -} -],, no_aalib=yes, - AC_TRY_LINK([ -#include <stdio.h> -#include <aalib.h> -], [ return ((AA_LIB_VERSION) || -#ifdef AA_LIB_MINNOR - (AA_LIB_MINNOR) -#else - (AA_LIB_MINOR) -#endif - ); ],, no_aalib=yes)) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" + _AALIB_CHECK_VERSION fi dnl AALIB_CONFIG fi dnl enable_aalibtest @@ -288,17 +233,17 @@ printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_ echo "*** Could not run AALIB test program, checking why..." CFLAGS="$CFLAGS $AALIB_CFLAGS" LIBS="$LIBS $AALIB_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <aalib.h> -], [ +]], [[ return ((AA_LIB_VERSION) || #ifdef AA_LIB_MINNOR (AA_LIB_MINNOR) #else (AA_LIB_MINOR) #endif - ); ], + ); ]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding AALIB or finding the wrong" echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your" @@ -322,6 +267,6 @@ printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_ fi AC_SUBST(AALIB_CFLAGS) AC_SUBST(AALIB_LIBS) - AC_LANG_RESTORE() + AC_LANG_POP([C]) rm -f conf.aalibtest ]) diff --git a/m4/arts.m4 b/m4/arts.m4 index b44d26a21..079c21ba8 100644 --- a/m4/arts.m4 +++ b/m4/arts.m4 @@ -9,9 +9,9 @@ AC_DEFUN([AM_PATH_ARTS], [dnl dnl Get the cflags and libraries from the artsc-config script dnl -AC_ARG_WITH(arts-prefix, AC_HELP_STRING([--with-arts-prefix=DIR], [prefix where ARTS is installed (optional)]), +AC_ARG_WITH(arts-prefix, AS_HELP_STRING([--with-arts-prefix=DIR], [prefix where ARTS is installed (optional)]), arts_prefix="$withval", arts_prefix="") -AC_ARG_ENABLE(artstest, AC_HELP_STRING([--disable-artstest], [do not try to compile and run a test ARTS program]), +AC_ARG_ENABLE(artstest, AS_HELP_STRING([--disable-artstest], [do not try to compile and run a test ARTS program]), enable_artstest=$enableval, enable_artstest=yes) if test x$arts_prefix != x ; then @@ -54,7 +54,7 @@ dnl Now check if the installed ARTS is sufficiently new. (Also sanity dnl checks the results of artsc-config to some extent) dnl rm -f conf.artstest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -108,11 +108,14 @@ int main () } } -],, no_arts=yes, - AC_TRY_LINK([ +]])],[],[no_arts=yes],[no_arts=cc]) + + if test "x$no_arts" = "xcc"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <artsc.h> -], [ return 0; ],, no_arts=yes)) +]], [[ return 0; ]])],[no_arts=''],[no_arts=yes]) + fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -134,10 +137,10 @@ int main () echo "*** Could not run ARTS test program, checking why..." CFLAGS="$CFLAGS $ARTS_CFLAGS" LIBS="$LIBS $ARTS_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <artsc.h> -], [ return 0; ], +]], [[ return 0; ]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding ARTS or finding the wrong" echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your" diff --git a/m4/as.m4 b/m4/as.m4 deleted file mode 100644 index 96a44e239..000000000 --- a/m4/as.m4 +++ /dev/null @@ -1,21 +0,0 @@ -dnl Extracted from automake-1.5 and sligtly modified for Xine usage. -dnl Daniel Caujolle-Bert <segfault@club-internet.fr> - -# Figure out how to run the assembler. - -# AM_PROG_AS_MOD -AC_DEFUN([AM_PROG_AS_MOD], -[# By default we simply use the C compiler to build assembly code. -AC_REQUIRE([AC_PROG_CC]) -: ${CCAS='$(CC)'} -# Set CCASFLAGS if not already set. -: ${CCASFLAGS='$(CFLAGS)'} -# Set ASCOMPILE if not already set. -if test $CCAS = '$'CC; then -: ${CCASCOMPILE='$(LIBTOOL) --mode=compile $(CCAS) $(AM_ASFLAGS) $(CCASFLAGS) -c'} -else -: ${CCASCOMPILE='$(LIBTOOL) --mode=compile $(CCAS) $(AM_ASFLAGS) $(CCASFLAGS)'} -fi -AC_SUBST(CCAS) -AC_SUBST(CCASFLAGS) -AC_SUBST(CCASCOMPILE)]) diff --git a/m4/attributes.m4 b/m4/attributes.m4 index fa00a95f8..eaa788c5f 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -1,13 +1,79 @@ -# Functions to check for attributes support in compiler +dnl Macros to check the presence of generic (non-typed) symbols. +dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com> +dnl Copyright (c) 2006-2007 xine project +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +dnl 02110-1301, USA. +dnl +dnl As a special exception, the copyright owners of the +dnl macro gives unlimited permission to copy, distribute and modify the +dnl configure scripts that are the output of Autoconf when processing the +dnl Macro. You need not follow the terms of the GNU General Public +dnl License when using or distributing such scripts, even though portions +dnl of the text of the Macro appear in them. The GNU General Public +dnl License (GPL) does govern all other use of the material that +dnl constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the +dnl Autoconf Macro released by this project. When you make and +dnl distribute a modified version of the Autoconf Macro, you may extend +dnl this special exception to the GPL to apply to your modified version as +dnl well. + +AC_DEFUN([CC_CHECK_CFLAGS], [ + AC_CACHE_CHECK([if $CC supports $1 flag], + AS_TR_SH([cc_cv_cflags_$1]), + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_COMPILE_IFELSE([int a;], + [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_cflags_$1])="]) + CFLAGS="$ac_save_CFLAGS" + ]) + + if eval test [x$]AS_TR_SH([cc_cv_cflags_$1]) = xyes; then + ifelse([$2], , [:], [$2]) + else + ifelse([$3], , [:], [$3]) + fi +]) + +dnl Check for a -Werror flag or equivalent. -Werror is the GCC +dnl and ICC flag that tells the compiler to treat all the warnings +dnl as fatal. We usually need this option to make sure that some +dnl constructs (like attributes) are not simply ignored. +dnl +dnl Other compilers don't support -Werror per se, but they support +dnl an equivalent flag: +dnl - Sun Studio compiler supports -errwarn=%all +AC_DEFUN([CC_CHECK_WERROR], [ + AC_CACHE_VAL([cc_cv_werror], + [CC_CHECK_CFLAGS([-Werror], [cc_cv_werror=-Werror], + [CC_CHECK_CFLAGS([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) + ]) +]) AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((constructor))], [cc_cv_attribute_constructor], [AC_COMPILE_IFELSE([ void ctor() __attribute__((constructor)); - void ctor() { }; + void ctor() { int a; }; ], [cc_cv_attribute_constructor=yes], [cc_cv_attribute_constructor=no]) @@ -24,8 +90,9 @@ AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ ]) AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((format(printf, n, n)))], [cc_cv_attribute_format], [AC_COMPILE_IFELSE([ @@ -46,8 +113,9 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ ]) AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((format_arg(printf)))], [cc_cv_attribute_format_arg], [AC_COMPILE_IFELSE([ @@ -68,32 +136,29 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ ]) AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" - AC_CACHE_CHECK([if compiler supports __attribute__((visibility("...")))], - [cc_cv_attribute_visibility], - [AC_COMPILE_IFELSE([ - void __attribute__((visibility("internal"))) internal_function() { } - void __attribute__((visibility("hidden"))) hidden_function() { } - void __attribute__((visibility("default"))) external_function() { } - ], - [cc_cv_attribute_visibility=yes], - [cc_cv_attribute_visibility=no]) - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_attribute_visibility" = "xyes"; then - AC_DEFINE([SUPPORT_ATTRIBUTE_VISIBILITY], 1, [Define this if the compiler supports the visibility attribute]) - $1 - else - true - $2 - fi + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([if $CC supports __attribute__((visibility("$1")))], + AS_TR_SH([cc_cv_attribute_visibility_$1]), + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + AC_COMPILE_IFELSE([void __attribute__((visibility("$1"))) $1_function() { }], + [eval "AS_TR_SH([cc_cv_attribute_visibility_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_attribute_visibility_$1])='no'"]) + CFLAGS="$ac_save_CFLAGS" + ]) + + if eval test [x$]AS_TR_SH([cc_cv_attribute_visibility_$1]) = xyes; then + AC_DEFINE(AS_TR_CPP([SUPPORT_ATTRIBUTE_VISIBILITY_$1]), 1, [Define this if the compiler supports __attribute__((visibility("$1")))]) + ifelse([$2], , [:], [$2]) + else + ifelse([$3], , [:], [$3]) + fi ]) AC_DEFUN([CC_FLAG_VISIBILITY], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports -fvisibility=hidden], [cc_cv_flag_visibility], [ @@ -116,8 +181,9 @@ AC_DEFUN([CC_FLAG_VISIBILITY], [ ]) AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((nonnull()))], [cc_cv_attribute_nonnull], [AC_COMPILE_IFELSE([ @@ -139,8 +205,9 @@ AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ ]) AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((unused))], [cc_cv_attribute_unused], [AC_COMPILE_IFELSE([ @@ -161,8 +228,9 @@ AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ ]) AC_DEFUN([CC_FUNC_EXPECT], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler has __builtin_expect function], [cc_cv_func_expect], [AC_COMPILE_IFELSE([ @@ -187,8 +255,9 @@ AC_DEFUN([CC_FUNC_EXPECT], [ ]) AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((sentinel))], [cc_cv_attribute_sentinel], [AC_COMPILE_IFELSE([ @@ -207,3 +276,49 @@ AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ $2 fi ]) + +AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ + AC_REQUIRE([CC_CHECK_WERROR]) + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + AC_CACHE_CHECK([if compiler supports __attribute__((weak, alias))], + [cc_cv_attribute_alias], + [AC_COMPILE_IFELSE([ + void other_function(void *foo) { } + void some_function(void *foo) __attribute__((weak, alias("other_function"))); + ], + [cc_cv_attribute_alias=yes], + [cc_cv_attribute_alias=no]) + ]) + CFLAGS="$ac_save_CFLAGS" + + if test "x$cc_cv_attribute_alias" = "xyes"; then + AC_DEFINE([SUPPORT_ATTRIBUTE_ALIAS], 1, [Define this if the compiler supports the alias attribute]) + $1 + else + true + $2 + fi +]) + +AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported], + [cc_cv_attribute_aligned], + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + for cc_attribute_align_try in 64 32 16 8 4 2; do + AC_COMPILE_IFELSE([ + int main() { + static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0; + return c; + }], [cc_cv_attribute_aligned=$cc_attribute_align_try; break]) + done + CFLAGS="$ac_save_CFLAGS" + ]) + + if test "x$cc_cv_attribute_aligned" != "x"; then + AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned], + [Define the highest alignment supported]) + fi +]) diff --git a/m4/directx.m4 b/m4/directx.m4 index 11725123f..6d023528e 100644 --- a/m4/directx.m4 +++ b/m4/directx.m4 @@ -11,7 +11,7 @@ dnl DIRECTX_VIDEO_LIBS. dnl AC_DEFUN([AM_PATH_DIRECTX], [ -AC_ARG_WITH(dxheaders, AC_HELP_STRING([--with-dxheaders], [specify location of DirectX headers]), +AC_ARG_WITH(dxheaders, AS_HELP_STRING([--with-dxheaders], [specify location of DirectX headers]), [dxheaders_prefix="$withval"], [dxheaders_prefix="no"] ) @@ -23,8 +23,7 @@ fi AC_MSG_CHECKING(for DirectX) DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw" DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound" -AC_LANG_SAVE() -AC_LANG_C() +AC_LANG_PUSH([C]) ac_save_CPPFLAGS="$CPPFLAGS" ac_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS" @@ -48,7 +47,7 @@ int main() { AC_DEFINE(HAVE_DIRECTX,1,[Define this if you have DirectX])],,) CPPFLAGS=$ac_save_CPPFLAGS LIBS=$ac_save_LIBS -AC_LANG_RESTORE() +AC_LANG_POP([C]) if test x$have_directx = xyes ; then AC_MSG_RESULT(yes) @@ -17,8 +17,7 @@ AC_DEFUN([AM_DL], [ if test x$have_dl != "xyes"; then AC_MSG_CHECKING(for dlopen under win32) - AC_LANG_SAVE() - AC_LANG_C() + AC_LANG_PUSH([C]) ac_save_CPPFLAGS="$CPPFLAGS" ac_save_LIBS="$LIBS" @@ -42,7 +41,7 @@ int main() { CPPFLAGS=$ac_save_CPPFLAGS LIBS=$ac_save_LIBS - AC_LANG_RESTORE() + AC_LANG_POP([C]) fi if test x$have_dl != "xyes"; then diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4 index 9254ca533..0f24080f7 100644 --- a/m4/dvdnav.m4 +++ b/m4/dvdnav.m4 @@ -31,15 +31,17 @@ AC_DEFUN([AM_PATH_DVDNAV], dnl Get the cflags and libraries from the dvdnav-config script dnl AC_ARG_WITH(dvdnav-prefix, - AC_HELP_STRING([--with-dvdnav-prefix=DIR], [prefix where DVDNAV is installed (optional)]), + 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, - AC_HELP_STRING([--with-dvdnav-exec-prefix=DIR], [exec prefix where DVDNAV is installed (optional)]), + 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, - AC_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program]), + AS_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program]), enable_dvdnavtest=$enableval, enable_dvdnavtest=yes) + 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 @@ -80,10 +82,8 @@ dnl dnl Now check if the installed DVDNAV is sufficiently new. (Also sanity dnl checks the results of dvdnav-config to some extent dnl - AC_LANG_SAVE() - AC_LANG_C() rm -f conf.dvdnavtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <dvdnav.h> #include <stdio.h> #include <stdlib.h> @@ -126,11 +126,13 @@ main () } return 1; } -],, no_dvdnav=yes, - AC_TRY_LINK([ +]])],[],[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=yes)) +]], [[ return 0; ]])],[no_dvdnav=''],[no_dvdnav=yes]) + fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -152,10 +154,10 @@ main () echo "*** Could not run DVDNAV test program, checking why..." CFLAGS="$CFLAGS $DVDNAV_CFLAGS" LIBS="$LIBS $DVDNAV_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <dvdnav.h> #include <stdio.h> -], [ return 0; ], +]], [[ 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" @@ -180,6 +182,6 @@ main () fi AC_SUBST(DVDNAV_CFLAGS) AC_SUBST(DVDNAV_LIBS) - AC_LANG_RESTORE() + AC_LANG_POP([C]) rm -f conf.dvdnavtest ]) diff --git a/m4/gas.m4 b/m4/gas.m4 new file mode 100644 index 000000000..923c3f90c --- /dev/null +++ b/m4/gas.m4 @@ -0,0 +1,120 @@ +dnl Copyright 2007 xine project +dnl Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 +dnl Free Software Foundation, Inc. +dnl Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 +dnl +dnl This file is free software; the Free Software Foundation gives +dnl unlimited permission to copy and/or distribute it, with or without +dnl modifications, as long as this notice is preserved. + +dnl AC_PROG_AS +dnl ---------- +dnl find the pathname to the GNU or non-GNU assembler +AC_DEFUN([CC_PROG_AS], +[AC_ARG_WITH([gnu-as], + [AS_HELP_STRING([--with-gnu-as], + [assume the C compiler uses GNU as @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_as=yes], + [with_gnu_as=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +cc_prog=as +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=as gives a path. + AC_MSG_CHECKING([for as used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=as) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=as) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of as + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$AS" && AS="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=as + ;; + *) + # If it is relative, then search for the first as in PATH. + with_gnu_as=unknown + ;; + esac +elif test "$with_gnu_as" = yes; then + AC_MSG_CHECKING([for GNU as]) +else + AC_MSG_CHECKING([for non-GNU as]) +fi +AC_CACHE_VAL(cc_cv_path_AS, +[if test -z "$AS"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_AS="$ac_dir/$ac_prog" + # Check to see if the program is GNU as. I'd rather use --version, + # but apparently some variants of GNU as only accept -v. + # Break only if it was the GNU/non-GNU as that we prefer. + case `"$cc_cv_path_AS" -v 2>&1 </dev/null` in + dnl Apple's assembler reports itself as GNU as 1.38; + dnl but it doesn't provide the functions we need. + *Apple*) + test "$with_gnu_as" != yes && break + ;; + *GNU* | *'with BFD'*) + test "$with_gnu_as" != no && break + ;; + *) + test "$with_gnu_as" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + cc_cv_path_AS="$AS" # Let the user override the test with a path. +fi]) +AS="$cc_cv_path_AS" +if test -n "$AS"; then + AC_MSG_RESULT($AS) +else + AC_MSG_RESULT(no) +fi +test -z "$AS" && AC_MSG_ERROR([no acceptable as found in \$PATH]) +CC_PROG_AS_GNU +]) + + +dnl AC_PROG_AS_GNU +dnl -------------- +AC_DEFUN([CC_PROG_AS_GNU], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_CACHE_CHECK([if the assembler ($AS) is GNU as], cc_cv_prog_gnu_as, +[# I'd rather use --version here, but apparently some GNU as's only accept -v. +case `$AS -v 2>&1 </dev/null` in +dnl Apple's assembler reports itself as GNU as 1.38; +dnl but it doesn't provide the functions we need. +*Apple*) + cc_cv_prog_gnu_as=no + ;; +*GNU* | *'with BFD'*) + cc_cv_prog_gnu_as=yes + ;; +*) + cc_cv_prog_gnu_as=no + ;; +esac]) +with_gnu_as=$cc_cv_prog_gnu_as +]) diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4 new file mode 100644 index 000000000..c6d12258e --- /dev/null +++ b/m4/ioctl_request.m4 @@ -0,0 +1,52 @@ +dnl Simple macro to find the type of the ioctl request parameter +dnl Copyright (c) 2007 xine project +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +dnl 02110-1301, USA. +dnl +dnl As a special exception, the xine project, as copyright owner of the +dnl macro gives unlimited permission to copy, distribute and modify the +dnl configure scripts that are the output of Autoconf when processing the +dnl Macro. You need not follow the terms of the GNU General Public +dnl License when using or distributing such scripts, even though portions +dnl of the text of the Macro appear in them. The GNU General Public +dnl License (GPL) does govern all other use of the material that +dnl constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the +dnl Autoconf Macro released by the xine project. When you make and +dnl distribute a modified version of the Autoconf Macro, you may extend +dnl this special exception to the GPL to apply to your modified version as +dnl well. + + +dnl Usage AC_IOCTL_REQUEST +AC_DEFUN([AC_IOCTL_REQUEST], [ + AC_CACHE_CHECK([type of request parameter for ioctl()], + ac_cv_ioctl_request, + [for ac_ioctl_request_type in "unsigned long" "int" + do + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include <sys/ioctl.h> + int ioctl(int fd, $ac_ioctl_request_type request, ...); + ]], [[]])],[ac_cv_ioctl_request=$ac_ioctl_request_type],[]) + done]) + + if test "x$ac_cv_ioctl_request" = "x"; then + AC_MSG_ERROR([Unable to determine the type for ioctl() request parameter]) + fi + + AC_DEFINE_UNQUOTED([IOCTL_REQUEST_TYPE], $ac_cv_ioctl_request, [Type of the request parameter for ioctl()]) +]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 0d895ca63..e0736ce1c 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -9,7 +9,7 @@ dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. -ifdef([AC_HELP_STRING], +ifdef([AS_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) diff --git a/m4/libFLAC.m4 b/m4/libFLAC.m4 index 26b4beba1..9ecf8dd51 100644 --- a/m4/libFLAC.m4 +++ b/m4/libFLAC.m4 @@ -8,10 +8,10 @@ AC_DEFUN([AM_PATH_LIBFLAC], [dnl dnl Get the cflags and libraries dnl -AC_ARG_WITH(libFLAC-prefix, AC_HELP_STRING([--with-libFLAC-prefix=DIR], [prefix where libFLAC is installed (optional)]), libFLAC_prefix="$withval", libFLAC_prefix="") -AC_ARG_WITH(libFLAC-libraries, AC_HELP_STRING([--with-libFLAC-libraries=DIR], [directory where libFLAC library is installed (optional)]), libFLAC_libraries="$withval", libFLAC_libraries="") -AC_ARG_WITH(libFLAC-includes, AC_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)]), libFLAC_includes="$withval", libFLAC_includes="") -AC_ARG_ENABLE(libFLACtest, AC_HELP_STRING([--disable-libFLACtest], [do not try to compile and run a test libFLAC program]), enable_libFLACtest=$enableval, enable_libFLACtest=yes) +AC_ARG_WITH(libFLAC-prefix, AS_HELP_STRING([--with-libFLAC-prefix=DIR], [prefix where libFLAC is installed (optional)]), libFLAC_prefix="$withval", libFLAC_prefix="") +AC_ARG_WITH(libFLAC-libraries, AS_HELP_STRING([--with-libFLAC-libraries=DIR], [directory where libFLAC library is installed (optional)]), libFLAC_libraries="$withval", libFLAC_libraries="") +AC_ARG_WITH(libFLAC-includes, AS_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)]), libFLAC_includes="$withval", libFLAC_includes="") +AC_ARG_ENABLE(libFLACtest, AS_HELP_STRING([--disable-libFLACtest], [do not try to compile and run a test libFLAC program]), enable_libFLACtest=$enableval, enable_libFLACtest=yes) if test "x$libFLAC_libraries" != "x" ; then LIBFLAC_LIBS="-L$libFLAC_libraries" @@ -46,7 +46,7 @@ dnl dnl Now check if the installed libFLAC is sufficiently new. dnl rm -f conf.libFLACtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -58,11 +58,13 @@ int main () return 0; } -],, no_libFLAC=yes, - AC_TRY_LINK([ +]])],[],[no_libFLAC=yes],[no_libFLAC=cc]) + if test "x$no_libFLAC" = xcc; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <FLAC/format.h> -], [ return 0; ],, no_libFLAC=yes)) +]], [[ return 0; ]])],[no_libFLAC=''],[no_libFLAC=yes]) + fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -78,11 +80,11 @@ int main () echo "*** Could not run libFLAC test program, checking why..." CFLAGS="$CFLAGS $LIBFLAC_CFLAGS" LIBS="$LIBS $LIBFLAC_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <FLAC/format.h> -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])], + [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libFLAC or finding the wrong" echo "*** version of libFLAC. If it is not finding libFLAC, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -91,7 +93,7 @@ int main () 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 "*** The test program failed to compile or link. See the file config.log for the" + [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means libFLAC was incorrectly installed" echo "*** or that you have moved libFLAC since it was installed. In the latter case, you" echo "*** may want to edit the libFLAC-config script: $LIBFLAC_CONFIG" ]) diff --git a/m4/libfame.m4 b/m4/libfame.m4 index b6a14ed34..5fc34cc56 100644 --- a/m4/libfame.m4 +++ b/m4/libfame.m4 @@ -7,11 +7,11 @@ AC_DEFUN([AM_PATH_LIBFAME], [dnl dnl Get the cflags and libraries from the libfame-config script dnl -AC_ARG_WITH(libfame-prefix, AC_HELP_STRING([--with-libfame-prefix=DIR], [prefix where libfame is installed (optional)]), +AC_ARG_WITH(libfame-prefix, AS_HELP_STRING([--with-libfame-prefix=DIR], [prefix where libfame is installed (optional)]), libfame_config_prefix="$withval", libfame_config_prefix="") -AC_ARG_WITH(libfame-exec-prefix, AC_HELP_STRING([--with-libfame-exec-prefix=DIR], [exec prefix where libfame is installed (optional)]), +AC_ARG_WITH(libfame-exec-prefix, AS_HELP_STRING([--with-libfame-exec-prefix=DIR], [exec prefix where libfame is installed (optional)]), libfame_config_exec_prefix="$withval", libfame_config_exec_prefix="") -AC_ARG_ENABLE(libfametest, AC_HELP_STRING([--disable-libfametest], [do not try to compile and run a test libfame program]), +AC_ARG_ENABLE(libfametest, AS_HELP_STRING([--disable-libfametest], [do not try to compile and run a test libfame program]), enable_libfametest=$enableval, enable_libfametest=yes) if test x$libfame_config_exec_prefix != x ; then diff --git a/m4/libtool15.m4 b/m4/libtool15.m4 index 189cddb25..1f0567787 100644 --- a/m4/libtool15.m4 +++ b/m4/libtool15.m4 @@ -201,12 +201,12 @@ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) @@ -464,7 +464,7 @@ AC_SUBST(ECHO) # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes @@ -1700,7 +1700,7 @@ test "$dynamic_linker" = no && can_build_shared=no # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [AS_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -1820,7 +1820,7 @@ AC_DEFUN([AC_LIBTOOL_WIN32_DLL], AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in @@ -1859,7 +1859,7 @@ AC_ENABLE_SHARED(no) AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in @@ -1898,7 +1898,7 @@ AC_ENABLE_STATIC(no) AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in @@ -2038,7 +2038,7 @@ fi # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) diff --git a/m4/opengl.m4 b/m4/opengl.m4 index 82534be91..2c12949d9 100644 --- a/m4/opengl.m4 +++ b/m4/opengl.m4 @@ -6,11 +6,11 @@ dnl AC_DEFUN([AM_PATH_OPENGL], [ - AC_ARG_ENABLE(opengl, AC_HELP_STRING([--disable-opengl], [do not build OpenGL plugin]), + AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], [do not build OpenGL plugin]), [enableopengl=$enableval], [enableopengl="yes"] ) - AC_ARG_ENABLE(glu, AC_HELP_STRING([--disable-glu], [build OpenGL plugin without GLU (no verbose errors)]), + AC_ARG_ENABLE(glu, AS_HELP_STRING([--disable-glu], [build OpenGL plugin without GLU (no verbose errors)]), [enableglu=$enableval], [enableglu="yes"] ) @@ -32,9 +32,8 @@ AC_DEFUN([AM_PATH_OPENGL], [ [AC_MSG_CHECKING([if GLU is sane]) ac_save_LIBS="$LIBS" LIBS="$X_LIBS $XPRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS" - AC_TRY_LINK([#include <GL/gl.h> -#include <GL/glu.h>], - [ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/gl.h> +#include <GL/glu.h>]], [[ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ]])], [ ac_have_glu="yes" GLU_LIBS="-lGLU" AC_DEFINE(HAVE_GLU,1,[Define this if you have GLU support available]) diff --git a/m4/optimizations.m4 b/m4/optimizations.m4 index 85d088079..a1f2f2f00 100644 --- a/m4/optimizations.m4 +++ b/m4/optimizations.m4 @@ -9,7 +9,7 @@ dnl AC_DEFUN([AC_OPTIMIZATIONS], [ AC_ARG_ENABLE([optimizations], - AC_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable])) + AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable])) if test "x$enable_optimizations" != "xno"; then INLINE_FUNCTIONS=-finline-functions @@ -17,11 +17,6 @@ AC_DEFUN([AC_OPTIMIZATIONS], [ if test "$GCC" = yes; then dnl dnl check cflags not supported by all gcc versions - dnl eg: -mpreferred-stack-boundary=2 and 2.91.66, - dnl and gcc-2.7.2.3 support a bit less options - dnl - AC_TRY_CFLAGS("-mpreferred-stack-boundary=2", - m_psb="-mpreferred-stack-boundary=2", m_psb="") AC_TRY_CFLAGS("-fschedule-insns2", f_si="-fschedule-insns2", f_si="") AC_TRY_CFLAGS("-mwide-multiply", m_wm="-mwide-multiply", m_wm="") dnl @@ -58,7 +53,7 @@ AC_DEFUN([AC_OPTIMIZATIONS], [ AC_MSG_CHECKING(for sane -Wpointer-arith) SAVE_CFLAGS="$CFLAGS" CFLAGS="-O2 -Wpointer-arith -Werror $CFLAGS" - AC_TRY_COMPILE([#include <string.h>],[int a; memset(&a, 0, sizeof(int));], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int));]])], [AC_MSG_RESULT(yes); CFLAGS="-Wpointer-arith $SAVE_CFLAGS"], [AC_MSG_RESULT(no); CFLAGS="$SAVE_CFLAGS"]); @@ -67,8 +62,7 @@ AC_DEFUN([AC_OPTIMIZATIONS], [ AC_MSG_CHECKING(for gcc 3.4.0 or later) newGCC="`"$CC" -dumpversion | - awk 'BEGIN { FS = "." }; - 1 { if ((@S|@1 * 10000 + @S|@2 * 100 + @S|@3) >= 30400) { print "yes" } }' + awk -F. '{ if ((@S|@1 * 10000 + @S|@2 * 100 + @S|@3) >= 30400) { print "yes" } }' `" AC_MSG_RESULT(${newGCC:-no - assuming bugginess in -finline-functions}) test "$newGCC" = yes || INLINE_FUNCTIONS=-fno-inline-functions diff --git a/m4/pthreads.m4 b/m4/pthreads.m4 new file mode 100644 index 000000000..28d72dd4f --- /dev/null +++ b/m4/pthreads.m4 @@ -0,0 +1,59 @@ +dnl Detection of the Pthread implementation flags and libraries +dnl Diego Pettenò <flameeyes-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> 2006-11-03 +dnl +dnl CC_PTHREAD_FLAGS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl This macro checks for the Pthread flags to use to build +dnl with support for PTHREAD_LIBS and PTHREAD_CFLAGS variables +dnl used in FreeBSD ports. +dnl +dnl This macro is released as public domain, but please mail +dnl to flameeyes@gmail.com if you want to add support for a +dnl new case, or if you're going to use it, so that there will +dnl always be a version available. +AC_DEFUN([CC_PTHREAD_FLAGS], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_ARG_VAR([PTHREAD_CFLAGS], [C compiler flags for Pthread support]) + AC_ARG_VAR([PTHREAD_LIBS], [linker flags for Pthread support]) + + dnl if PTHREAD_* are not set, default to -pthread (GCC) + if test "${PTHREAD_CFLAGS-unset}" = "unset"; then + case $host in + *-hpux11*) PTHREAD_CFLAGS="" ;; + *-darwin*) PTHREAD_CFLAGS="" ;; + *) PTHREAD_CFLAGS="-pthread" ;; + esac + fi + if test "${PTHREAD_LIBS-unset}" = "unset"; then + case $host in + *-hpux11*) PTHREAD_LIBS="-lpthread" ;; + *-darwin*) PTHREAD_LIBS="" ;; + *) PTHREAD_LIBS="-pthread" ;; + esac + fi + + AC_CACHE_CHECK([if $CC supports Pthread], + AS_TR_SH([cc_cv_pthreads]), + [ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $cc_cv_werror $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <pthread.h>]], + [[pthread_create(NULL, NULL, NULL, NULL);]] + )], + [cc_cv_pthreads=yes], + [cc_cv_pthreads=no]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + ]) + + AC_SUBST([PTHREAD_LIBS]) + AC_SUBST([PTHREAD_CFLAGS]) + + if test x$cc_cv_pthreads = xyes; then + ifelse([$1], , [:], [$1]) + else + ifelse([$2], , [:], [$2]) + fi +]) diff --git a/m4/symbol.m4 b/m4/symbol.m4 new file mode 100644 index 000000000..7f807f1b1 --- /dev/null +++ b/m4/symbol.m4 @@ -0,0 +1,86 @@ +dnl Macros to check the presence of generic (non-typed) symbols. +dnl Copyright (c) 2007 xine project +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +dnl 02110-1301, USA. +dnl +dnl As a special exception, the xine project, as copyright owner of the +dnl macro gives unlimited permission to copy, distribute and modify the +dnl configure scripts that are the output of Autoconf when processing the +dnl Macro. You need not follow the terms of the GNU General Public +dnl License when using or distributing such scripts, even though portions +dnl of the text of the Macro appear in them. The GNU General Public +dnl License (GPL) does govern all other use of the material that +dnl constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the +dnl Autoconf Macro released by the xine project. When you make and +dnl distribute a modified version of the Autoconf Macro, you may extend +dnl this special exception to the GPL to apply to your modified version as +dnl well. + +dnl AC_CHECK_SYMBOL - Check for a single symbol +dnl Usage: AC_CHECK_SYMBOL([symbol], [action-if-found], [action-if-not-found]) +dnl Default action, defines HAVE_SYMBOL (with symbol capitalised) if the +dnl symbol is present at link time. +AC_DEFUN([AC_CHECK_SYMBOL], [ + AC_CACHE_CHECK([for $1 symbol presence], + AS_TR_SH([ac_cv_symbol_$1]), + [AC_TRY_LINK([extern void *$1;], [void *tmp = $1;], + [eval "AS_TR_SH([ac_cv_symbol_$1])=yes"], + [eval "AS_TR_SH([ac_cv_symbol_$1])=no"]) + ]) + + if eval test [x$]AS_TR_SH([ac_cv_symbol_$1]) = xyes; then + ifelse([$2], , [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], + [Define to 1 if you have the $1 symbol.])], [$2]) + else + ifelse([$3], , [:], [$3]) + fi +]) + +dnl AC_CHECK_SYMBOLS - Check for multiple symbols +dnl Usage: AC_CHECK_SYMBOLS([symbol1 symbol2], [action-if-found], [action-if-not-found]) +AC_DEFUN([AC_CHECK_SYMBOLS], [ + AH_CHECK_SYMBOLS([$1]) + + for ac_symbol in $1 + do + AC_CHECK_SYMBOL($ac_symbol, [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$ac_symbol])) $2], [$3]) + done +]) + +m4_ifdef([m4_foreach_w], [], [ + # m4_foreach_w(VARIABLE, LIST, EXPRESSION) + # ---------------------------------------- + # + # Like m4_foreach, but the list is whitespace separated. + # + # This macro is robust to active symbols: + # m4_foreach_w([Var], [ active + # b act\ + # ive ], [-Var-])end + # => -active--b--active-end + # + m4_define([m4_foreach_w], + [m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])]) + m4_define([m4_foreach_w_is_compatibility]) +]) + +m4_define([AH_CHECK_SYMBOLS], [ + m4_foreach_w([AC_Symbol], [$1], + [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([AC_Symbol])), + [Define to 1 if you have the ]m4_defn([AC_Symbol])[ symbol.])]) +]) diff --git a/m4/xine.m4 b/m4/xine.m4 index 1b21bbbab..cb64bad1a 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -31,15 +31,17 @@ AC_DEFUN([AM_PATH_XINE], dnl Get the cflags and libraries from the xine-config script dnl AC_ARG_WITH(xine-prefix, - AC_HELP_STRING([--with-xine-prefix=DIR], [prefix where XINE is installed (optional)]), + AS_HELP_STRING([--with-xine-prefix=DIR], [prefix where XINE is installed (optional)]), xine_config_prefix="$withval", xine_config_prefix="") AC_ARG_WITH(xine-exec-prefix, - AC_HELP_STRING([--with-xine-exec-prefix=DIR], [exec prefix where XINE is installed (optional)]), + AS_HELP_STRING([--with-xine-exec-prefix=DIR], [exec prefix where XINE is installed (optional)]), xine_config_exec_prefix="$withval", xine_config_exec_prefix="") AC_ARG_ENABLE(xinetest, - AC_HELP_STRING([--disable-xinetest], [do not try to compile and run a test XINE program]), + AS_HELP_STRING([--disable-xinetest], [do not try to compile and run a test XINE program]), enable_xinetest=$enableval, enable_xinetest=yes) + AC_LANG_PUSH([C]) + if test x$xine_config_exec_prefix != x ; then xine_config_args="$xine_config_args --exec-prefix=$xine_config_exec_prefix" if test x${XINE_CONFIG+set} != xset ; then @@ -85,10 +87,8 @@ dnl dnl Now check if the installed XINE is sufficiently new. (Also sanity dnl checks the results of xine-config to some extent dnl - AC_LANG_SAVE() - AC_LANG_C() rm -f conf.xinetest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <xine.h> #include <stdio.h> #include <stdlib.h> @@ -153,7 +153,7 @@ main () } return 1; } -],, no_xine=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_xine=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -175,10 +175,10 @@ main () echo "*** Could not run XINE test program, checking why..." CFLAGS="$CFLAGS $XINE_CFLAGS" LIBS="$LIBS $XINE_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <xine.h> #include <stdio.h> -], [ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ], +]], [[ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding XINE or finding the wrong" echo "*** version of XINE. If it is not finding XINE, you'll need to set your" @@ -204,7 +204,7 @@ main () AC_SUBST(XINE_CFLAGS) AC_SUBST(XINE_LIBS) AC_SUBST(XINE_ACFLAGS) - AC_LANG_RESTORE() + AC_LANG_POP([C]) rm -f conf.xinetest dnl Make sure HAVE_STRSEP, HAVE_SETENV and HAVE_STRPBRK are defined as |