From f8285ecbb874d9bd167a38640b3d264b3569a427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 18:45:15 +0000 Subject: Add AC_TRY_LDFLAGS macro similarly to AC_TRY_CFLAGS. CVS patchset: 8453 CVS date: 2006/12/25 18:45:15 --- m4/_xine.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'm4') diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 60baed8c1..8ff2d67ca 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -175,6 +175,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_TRY_LINK([],[],[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 -- cgit v1.2.3 From 8ffd2c737b116f21998061d5c5da1149f1540b18 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 6 Jan 2007 17:31:55 +0000 Subject: Use AM_PROG_AS instead of our AM_PROG_AS_MOD. CVS patchset: 8489 CVS date: 2007/01/06 17:31:55 --- m4/as.m4 | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 m4/as.m4 (limited to 'm4') 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 - -# 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)]) -- cgit v1.2.3 From d02264be75ec5931d4092bc73609c3399cc3ad63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 9 Jan 2007 22:18:41 +0000 Subject: As as.m4 was removed, remove its reference. CVS patchset: 8495 CVS date: 2007/01/09 22:18:41 --- m4/Makefile.am | 1 - 1 file changed, 1 deletion(-) (limited to 'm4') diff --git a/m4/Makefile.am b/m4/Makefile.am index 2236e9bfc..8f6fcc85d 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 \ -- cgit v1.2.3 From a3e529f7c29ead544ca927fa4593f57c9331f624 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 18 Feb 2007 08:46:43 +0000 Subject: Don't disable stack-alignment anymore, as discussed in private mail with Miguel Freitas on 17 Feb CVS patchset: 8598 CVS date: 2007/02/18 08:46:43 --- m4/optimizations.m4 | 5 ----- 1 file changed, 5 deletions(-) (limited to 'm4') diff --git a/m4/optimizations.m4 b/m4/optimizations.m4 index 85d088079..ac0bebdf6 100644 --- a/m4/optimizations.m4 +++ b/m4/optimizations.m4 @@ -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 -- cgit v1.2.3 From b8c4d119e2546cd2b52c69fc46e7752bedd93447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 9 Mar 2007 23:43:33 +0000 Subject: Use a simpler and more portable awk command. Patch by Albert Lee. CVS patchset: 8647 CVS date: 2007/03/09 23:43:33 --- m4/optimizations.m4 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'm4') diff --git a/m4/optimizations.m4 b/m4/optimizations.m4 index ac0bebdf6..323b57509 100644 --- a/m4/optimizations.m4 +++ b/m4/optimizations.m4 @@ -62,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 -- cgit v1.2.3 From fd70a41ac6df0c3c19458cd9fb9ebcc5c54b8c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 16 Mar 2007 20:12:41 +0000 Subject: Add a check if the compiler supports weak aliases, to add FreeBSD support to Real codecs. CVS patchset: 8680 CVS date: 2007/03/16 20:12:41 --- m4/attributes.m4 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 10 deletions(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index fa00a95f8..a83390006 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -1,13 +1,42 @@ # Functions to check for attributes support in compiler +AC_DEFUN([CC_CHECK_CFLAGS], [ + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_MSG_CHECKING([if compiler supports $1]) + AC_COMPILE_IFELSE([int a;], + [cc_check_cflags=yes], + [cc_check_cflags=no]) + AC_MSG_RESULT([$cc_check_cflags]) + CFLAGS="$ac_save_CFLAGS" + + if test "x$cc_check_cflags" = "xyes"; then + true + $2 + else + true + $3 + fi +]) + +AC_DEFUN([CC_CHECK_WERROR], [ + CC_CHECK_CFLAGS([-Werror], [werror=-Werror]) + + dnl This is for SUN Studio compiler + if test "x$werror" = "x"; then + CC_CHECK_CFLAGS([-errwarn=%all], [werror=-errwarn=%all]) + fi +]) + AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $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 +53,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 $werror" AC_CACHE_CHECK([if compiler supports __attribute__((format(printf, n, n)))], [cc_cv_attribute_format], [AC_COMPILE_IFELSE([ @@ -46,8 +76,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 $werror" AC_CACHE_CHECK([if compiler supports __attribute__((format_arg(printf)))], [cc_cv_attribute_format_arg], [AC_COMPILE_IFELSE([ @@ -68,8 +99,9 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ ]) AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $werror" AC_CACHE_CHECK([if compiler supports __attribute__((visibility("...")))], [cc_cv_attribute_visibility], [AC_COMPILE_IFELSE([ @@ -92,8 +124,9 @@ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ ]) AC_DEFUN([CC_FLAG_VISIBILITY], [ + AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + CFLAGS="$CFLAGS $werror" AC_CACHE_CHECK([if compiler supports -fvisibility=hidden], [cc_cv_flag_visibility], [ @@ -116,8 +149,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 $werror" AC_CACHE_CHECK([if compiler supports __attribute__((nonnull()))], [cc_cv_attribute_nonnull], [AC_COMPILE_IFELSE([ @@ -139,8 +173,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 $werror" AC_CACHE_CHECK([if compiler supports __attribute__((unused))], [cc_cv_attribute_unused], [AC_COMPILE_IFELSE([ @@ -161,8 +196,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 $werror" AC_CACHE_CHECK([if compiler has __builtin_expect function], [cc_cv_func_expect], [AC_COMPILE_IFELSE([ @@ -187,8 +223,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 $werror" AC_CACHE_CHECK([if compiler supports __attribute__((sentinel))], [cc_cv_attribute_sentinel], [AC_COMPILE_IFELSE([ @@ -207,3 +244,27 @@ AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ $2 fi ]) + +AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ + AC_REQUIRE([CC_CHECK_WERROR]) + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $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 +]) -- cgit v1.2.3 From 75fd3688f52f3d9574cf7204fd74c9eb9f2a639b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 17 Mar 2007 06:11:30 +0000 Subject: Instead of relying on FreeBSD being the only system not having __environ stderr ___brk_addr and __ctype_b, look for them during ./configure stage. Also check for alternatives, and check for compiler's weak aliasing support only if it's actually going to be used. CVS patchset: 8696 CVS date: 2007/03/17 06:11:30 --- m4/symbol.m4 | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 m4/symbol.m4 (limited to 'm4') diff --git a/m4/symbol.m4 b/m4/symbol.m4 new file mode 100644 index 000000000..cb31e193b --- /dev/null +++ b/m4/symbol.m4 @@ -0,0 +1,65 @@ +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"]) + ]) + + ifelse([$2], , [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if you have the $1 symbol.])], [$2]) + ifelse([$3], , , [$3]) +]) + +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_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.])]) +]) \ No newline at end of file -- cgit v1.2.3 From 2fa61afb4e8d575c3d5facf4072e91187945e163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 17 Mar 2007 06:59:31 +0000 Subject: Clean up configure checks for OSS support. Check for the various soundcard.h headers, and then include the best one that has been found on the system. Check for definition of SNDCTL_DSP_SETFRAGMENT in those headers. Check for the correct request parameter type for ioctl(), as also modern Linux uses unsigned long. Don't list all the big endian machines (as they aren't reliable to list anyway, some of them might work with both endians), use WORDS_BIGENDIAN instead. CVS patchset: 8697 CVS date: 2007/03/17 06:59:31 --- m4/ioctl_request.m4 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 m4/ioctl_request.m4 (limited to 'm4') diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4 new file mode 100644 index 000000000..e5ea6d346 --- /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_TRY_LINK([ + #include + 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()]) +]) -- cgit v1.2.3 From a383eb27251b702bd8c73c3e8de84403be766506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 17 Mar 2007 07:25:37 +0000 Subject: Fix obvious and stupid mistake in the symbol check, both if-found and if-not-found conditions were going to be executed, always. CVS patchset: 8698 CVS date: 2007/03/17 07:25:37 --- m4/symbol.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'm4') diff --git a/m4/symbol.m4 b/m4/symbol.m4 index cb31e193b..fc8c8eede 100644 --- a/m4/symbol.m4 +++ b/m4/symbol.m4 @@ -43,8 +43,12 @@ AC_DEFUN([AC_CHECK_SYMBOL], [ [eval "AS_TR_SH([ac_cv_symbol_$1])=no"]) ]) - ifelse([$2], , [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if you have the $1 symbol.])], [$2]) - ifelse([$3], , , [$3]) + 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 -- cgit v1.2.3 From fc8fdee1f919c01000b209b1bc3d201557df9bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 19 Mar 2007 23:02:16 +0000 Subject: Rewrite the CC_CHECK_CFLAGS macro, to be more in style with Autoconf macros, and cache the value. Rewrite also CC_CHECK_WERROR, caching there too. Rename the final variable with the werror flag ($werror -> $cc_cv_werror). CVS patchset: 8714 CVS date: 2007/03/19 23:02:16 --- m4/attributes.m4 | 103 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 33 deletions(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index a83390006..b6118433d 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -1,37 +1,74 @@ -# 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ò +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_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - AC_MSG_CHECKING([if compiler supports $1]) - AC_COMPILE_IFELSE([int a;], - [cc_check_cflags=yes], - [cc_check_cflags=no]) - AC_MSG_RESULT([$cc_check_cflags]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_check_cflags" = "xyes"; then - true - $2 - else - true - $3 - fi + AC_CACHE_CHECK([if compiler 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], [ - CC_CHECK_CFLAGS([-Werror], [werror=-Werror]) - - dnl This is for SUN Studio compiler - if test "x$werror" = "x"; then - CC_CHECK_CFLAGS([-errwarn=%all], [werror=-errwarn=%all]) - fi + 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([ @@ -55,7 +92,7 @@ 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([ @@ -78,7 +115,7 @@ 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([ @@ -101,7 +138,7 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((visibility("...")))], [cc_cv_attribute_visibility], [AC_COMPILE_IFELSE([ @@ -126,7 +163,7 @@ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ 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], [ @@ -151,7 +188,7 @@ 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([ @@ -175,7 +212,7 @@ 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([ @@ -198,7 +235,7 @@ 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([ @@ -225,7 +262,7 @@ 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([ @@ -248,7 +285,7 @@ AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ AC_REQUIRE([CC_CHECK_WERROR]) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $werror" + CFLAGS="$CFLAGS $cc_cv_werror" AC_CACHE_CHECK([if compiler supports __attribute__((weak, alias))], [cc_cv_attribute_alias], [AC_COMPILE_IFELSE([ -- cgit v1.2.3 From 2ad41962c799c787b195aa90a26b4c9b32c3a7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 19 Mar 2007 23:41:49 +0000 Subject: Make CC_CHECK_CFLAGS report the name of the compiler, like AC_TRY_CFLAGS used to. CVS patchset: 8722 CVS date: 2007/03/19 23:41:49 --- m4/attributes.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index b6118433d..28e2e5839 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -33,7 +33,7 @@ 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 compiler supports $1 flag], + AC_CACHE_CHECK([if $CC supports $1 flag], AS_TR_SH([cc_cv_cflags_$1]), [ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" -- cgit v1.2.3 From e87c7e045dd5a8fe64a6f70d3195b174513deed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 20 Mar 2007 00:30:55 +0000 Subject: The AC_C_ATTRIBUTE_ALIGNED macro is broken, it always reports maximum aligned available as 64 even on Darwin where the maximum is 16, as it does not use -Werror, and the wrong alignment is considered only a warning. Rewrite it as CC_ATTRIBUTE_ALIGNED (in attributes.m4, where other similar macros are located). Also reverse the order of the checks, so that the highest version is tried first; this way you can avoid five compile tests on systems where 64 is the highest alignment available. CVS patchset: 8726 CVS date: 2007/03/20 00:30:55 --- m4/_xine.m4 | 18 ------------------ m4/attributes.m4 | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 18 deletions(-) (limited to 'm4') diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 8ff2d67ca..630758298 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -142,24 +142,6 @@ 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], diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 28e2e5839..2d52cebc4 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -305,3 +305,25 @@ AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ $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 +]) -- cgit v1.2.3 From 62b1bb0c213c37b58e5a7bb8359f41168c34f817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 20:44:58 +0000 Subject: Fix crosscompile to use build and host definition from autoconf, rather than using hacksaround. Also replace the whole pthread check with an improved macro originally written for XCB, this way it's not going to try linking the fake -lpthread on Darwin, and it also does not force a -I/usr/local/include on FreeBSD. The new macro respects the same variables set by ports, so that it's even more transparent to FreeBSD users. CVS patchset: 8739 CVS date: 2007/03/22 20:44:58 --- m4/Makefile.am | 3 ++- m4/pthreads.m4 | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 m4/pthreads.m4 (limited to 'm4') diff --git a/m4/Makefile.am b/m4/Makefile.am index 8f6fcc85d..d78fb6a88 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -31,4 +31,5 @@ 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 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ò 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_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 +]) -- cgit v1.2.3 From 37d08eb442b9bc48459b089a8abccba6f3e28ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 22:31:48 +0000 Subject: Move handling of Win32 codecs all in a single point of configure.ac rather than split in two. Check for GNU as (macro adapted from libtool's check for GNU ld), as for instance Apple's assembler is not going to compile the Win32 wrappers. When GNU as is not found and user hasn't requested win32 codecs support explicitely, skip over it; if user requested win32 codecs and GNU as is not found, bail out. CVS patchset: 8740 CVS date: 2007/03/22 22:31:48 --- m4/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/Makefile.am b/m4/Makefile.am index d78fb6a88..3a5209dc3 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -32,4 +32,5 @@ EXTRA_DIST = glibc2.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-p xine.m4 \ _xine.m4 \ xv.m4 \ - pthreads.m4 + pthreads.m4 \ + gas.m4 -- cgit v1.2.3 From 47361c6f2681b09009a4ec07e36149047a99b3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 Mar 2007 22:34:28 +0000 Subject: Add the gas.m4 macro file, at least :) CVS patchset: 8741 CVS date: 2007/03/22 22:34:28 --- m4/gas.m4 | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 m4/gas.m4 (limited to 'm4') diff --git a/m4/gas.m4 b/m4/gas.m4 new file mode 100644 index 000000000..925c99092 --- /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 , 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], + [AC_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([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 &1 Date: Sat, 24 Mar 2007 02:36:52 +0000 Subject: Improve tests for visibility attribute support; Mach-O supports default visibility but not protected (as the default is actually kinda like protected), thanks to Matt Messier in bug #1686194 for pointing me at that. CVS patchset: 8744 CVS date: 2007/03/24 02:36:52 --- m4/attributes.m4 | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 2d52cebc4..1901cc2c8 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -136,28 +136,23 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ ]) AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_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]); 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], [ -- cgit v1.2.3 From 386f722f1312fb6297fc7a3cd9b85446b55c0330 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 26 Mar 2007 14:21:10 +0000 Subject: Use AS_HELP_STRING instead of the deprecated AC_HELP_STRING. CVS patchset: 8751 CVS date: 2007/03/26 14:21:10 --- m4/_xine.m4 | 6 +++--- m4/aa.m4 | 6 +++--- m4/arts.m4 | 4 ++-- m4/directx.m4 | 2 +- m4/dvdnav.m4 | 6 +++--- m4/gas.m4 | 2 +- m4/lib-prefix.m4 | 2 +- m4/libFLAC.m4 | 8 ++++---- m4/libfame.m4 | 6 +++--- m4/libtool15.m4 | 16 ++++++++-------- m4/opengl.m4 | 4 ++-- m4/optimizations.m4 | 2 +- m4/xine.m4 | 6 +++--- 13 files changed, 35 insertions(+), 35 deletions(-) (limited to 'm4') diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 630758298..9acb0f37d 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -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 diff --git a/m4/aa.m4 b/m4/aa.m4 index 319bf79b9..c79738053 100644 --- a/m4/aa.m4 +++ b/m4/aa.m4 @@ -39,13 +39,13 @@ 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) if test x$aalib_config_exec_prefix != x ; then diff --git a/m4/arts.m4 b/m4/arts.m4 index b44d26a21..c0058a2a1 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 diff --git a/m4/directx.m4 b/m4/directx.m4 index 11725123f..272bef991 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"] ) diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4 index 9254ca533..3371bdd2a 100644 --- a/m4/dvdnav.m4 +++ b/m4/dvdnav.m4 @@ -31,13 +31,13 @@ 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) if test x$dvdnav_config_exec_prefix != x ; then diff --git a/m4/gas.m4 b/m4/gas.m4 index 925c99092..6bbf86eae 100644 --- a/m4/gas.m4 +++ b/m4/gas.m4 @@ -12,7 +12,7 @@ dnl ---------- dnl find the pathname to the GNU or non-GNU assembler AC_DEFUN([CC_PROG_AS], [AC_ARG_WITH([gnu-as], - [AC_HELP_STRING([--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]) 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..6e0d456b4 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" 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..5e79c1e8a 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"] ) diff --git a/m4/optimizations.m4 b/m4/optimizations.m4 index 323b57509..48ded848b 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 diff --git a/m4/xine.m4 b/m4/xine.m4 index 1b21bbbab..8588a213d 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -31,13 +31,13 @@ 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) if test x$xine_config_exec_prefix != x ; then -- cgit v1.2.3 From 170641f69a86cdd740df4c1ec74194ef84dab6a0 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 29 Mar 2007 18:23:36 +0000 Subject: Replace obsolete macros (processing done by autoupdate). Some tests were rearranged (AC_TRY_LINK moved out of AC_TRY_RUN cross-compilation case, with arrangements to maintain the semantics) to avoid autoupdate errors. Factored out common (duplicate) code in aa.m4. Tested with autoconf 2.61; needs testing with 2.60. CVS patchset: 8767 CVS date: 2007/03/29 18:23:36 --- m4/_xine.m4 | 34 ++++---- m4/aa.m4 | 217 ++++++++++++++++++++-------------------------------- m4/arts.m4 | 15 ++-- m4/directx.m4 | 5 +- m4/dl.m4 | 5 +- m4/dvdnav.m4 | 20 ++--- m4/ioctl_request.m4 | 4 +- m4/libFLAC.m4 | 18 +++-- m4/opengl.m4 | 5 +- m4/optimizations.m4 | 2 +- m4/xine.m4 | 14 ++-- 11 files changed, 140 insertions(+), 199 deletions(-) (limited to 'm4') diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 9acb0f37d..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]) @@ -148,7 +148,7 @@ 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 @@ -163,7 +163,7 @@ AC_DEFUN([AC_TRY_LDFLAGS], [AC_MSG_CHECKING([if $CC supports $1 flags]) SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="$1" - AC_TRY_LINK([],[],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no]) + 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 @@ -362,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])]) @@ -545,26 +545,18 @@ AC_DEFUN([AC_CHECK_SOCKLEN_T], [ AC_LANG_PUSH(C++) AC_CACHE_VAL(ac_cv_socklen_t, [ - AC_TRY_COMPILE( -#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include - , -socklen_t a=0; + ]], [[socklen_t a=0; getsockname(0,(struct sockaddr*)0, &a); - , - ac_cv_socklen_t=socklen_t, - [ - AC_TRY_COMPILE( -#include -#include - , + ]])],[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 +#include ]], [[ 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++]) diff --git a/m4/aa.m4 b/m4/aa.m4 index c79738053..bab0d9d28 100644 --- a/m4/aa.m4 +++ b/m4/aa.m4 @@ -35,6 +35,77 @@ 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 +#include +#include + +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 +#include +]], [[ 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 @@ -48,6 +119,8 @@ AC_ARG_ENABLE(aalibtest, 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 -#include -#include - -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 -#include -], [ 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 -#include -#include - -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 -#include -], [ 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 #include -], [ +]], [[ 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 c0058a2a1..079c21ba8 100644 --- a/m4/arts.m4 +++ b/m4/arts.m4 @@ -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 #include #include @@ -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 #include -], [ 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 #include -], [ 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/directx.m4 b/m4/directx.m4 index 272bef991..6d023528e 100644 --- a/m4/directx.m4 +++ b/m4/directx.m4 @@ -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) diff --git a/m4/dl.m4 b/m4/dl.m4 index ff3fc71d5..30ea00b1c 100644 --- a/m4/dl.m4 +++ b/m4/dl.m4 @@ -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 3371bdd2a..0f24080f7 100644 --- a/m4/dvdnav.m4 +++ b/m4/dvdnav.m4 @@ -40,6 +40,8 @@ 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_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 #include #include @@ -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 #include -], [ 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 #include -], [ 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/ioctl_request.m4 b/m4/ioctl_request.m4 index e5ea6d346..c6d12258e 100644 --- a/m4/ioctl_request.m4 +++ b/m4/ioctl_request.m4 @@ -38,10 +38,10 @@ AC_DEFUN([AC_IOCTL_REQUEST], [ ac_cv_ioctl_request, [for ac_ioctl_request_type in "unsigned long" "int" do - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include int ioctl(int fd, $ac_ioctl_request_type request, ...); - ], [], [ac_cv_ioctl_request=$ac_ioctl_request_type]) + ]], [[]])],[ac_cv_ioctl_request=$ac_ioctl_request_type],[]) done]) if test "x$ac_cv_ioctl_request" = "x"; then diff --git a/m4/libFLAC.m4 b/m4/libFLAC.m4 index 6e0d456b4..9ecf8dd51 100644 --- a/m4/libFLAC.m4 +++ b/m4/libFLAC.m4 @@ -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 #include #include @@ -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 #include -], [ 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 #include -], [ 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/opengl.m4 b/m4/opengl.m4 index 5e79c1e8a..2c12949d9 100644 --- a/m4/opengl.m4 +++ b/m4/opengl.m4 @@ -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 -#include ], - [ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[ 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 48ded848b..a1f2f2f00 100644 --- a/m4/optimizations.m4 +++ b/m4/optimizations.m4 @@ -53,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 ],[int a; memset(&a, 0, sizeof(int));], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int a; memset(&a, 0, sizeof(int));]])], [AC_MSG_RESULT(yes); CFLAGS="-Wpointer-arith $SAVE_CFLAGS"], [AC_MSG_RESULT(no); CFLAGS="$SAVE_CFLAGS"]); diff --git a/m4/xine.m4 b/m4/xine.m4 index 8588a213d..cb64bad1a 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -40,6 +40,8 @@ AC_ARG_ENABLE(xinetest, 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 #include #include @@ -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 #include -], [ 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 -- cgit v1.2.3 From c7f232ad3c7808ae38cc3eefea633a69615864a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 1 Apr 2007 21:56:35 +0000 Subject: Fix test for visibility attributes. Patch thanks to Matt Messier. CVS patchset: 8782 CVS date: 2007/04/01 21:56:35 --- m4/attributes.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 1901cc2c8..eaa788c5f 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -147,7 +147,7 @@ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ CFLAGS="$ac_save_CFLAGS" ]) - if eval test [x$]AS_TR_SH([cc_cv_attribute_visibility_$1]); then + 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 -- cgit v1.2.3 From 6ff7b823ea37c8baa725fad659b06b23e1d92d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 2 Apr 2007 20:44:04 +0200 Subject: Migrate all .cvsignore files to .hgignore. --HG-- rename : .cvsignore => .hgignore rename : doc/.cvsignore => doc/.hgignore rename : doc/faq/.cvsignore => doc/faq/.hgignore rename : doc/hackersguide/.cvsignore => doc/hackersguide/.hgignore rename : doc/man/.cvsignore => doc/man/.hgignore rename : doc/man/en/.cvsignore => doc/man/en/.hgignore rename : include/.cvsignore => include/.hgignore rename : intl/.cvsignore => intl/.hgignore rename : lib/.cvsignore => lib/.hgignore rename : m4/.cvsignore => m4/.hgignore rename : misc/.cvsignore => misc/.hgignore rename : misc/fonts/.cvsignore => misc/fonts/.hgignore rename : po/.cvsignore => po/.hgignore rename : src/.cvsignore => src/.hgignore rename : src/audio_out/.cvsignore => src/audio_out/.hgignore rename : src/combined/.cvsignore => src/combined/.hgignore rename : src/demuxers/.cvsignore => src/demuxers/.hgignore rename : src/dxr3/.cvsignore => src/dxr3/.hgignore rename : src/input/.cvsignore => src/input/.hgignore rename : src/input/dvb/.cvsignore => src/input/dvb/.hgignore rename : src/input/libdvdnav/.cvsignore => src/input/libdvdnav/.hgignore rename : src/input/libreal/.cvsignore => src/input/libreal/.hgignore rename : src/input/librtsp/.cvsignore => src/input/librtsp/.hgignore rename : src/input/vcd/.cvsignore => src/input/vcd/.hgignore rename : src/input/vcd/libcdio/.cvsignore => src/input/vcd/libcdio/.hgignore rename : src/input/vcd/libcdio/MSWindows/.cvsignore => src/input/vcd/libcdio/MSWindows/.hgignore rename : src/input/vcd/libcdio/cdio/.cvsignore => src/input/vcd/libcdio/cdio/.hgignore rename : src/input/vcd/libcdio/image/.cvsignore => src/input/vcd/libcdio/image/.hgignore rename : src/input/vcd/libvcd/.cvsignore => src/input/vcd/libvcd/.hgignore rename : src/input/vcd/libvcd/libvcd/.cvsignore => src/input/vcd/libvcd/libvcd/.hgignore rename : src/liba52/.cvsignore => src/liba52/.hgignore rename : src/libdts/.cvsignore => src/libdts/.hgignore rename : src/libfaad/.cvsignore => src/libfaad/.hgignore rename : src/libfaad/codebook/.cvsignore => src/libfaad/codebook/.hgignore rename : src/libffmpeg/.cvsignore => src/libffmpeg/.hgignore rename : src/libffmpeg/libavcodec/.cvsignore => src/libffmpeg/libavcodec/.hgignore rename : src/libffmpeg/libavcodec/alpha/.cvsignore => src/libffmpeg/libavcodec/alpha/.hgignore rename : src/libffmpeg/libavcodec/armv4l/.cvsignore => src/libffmpeg/libavcodec/armv4l/.hgignore rename : src/libffmpeg/libavcodec/i386/.cvsignore => src/libffmpeg/libavcodec/i386/.hgignore rename : src/libffmpeg/libavcodec/libpostproc/.cvsignore => src/libffmpeg/libavcodec/libpostproc/.hgignore rename : src/libffmpeg/libavcodec/mlib/.cvsignore => src/libffmpeg/libavcodec/mlib/.hgignore rename : src/libffmpeg/libavcodec/ppc/.cvsignore => src/libffmpeg/libavcodec/ppc/.hgignore rename : src/libffmpeg/libavcodec/sparc/.cvsignore => src/libffmpeg/libavcodec/sparc/.hgignore rename : src/libffmpeg/libavutil/.cvsignore => src/libffmpeg/libavutil/.hgignore rename : src/libflac/.cvsignore => src/libflac/.hgignore rename : src/liblpcm/.cvsignore => src/liblpcm/.hgignore rename : src/libmad/.cvsignore => src/libmad/.hgignore rename : src/libmpeg2/.cvsignore => src/libmpeg2/.hgignore rename : src/libmpeg2new/.cvsignore => src/libmpeg2new/.hgignore rename : src/libmpeg2new/include/.cvsignore => src/libmpeg2new/include/.hgignore rename : src/libmpeg2new/libmpeg2/.cvsignore => src/libmpeg2new/libmpeg2/.hgignore rename : src/libmusepack/.cvsignore => src/libmusepack/.hgignore rename : src/libmusepack/musepack/.cvsignore => src/libmusepack/musepack/.hgignore rename : src/libreal/.cvsignore => src/libreal/.hgignore rename : src/libspeex/.cvsignore => src/libspeex/.hgignore rename : src/libspucc/.cvsignore => src/libspucc/.hgignore rename : src/libspucmml/.cvsignore => src/libspucmml/.hgignore rename : src/libspudec/.cvsignore => src/libspudec/.hgignore rename : src/libspudvb/.cvsignore => src/libspudvb/.hgignore rename : src/libsputext/.cvsignore => src/libsputext/.hgignore rename : src/libtheora/.cvsignore => src/libtheora/.hgignore rename : src/libvorbis/.cvsignore => src/libvorbis/.hgignore rename : src/libw32dll/.cvsignore => src/libw32dll/.hgignore rename : src/libw32dll/DirectShow/.cvsignore => src/libw32dll/DirectShow/.hgignore rename : src/libw32dll/dmo/.cvsignore => src/libw32dll/dmo/.hgignore rename : src/libw32dll/qtx/.cvsignore => src/libw32dll/qtx/.hgignore rename : src/libw32dll/qtx/qtxsdk/.cvsignore => src/libw32dll/qtx/qtxsdk/.hgignore rename : src/libw32dll/wine/.cvsignore => src/libw32dll/wine/.hgignore rename : src/libxineadec/.cvsignore => src/libxineadec/.hgignore rename : src/libxineadec/gsm610/.cvsignore => src/libxineadec/gsm610/.hgignore rename : src/libxineadec/nosefart/.cvsignore => src/libxineadec/nosefart/.hgignore rename : src/libxinevdec/.cvsignore => src/libxinevdec/.hgignore rename : src/post/.cvsignore => src/post/.hgignore rename : src/post/audio/.cvsignore => src/post/audio/.hgignore rename : src/post/deinterlace/.cvsignore => src/post/deinterlace/.hgignore rename : src/post/deinterlace/plugins/.cvsignore => src/post/deinterlace/plugins/.hgignore rename : src/post/goom/.cvsignore => src/post/goom/.hgignore rename : src/post/mosaico/.cvsignore => src/post/mosaico/.hgignore rename : src/post/planar/.cvsignore => src/post/planar/.hgignore rename : src/post/visualizations/.cvsignore => src/post/visualizations/.hgignore rename : src/video_out/.cvsignore => src/video_out/.hgignore rename : src/video_out/libdha/.cvsignore => src/video_out/libdha/.hgignore rename : src/video_out/libdha/bin/.cvsignore => src/video_out/libdha/bin/.hgignore rename : src/video_out/libdha/kernelhelper/.cvsignore => src/video_out/libdha/kernelhelper/.hgignore rename : src/video_out/libdha/oth/.cvsignore => src/video_out/libdha/oth/.hgignore rename : src/video_out/libdha/sysdep/.cvsignore => src/video_out/libdha/sysdep/.hgignore rename : src/video_out/macosx/.cvsignore => src/video_out/macosx/.hgignore rename : src/video_out/vidix/.cvsignore => src/video_out/vidix/.hgignore rename : src/video_out/vidix/drivers/.cvsignore => src/video_out/vidix/drivers/.hgignore rename : src/xine-engine/.cvsignore => src/xine-engine/.hgignore rename : src/xine-utils/.cvsignore => src/xine-utils/.hgignore rename : win32/.cvsignore => win32/.hgignore rename : win32/include/.cvsignore => win32/include/.hgignore --- m4/.cvsignore | 2 -- m4/.hgignore | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 m4/.cvsignore create mode 100644 m4/.hgignore (limited to 'm4') diff --git a/m4/.cvsignore b/m4/.cvsignore deleted file mode 100644 index 282522db0..000000000 --- a/m4/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/m4/.hgignore b/m4/.hgignore new file mode 100644 index 000000000..282522db0 --- /dev/null +++ b/m4/.hgignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in -- cgit v1.2.3 From 54f1e6e827ea33d9605d0ad0c403da2c841e05bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 2 Apr 2007 22:04:24 +0200 Subject: Add a m4_foreach_w macro when autoconf does not provide it. This allows to get AC_CHECK_SYMBOLS macro working on autoconf 2.59. --- m4/symbol.m4 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/symbol.m4 b/m4/symbol.m4 index fc8c8eede..1ff98e906 100644 --- a/m4/symbol.m4 +++ b/m4/symbol.m4 @@ -62,8 +62,27 @@ AC_DEFUN([AC_CHECK_SYMBOLS], [ 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.])]) -]) \ No newline at end of file +]) + +m4_ifdef([m4_foreach_w_is_compatibility], [m4_undefine([m4_foreach_w])]) -- cgit v1.2.3 From a00aef5551f357ef82375170f7d34dfa8a1bd2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 2 Apr 2007 22:06:39 +0200 Subject: Use LT_AC_PROG_SED rather than AC_PROG_SED. The latter is only available on 2.60 and later, so use the first one, provided by libtool, until we move further on to the newer versions. --- m4/gas.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/gas.m4 b/m4/gas.m4 index 6bbf86eae..923c3f90c 100644 --- a/m4/gas.m4 +++ b/m4/gas.m4 @@ -16,7 +16,7 @@ AC_DEFUN([CC_PROG_AS], [assume the C compiler uses GNU as @<:@default=no@:>@])], [test "$withval" = no || with_gnu_as=yes], [with_gnu_as=no]) -AC_REQUIRE([AC_PROG_SED])dnl +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 -- cgit v1.2.3 From b8fde980ebf7252dbe042c45cf02dd52159d7833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 2 Apr 2007 22:07:07 +0200 Subject: Never udnefine m4_foreach_w, after all if it's defined it is because it never was. --- m4/symbol.m4 | 2 -- 1 file changed, 2 deletions(-) (limited to 'm4') diff --git a/m4/symbol.m4 b/m4/symbol.m4 index 1ff98e906..7f807f1b1 100644 --- a/m4/symbol.m4 +++ b/m4/symbol.m4 @@ -84,5 +84,3 @@ m4_define([AH_CHECK_SYMBOLS], [ [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([AC_Symbol])), [Define to 1 if you have the ]m4_defn([AC_Symbol])[ symbol.])]) ]) - -m4_ifdef([m4_foreach_w_is_compatibility], [m4_undefine([m4_foreach_w])]) -- cgit v1.2.3