From c8f892953ba2a60e1f52f51fb2ffec033bfd85e6 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Thu, 26 Aug 2004 12:35:42 +0000 Subject: [PATCH] correct some AC_LANG_SOURCE/AC_LANG_PROGRAM snafu git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14166 ec53bebd-3082-4978-b11e-865c3cabbd6b --- cf/broken-glob.m4 | 2 +- cf/broken2.m4 | 3 +-- cf/c-attribute.m4 | 2 +- cf/check-compile-et.m4 | 2 +- cf/check-var.m4 | 4 ++-- cf/crypto.m4 | 8 ++++---- cf/find-func-no-libs2.m4 | 2 +- cf/have-struct-field.m4 | 2 +- cf/have-type.m4 | 2 +- cf/krb-bigendian.m4 | 4 ++-- cf/krb-ipv6.m4 | 4 ++-- cf/krb-readline.m4 | 2 +- cf/krb-struct-spwd.m4 | 2 +- cf/mips-abi.m4 | 4 ++-- cf/need-proto.m4 | 8 +++----- cf/proto-compat.m4 | 2 +- cf/test-package.m4 | 6 +++--- cf/vararray.m4 | 2 +- 18 files changed, 29 insertions(+), 32 deletions(-) diff --git a/cf/broken-glob.m4 b/cf/broken-glob.m4 index 695f30995..0e77427d0 100644 --- a/cf/broken-glob.m4 +++ b/cf/broken-glob.m4 @@ -5,7 +5,7 @@ dnl AC_DEFUN([AC_BROKEN_GLOB],[ AC_CACHE_CHECK(for working glob, ac_cv_func_glob_working, ac_cv_func_glob_working=yes -AC_LINK_IFELSE([AC_LANG_SOURCE([[ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include ]],[[ glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE| diff --git a/cf/broken2.m4 b/cf/broken2.m4 index 8800faf2b..90cb9ab34 100644 --- a/cf/broken2.m4 +++ b/cf/broken2.m4 @@ -6,8 +6,7 @@ dnl AC_BROKEN2(func, includes, arguments) AC_DEFUN([AC_BROKEN2], [AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_func_[]$1, -[AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]], -[[ +[AC_LINK_IFELSE([AC_LANG_SOURCE([[$2 /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ diff --git a/cf/c-attribute.m4 b/cf/c-attribute.m4 index 159e82001..8ff6bd3e8 100644 --- a/cf/c-attribute.m4 +++ b/cf/c-attribute.m4 @@ -9,7 +9,7 @@ dnl AC_DEFUN([AC_C___ATTRIBUTE__], [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(ac_cv___attribute__, [ -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include ]],[[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include static void foo(void) __attribute__ ((noreturn)); static void diff --git a/cf/check-compile-et.m4 b/cf/check-compile-et.m4 index b864b48f5..0d4dcd5b6 100644 --- a/cf/check-compile-et.m4 +++ b/cf/check-compile-et.m4 @@ -61,7 +61,7 @@ elif test "${krb_cv_compile_et}" = "yes"; then krb_cv_save_LIBS="${LIBS}" LIBS="${LIBS} -lcom_err" AC_MSG_CHECKING(for com_err) - AC_LINK_IFELSE([AC_LANG_SOURCE([[#include ]],[[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ const char *p; p = error_message(0); $krb_cv_com_err_need_r diff --git a/cf/check-var.m4 b/cf/check-var.m4 index 108ee6c26..5d1d9d3ed 100644 --- a/cf/check-var.m4 +++ b/cf/check-var.m4 @@ -5,11 +5,11 @@ AC_DEFUN([rk_CHECK_VAR], [ AC_MSG_CHECKING(for $1) AC_CACHE_VAL(ac_cv_var_$1, [ m4_ifval([$2],[ - AC_LINK_IFELSE([AC_LANG_SOURCE([[$2 + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2 void * foo() { return &$1; }]],[[foo()]])], [ac_cv_var_$1=yes],[ac_cv_var_$1=no])]) if test "$ac_cv_var_$1" != yes ; then -AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int $1; +AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int $1; int foo() { return $1; }]],[[foo()]])], [ac_cv_var_$1=yes],[ac_cv_var_$1=no]) fi diff --git a/cf/crypto.m4 b/cf/crypto.m4 index cf38a85d7..de7df2f15 100644 --- a/cf/crypto.m4 +++ b/cf/crypto.m4 @@ -87,7 +87,7 @@ if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then for j in $cdirs; do for k in $clibs; do LIBS="$j $k $save_LIBS" - AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers], + AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers], [test_body])], [openssl=yes ires="$i" lres="$j $k"; break 3]) done @@ -96,7 +96,7 @@ if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then for j in $cdirs; do for k in $clibs; do LIBS="$j $k $save_LIBS" - AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers],[test_body])], [openssl=no ires="$i" lres="$j $k"; break 3]) done done @@ -104,7 +104,7 @@ if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then for j in $cdirs; do for k in $clibs; do LIBS="$j $k $save_LIBS" - AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers],[test_body])], [openssl=no ires="$i" lres="$j $k"; break 3]) done done @@ -142,7 +142,7 @@ if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then LIB_des_so="$LIB_des" LIB_des_appl="$LIB_des" LIBS="${LIBS} ${LIB_des}" - AC_LINK_IFELSE([AC_LANG_SOURCE([test_headers],[test_body])], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers],[test_body])], [ crypto_lib=libcrypto openssl=yes AC_MSG_RESULT([libcrypto]) ]) diff --git a/cf/find-func-no-libs2.m4 b/cf/find-func-no-libs2.m4 index af42e176f..692001c10 100644 --- a/cf/find-func-no-libs2.m4 +++ b/cf/find-func-no-libs2.m4 @@ -21,7 +21,7 @@ if eval "test \"\$ac_cv_func_$1\" != yes" ; then *) ac_lib="-l$ac_lib" ;; esac LIBS="$6 $ac_lib $5 $ac_save_LIBS" - AC_LINK_IFELSE([AC_LANG_SOURCE([[$3]],[[$1($4)]])],[eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$3]],[[$1($4)]])],[eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break]) done eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}" LIBS="$ac_save_LIBS" diff --git a/cf/have-struct-field.m4 b/cf/have-struct-field.m4 index 6c9aeb1bb..25342de75 100644 --- a/cf/have-struct-field.m4 +++ b/cf/have-struct-field.m4 @@ -7,7 +7,7 @@ dnl AC_HAVE_STRUCT_FIELD(struct, field, headers) AC_DEFUN([AC_HAVE_STRUCT_FIELD], [ define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_])) AC_CACHE_CHECK([for $2 in $1], cache_val,[ -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$3]],[[$1 x; x.$2]])], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$3]],[[$1 x; x.$2]])], [cache_val=yes], [cache_val=no])]) if test "$cache_val" = yes; then diff --git a/cf/have-type.m4 b/cf/have-type.m4 index 42140dd4e..4c533a6f2 100644 --- a/cf/have-type.m4 +++ b/cf/have-type.m4 @@ -8,7 +8,7 @@ AC_REQUIRE([AC_HEADER_STDC]) cv=`echo "$1" | sed 'y%./+- %__p__%'` AC_MSG_CHECKING(for $1) AC_CACHE_VAL([ac_cv_type_$cv], -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #if STDC_HEADERS #include diff --git a/cf/krb-bigendian.m4 b/cf/krb-bigendian.m4 index 29e3eb8ae..185570720 100644 --- a/cf/krb-bigendian.m4 +++ b/cf/krb-bigendian.m4 @@ -18,7 +18,7 @@ AC_CACHE_CHECK([whether byte order is known at compile time], krb_cv_c_bigendian_compile, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include -#include ]],[[ +#include #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif]])],[krb_cv_c_bigendian_compile=yes],[krb_cv_c_bigendian_compile=no])]) @@ -26,7 +26,7 @@ AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[ if test "$krb_cv_c_bigendian_compile" = "yes"; then AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include -#include ]],[[ +#include #if BYTE_ORDER != BIG_ENDIAN not big endian #endif]])],[krb_cv_c_bigendian=yes],[krb_cv_c_bigendian=no]) diff --git a/cf/krb-ipv6.m4 b/cf/krb-ipv6.m4 index e56972b6b..a62f3a315 100644 --- a/cf/krb-ipv6.m4 +++ b/cf/krb-ipv6.m4 @@ -89,7 +89,7 @@ fi ]) AC_CACHE_CHECK([for IPv6], ac_cv_lib_ipv6, [ -AC_LINK_IFELSE([AC_LANG_SOURCE([[ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_SYS_TYPES_H #include #endif @@ -125,7 +125,7 @@ fi ## test for AIX missing in6addr_loopback if test "$ac_cv_lib_ipv6" = yes; then AC_CACHE_CHECK([for in6addr_loopback],[ac_cv_var_in6addr_loopback],[ - AC_LINK_IFELSE([AC_LANG_SOURCE([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/cf/krb-readline.m4 b/cf/krb-readline.m4 index ba1dbabf0..4ba2dbd18 100644 --- a/cf/krb-readline.m4 +++ b/cf/krb-readline.m4 @@ -9,7 +9,7 @@ AC_DEFUN([KRB_READLINE],[ AC_FIND_FUNC_NO_LIBS(el_init, edit, [], [], [$LIB_tgetent]) if test "$ac_cv_func_el_init" = yes ; then AC_CACHE_CHECK(for four argument el_init, ac_cv_func_el_init_four,[ - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]], [[el_init("", NULL, NULL, NULL);]])], [ac_cv_func_el_init_four=yes], diff --git a/cf/krb-struct-spwd.m4 b/cf/krb-struct-spwd.m4 index a12db49bf..aebf20c11 100644 --- a/cf/krb-struct-spwd.m4 +++ b/cf/krb-struct-spwd.m4 @@ -5,7 +5,7 @@ dnl Test for `struct spwd' AC_DEFUN([AC_KRB_STRUCT_SPWD], [ AC_MSG_CHECKING(for struct spwd) AC_CACHE_VAL(ac_cv_struct_spwd, [ -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifdef HAVE_SHADOW_H #include diff --git a/cf/mips-abi.m4 b/cf/mips-abi.m4 index e65a00539..20035beea 100644 --- a/cf/mips-abi.m4 +++ b/cf/mips-abi.m4 @@ -39,7 +39,7 @@ AC_MSG_CHECKING([if $CC supports the $abi option]) AC_CACHE_VAL($ac_foo, [ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $abi" -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]],[[int x;]])],[eval $ac_foo=yes], [eval $ac_foo=no])dnl +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int x;]])],[eval $ac_foo=yes], [eval $ac_foo=no])dnl CFLAGS="$save_CFLAGS" ]) ac_res=`eval echo \\\$$ac_foo` @@ -50,7 +50,7 @@ case $abi in -mabi=32) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mabi=n32" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]],[[int x;]])],[ac_res=yes],[ac_res=no])dnl + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int x;]])],[ac_res=yes],[ac_res=no])dnl CLAGS="$save_CFLAGS" if test $ac_res = yes; then # New GCC diff --git a/cf/need-proto.m4 b/cf/need-proto.m4 index 57001a4f0..2f7a2216b 100644 --- a/cf/need-proto.m4 +++ b/cf/need-proto.m4 @@ -9,11 +9,9 @@ dnl AC_NEED_PROTO(includes, function) AC_DEFUN([AC_NEED_PROTO], [ if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto, -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$1]], -[[struct foo { int foo; } xx; -extern int $2 (struct foo*); -$2(&xx); -]])], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1 +struct foo { int foo; } xx; +extern int $2 (struct foo*);]],[[$2(&xx)]])], [eval "ac_cv_func_$2_noproto=yes"], [eval "ac_cv_func_$2_noproto=no"])) if test "$ac_cv_func_$2_noproto" = yes; then diff --git a/cf/proto-compat.m4 b/cf/proto-compat.m4 index 3ae25fd8a..7d0fd70d4 100644 --- a/cf/proto-compat.m4 +++ b/cf/proto-compat.m4 @@ -9,7 +9,7 @@ dnl AC_PROTO_COMPAT(includes, function, prototype) AC_DEFUN([AC_PROTO_COMPAT], [ AC_CACHE_CHECK([if $2 is compatible with system prototype], ac_cv_func_$2_proto_compat, -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$1]],[[$3]])], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],[[$3]])], [eval "ac_cv_func_$2_proto_compat=yes"], [eval "ac_cv_func_$2_proto_compat=no"])) define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE]) diff --git a/cf/test-package.m4 b/cf/test-package.m4 index bce0d7a33..3bc079488 100644 --- a/cf/test-package.m4 +++ b/cf/test-package.m4 @@ -91,7 +91,7 @@ if test "$with_$1" != no; then if test "$[]$1_cflags" -a "$[]$1_libs"; then CFLAGS="$[]$1_cflags $save_CFLAGS" LIBS="$[]$1_libs $save_LIBS" - AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]],[[]])],[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[ INCLUDE_$1="$[]$1_cflags" LIB_$1="$[]$1_libs" AC_MSG_RESULT([from $with_$1_config]) @@ -101,11 +101,11 @@ if test "$with_$1" != no; then ires= lres= for i in $header_dirs; do CFLAGS="-I$i $save_CFLAGS" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[$2]],[[]])],[ires=$i;break]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[ires=$i;break]) done for i in $lib_dirs; do LIBS="-L$i $3 $4 $save_LIBS" - AC_LINK_IFELSE([AC_LANG_SOURCE([[$2]],[[]])],[lres=$i;break]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[lres=$i;break]) done if test "$ires" -a "$lres" -a "$with_$1" != "no"; then INCLUDE_$1="-I$ires" diff --git a/cf/vararray.m4 b/cf/vararray.m4 index 290f1106d..8511b1628 100644 --- a/cf/vararray.m4 +++ b/cf/vararray.m4 @@ -6,7 +6,7 @@ dnl AC_DEFUN([rk_C_VARARRAY], [ AC_CACHE_CHECK([if the compiler supports variable-length arrays],[rk_cv_c_vararray],[ - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]],[[int x = 0; { int y[x]; }]])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int x = 0; { int y[x]; }]])], [rk_cv_c_vararray=yes], [rk_cv_c_vararray=no])]) if test "$rk_cv_c_vararray" = yes; then