summaryrefslogtreecommitdiff
path: root/openssh
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2003-10-20 22:56:34 +0000
committerChris Larson <clarson@kergoth.com>2003-10-20 22:56:34 +0000
commita23565c054906e316011ec06259f43e067d7a69a (patch)
tree1686a539e16312e3db637876559aaebb0ba76f33 /openssh
parentf1252666438187c9a1c84107c499f73ee2f80f51 (diff)
Move some nonbuilding items into nonworking.. fix the libpcap, openssh, nano builds that were failing due to 1) aclocal.m4 being the only place containing their macros, and 2) _au_changequote() refs that are never removed by autoconf.
BKrev: 3f946822OUfB3oA0KwkHGEFd0cEV1Q
Diffstat (limited to 'openssh')
-rw-r--r--openssh/openssh-3.7.1p2/configure.patch23984
-rw-r--r--openssh/openssh_3.7.1p1.oe6
-rw-r--r--openssh/openssh_3.7.1p2.oe6
3 files changed, 23996 insertions, 0 deletions
diff --git a/openssh/openssh-3.7.1p2/configure.patch b/openssh/openssh-3.7.1p2/configure.patch
index e69de29bb2..0e597b8405 100644
--- a/openssh/openssh-3.7.1p2/configure.patch
+++ b/openssh/openssh-3.7.1p2/configure.patch
@@ -0,0 +1,23984 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- openssh-3.7.1p2/configure.ac~configure
++++ openssh-3.7.1p2/configure.ac
+@@ -65,7 +65,7 @@
+ for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do
+ if (test -z "$blibflags"); then
+ LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
+- AC_TRY_LINK([], [], [blibflags=$tryflags])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[blibflags=$tryflags],[])
+ fi
+ done
+ if (test -z "$blibflags"); then
+@@ -85,13 +85,9 @@
+ dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
+ AC_CHECK_DECL(loginfailed,
+ [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
+- AC_TRY_COMPILE(
+- [#include <usersec.h>],
+- [(void)loginfailed("user","host","tty",0);],
+- [AC_MSG_RESULT(yes)
+- AC_DEFINE(AIX_LOGINFAILED_4ARG)],
+- [AC_MSG_RESULT(no)]
+- )],
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <usersec.h>]], [[(void)loginfailed("user","host","tty",0);]])],[AC_MSG_RESULT(yes)
++ AC_DEFINE(AIX_LOGINFAILED_4ARG)],[AC_MSG_RESULT(no)
++ ])],
+ [],
+ [#include <usersec.h>]
+ )
+@@ -123,15 +119,13 @@
+ ;;
+ *-*-darwin*)
+ AC_MSG_CHECKING(if we have working getaddrinfo)
+- AC_TRY_RUN([#include <mach-o/dyld.h>
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <mach-o/dyld.h>
+ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
+ exit(0);
+ else
+ exit(1);
+-}], [AC_MSG_RESULT(working)],
+- [AC_MSG_RESULT(buggy)
+- AC_DEFINE(BROKEN_GETADDRINFO)],
+- [AC_MSG_RESULT(assume it is working)])
++}]])],[AC_MSG_RESULT(working)],[AC_MSG_RESULT(buggy)
++ AC_DEFINE(BROKEN_GETADDRINFO)],[AC_MSG_RESULT(assume it is working)])
+ AC_DEFINE(SETEUID_BREAKS_SETUID)
+ AC_DEFINE(BROKEN_SETREUID)
+ AC_DEFINE(BROKEN_SETREGID)
+@@ -459,16 +453,14 @@
+ )
+
+ AC_MSG_CHECKING(compiler and flags for sanity)
+-AC_TRY_RUN([
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ int main(){exit(0);}
+- ],
+- [ AC_MSG_RESULT(yes) ],
+- [
++ ]])],[ AC_MSG_RESULT(yes) ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
+- ]
+-)
++ ],[ AC_MSG_RESULT(yes)
++])
+
+ # Checks for header files.
+ AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \
+@@ -500,8 +492,7 @@
+ ac_cv_have_broken_dirname, [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lgen"
+- AC_TRY_RUN(
+- [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <libgen.h>
+ #include <string.h>
+
+@@ -516,10 +507,8 @@
+ exit(0);
+ }
+ }
+- ],
+- [ ac_cv_have_broken_dirname="no" ],
+- [ ac_cv_have_broken_dirname="yes" ]
+- )
++ ]])],[ ac_cv_have_broken_dirname="no" ],[ ac_cv_have_broken_dirname="yes"
++ ],[])
+ LIBS="$save_LIBS"
+ ])
+ if test "x$ac_cv_have_broken_dirname" = "xno" ; then
+@@ -626,19 +615,18 @@
+ ]
+ )
+
+-AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
+-AC_TRY_RUN(
+- [
+-#include <sys/types.h>
+-#include <dirent.h>
+-int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
+- ],
+- [AC_MSG_RESULT(yes)],
+- [
+- AC_MSG_RESULT(no)
+- AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
+- ]
+-)
++AC_CACHE_CHECK([whether struct dirent allocates space for d_name], ac_cv_have_space_d_name_in_struct_dirent, [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <sys/types.h>
++ #include <dirent.h>
++ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
++ ]])],[ac_cv_have_space_d_name_in_struct_dirent="yes"],[ac_cv_have_space_d_name_in_struct_dirent="no"
++ ],[])
++])
++
++if test "x$ac_cv_dirent_have_space_d_name" = "xyes" ; then
++ AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
++fi
+
+ # Check whether user wants S/Key support
+ SKEY_MSG="no"
+@@ -658,17 +646,14 @@
+ SKEY_MSG="yes"
+
+ AC_MSG_CHECKING([for s/key support])
+- AC_TRY_RUN(
+- [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ #include <skey.h>
+ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
+- ],
+- [AC_MSG_RESULT(yes)],
+- [
++ ]])],[AC_MSG_RESULT(yes)],[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
+- ])
++ ],[])
+ fi
+ ]
+ )
+@@ -706,22 +691,18 @@
+ LIBWRAP="-lwrap"
+ LIBS="$LIBWRAP $LIBS"
+ AC_MSG_CHECKING(for libwrap)
+- AC_TRY_LINK(
+- [
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <tcpd.h>
+ int deny_severity = 0, allow_severity = 0;
+- ],
+- [hosts_access(0);],
+- [
++ ]], [[hosts_access(0);]])],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(LIBWRAP)
+ AC_SUBST(LIBWRAP)
+ TCPW_MSG="yes"
+- ],
+- [
++ ],[
+ AC_MSG_ERROR([*** libwrap missing])
+- ]
+- )
++
++ ])
+ LIBS="$saved_LIBS"
+ fi
+ ]
+@@ -746,17 +727,17 @@
+ # IRIX has a const char return value for gai_strerror()
+ AC_CHECK_FUNCS(gai_strerror,[
+ AC_DEFINE(HAVE_GAI_STRERROR)
+- AC_TRY_COMPILE([
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+-const char *gai_strerror(int);],[
++const char *gai_strerror(int);]], [[
+ char *str;
+
+-str = gai_strerror(0);],[
++str = gai_strerror(0);]])],[
+ AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
+- [Define if gai_strerror() returns const char *])])])
++ [Define if gai_strerror() returns const char *])],[])])
+
+ AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
+
+@@ -792,52 +773,47 @@
+
+ # Check for broken snprintf
+ if test "x$ac_cv_func_snprintf" = "xyes" ; then
+- AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
+- AC_TRY_RUN(
+- [
++AC_CACHE_CHECK([whether snprintf correctly terminates long strings],
++ ac_cv_have_broken_snprintf, [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
+- ],
+- [AC_MSG_RESULT(yes)],
+- [
+- AC_MSG_RESULT(no)
+- AC_DEFINE(BROKEN_SNPRINTF)
+- AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
+- ]
+- )
++ ]])],[ ac_cv_have_broken_snprintf="no" ],[ ac_cv_have_broken_snprintf="yes"
++ ],[])
++])
++if test "x$ac_cv_have_broken_snprintf" = "xyes" ; then
++ AC_DEFINE(BROKEN_SNPRINTF)
++ AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
++fi
+ fi
+
+ dnl see whether mkstemp() requires XXXXXX
+ if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
+ AC_MSG_CHECKING([for (overly) strict mkstemp])
+-AC_TRY_RUN(
+- [
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdlib.h>
+ main() { char template[]="conftest.mkstemp-test";
+ if (mkstemp(template) == -1)
+ exit(1);
+ unlink(template); exit(0);
+ }
+- ],
+- [
++ ]])],[
+ AC_MSG_RESULT(no)
+- ],
+- [
++ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRICT_MKSTEMP)
+- ],
+- [
++ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRICT_MKSTEMP)
+- ]
+-)
++
++])
+ fi
+
+ dnl make sure that openpty does not reacquire controlling terminal
+ if test ! -z "$check_for_openpty_ctty_bug"; then
+- AC_MSG_CHECKING(if openpty correctly handles controlling tty)
+- AC_TRY_RUN(
+- [
++AC_CACHE_CHECK([if openpty acquires controlling terminal],
++ ac_cv_have_openpty_ctty_bug, [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ #include <sys/fcntl.h>
+ #include <sys/types.h>
+@@ -869,15 +845,12 @@
+ exit(0); /* Did not acquire ctty: OK */
+ }
+ }
+- ],
+- [
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- AC_DEFINE(SSHD_ACQUIRES_CTTY)
+- ]
+- )
++ ]])],[ ac_cv_have_openpty_ctty_bug="no" ],[ ac_cv_have_openpty_ctty_bug="yes"
++ ],[])
++])
++if test "x$ac_cv_have_openpty_ctty_bug" = "xyes" ; then
++ AC_DEFINE(SSHD_ACQUIRES_CTTY)
++fi
+ fi
+
+ AC_FUNC_GETPGRP
+@@ -915,19 +888,15 @@
+ if test "x$PAM_MSG" = "xyes" ; then
+ # Check PAM strerror arguments (old PAM)
+ AC_MSG_CHECKING([whether pam_strerror takes only one argument])
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ #include <security/pam_appl.h>
+- ],
+- [(void)pam_strerror((pam_handle_t *)NULL, -1);],
+- [AC_MSG_RESULT(no)],
+- [
++ ]], [[(void)pam_strerror((pam_handle_t *)NULL, -1);]])],[AC_MSG_RESULT(no)],[
+ AC_DEFINE(HAVE_OLD_PAM)
+ AC_MSG_RESULT(yes)
+ PAM_MSG="yes (old library)"
+- ]
+- )
++
++ ])
+ fi
+
+ # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
+@@ -984,8 +953,7 @@
+
+ # Determine OpenSSL header version
+ AC_MSG_CHECKING([OpenSSL header version])
+-AC_TRY_RUN(
+- [
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ #include <string.h>
+ #include <openssl/opensslv.h>
+@@ -1003,21 +971,21 @@
+
+ exit(0);
+ }
+- ],
+- [
++ ]])],[
+ ssl_header_ver=`cat conftest.sslincver`
+ AC_MSG_RESULT($ssl_header_ver)
+- ],
+- [
++ ],[
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(OpenSSL version header not found.)
+- ]
+-)
++ ],[
++ AC_MSG_RESULT(unknown)
++ AC_MSG_WARN(Skipping OpenSSL header version check due to crosscompilation.)
++
++])
+
+ # Determine OpenSSL library version
+ AC_MSG_CHECKING([OpenSSL library version])
+-AC_TRY_RUN(
+- [
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ #include <string.h>
+ #include <openssl/opensslv.h>
+@@ -1036,35 +1004,36 @@
+
+ exit(0);
+ }
+- ],
+- [
++ ]])],[
+ ssl_library_ver=`cat conftest.ssllibver`
+ AC_MSG_RESULT($ssl_library_ver)
+- ],
+- [
++ ],[
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(OpenSSL library not found.)
+- ]
+-)
++ ],[
++ AC_MSG_RESULT(unknown)
++ AC_MSG_WARN(Skipping OpenSSL library version check due to crosscompilation.)
++
++])
+
+ # Sanity check OpenSSL headers
+ AC_MSG_CHECKING([whether OpenSSL's headers match the library])
+-AC_TRY_RUN(
+- [
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <string.h>
+ #include <openssl/opensslv.h>
+ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
+- ],
+- [
++ ]])],[
+ AC_MSG_RESULT(yes)
+- ],
+- [
++ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Your OpenSSL headers do not match your library.
+ Check config.log for details.
+ Also see contrib/findssl.sh for help identifying header/library mismatches.])
+- ]
+-)
++ ],[
++ AC_MSG_RESULT(unknown)
++ AC_MSG_WARN(Skipping OpenSSL version comparison due to crosscompilation.)
++
++])
+
+ # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
+ # version in OpenSSL. Skip this for PAM
+@@ -1072,30 +1041,8 @@
+ AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
+ fi
+
+-
+ ### Configure cryptographic random number support
+
+-# Check wheter OpenSSL seeds itself
+-AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
+-AC_TRY_RUN(
+- [
+-#include <string.h>
+-#include <openssl/rand.h>
+-int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
+- ],
+- [
+- OPENSSL_SEEDS_ITSELF=yes
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- # Default to use of the rand helper if OpenSSL doesn't
+- # seed itself
+- USE_RAND_HELPER=yes
+- ]
+-)
+-
+-
+ # Do we want to force the use of the rand helper?
+ AC_ARG_WITH(rand-helper,
+ [ --with-rand-helper Use subprocess to gather strong randomness ],
+@@ -1112,6 +1059,24 @@
+ USE_RAND_HELPER=yes
+ fi
+ ],
++ # Check whether OpenSSL seeds itself
++ [
++ AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <string.h>
++ #include <openssl/rand.h>
++ int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
++ ]])],[
++ OPENSSL_SEEDS_ITSELF=yes
++ AC_MSG_RESULT(yes)
++ ],[
++ AC_MSG_RESULT(no)
++ # Default to use of the rand helper if OpenSSL doesn't
++ # seed itself
++ USE_RAND_HELPER=yes
++
++ ],[])
++ ]
+ )
+
+ # Which randomness source do we use?
+@@ -1293,12 +1258,8 @@
+
+ # More checks for data types
+ AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
+- AC_TRY_COMPILE(
+- [ #include <sys/types.h> ],
+- [ u_int a; a = 1;],
+- [ ac_cv_have_u_int="yes" ],
+- [ ac_cv_have_u_int="no" ]
+- )
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]], [[ u_int a; a = 1;]])],[ ac_cv_have_u_int="yes" ],[ ac_cv_have_u_int="no"
++ ])
+ ])
+ if test "x$ac_cv_have_u_int" = "xyes" ; then
+ AC_DEFINE(HAVE_U_INT)
+@@ -1306,12 +1267,8 @@
+ fi
+
+ AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
+- AC_TRY_COMPILE(
+- [ #include <sys/types.h> ],
+- [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
+- [ ac_cv_have_intxx_t="yes" ],
+- [ ac_cv_have_intxx_t="no" ]
+- )
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]], [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],[ ac_cv_have_intxx_t="yes" ],[ ac_cv_have_intxx_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_intxx_t" = "xyes" ; then
+ AC_DEFINE(HAVE_INTXX_T)
+@@ -1322,20 +1279,15 @@
+ test "x$ac_cv_header_stdint_h" = "xyes")
+ then
+ AC_MSG_CHECKING([for intXX_t types in stdint.h])
+- AC_TRY_COMPILE(
+- [ #include <stdint.h> ],
+- [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdint.h> ]], [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],[
+ AC_DEFINE(HAVE_INTXX_T)
+ AC_MSG_RESULT(yes)
+- ],
+- [ AC_MSG_RESULT(no) ]
+- )
++ ],[ AC_MSG_RESULT(no)
++ ])
+ fi
+
+ AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #ifdef HAVE_STDINT_H
+ # include <stdint.h>
+@@ -1344,23 +1296,16 @@
+ #ifdef HAVE_SYS_BITYPES_H
+ # include <sys/bitypes.h>
+ #endif
+- ],
+- [ int64_t a; a = 1;],
+- [ ac_cv_have_int64_t="yes" ],
+- [ ac_cv_have_int64_t="no" ]
+- )
++ ]], [[ int64_t a; a = 1;]])],[ ac_cv_have_int64_t="yes" ],[ ac_cv_have_int64_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_int64_t" = "xyes" ; then
+ AC_DEFINE(HAVE_INT64_T)
+ fi
+
+ AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
+- AC_TRY_COMPILE(
+- [ #include <sys/types.h> ],
+- [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
+- [ ac_cv_have_u_intxx_t="yes" ],
+- [ ac_cv_have_u_intxx_t="no" ]
+- )
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]], [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],[ ac_cv_have_u_intxx_t="yes" ],[ ac_cv_have_u_intxx_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
+ AC_DEFINE(HAVE_U_INTXX_T)
+@@ -1369,24 +1314,16 @@
+
+ if test -z "$have_u_intxx_t" ; then
+ AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
+- AC_TRY_COMPILE(
+- [ #include <sys/socket.h> ],
+- [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/socket.h> ]], [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],[
+ AC_DEFINE(HAVE_U_INTXX_T)
+ AC_MSG_RESULT(yes)
+- ],
+- [ AC_MSG_RESULT(no) ]
+- )
++ ],[ AC_MSG_RESULT(no)
++ ])
+ fi
+
+ AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
+- AC_TRY_COMPILE(
+- [ #include <sys/types.h> ],
+- [ u_int64_t a; a = 1;],
+- [ ac_cv_have_u_int64_t="yes" ],
+- [ ac_cv_have_u_int64_t="no" ]
+- )
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]], [[ u_int64_t a; a = 1;]])],[ ac_cv_have_u_int64_t="yes" ],[ ac_cv_have_u_int64_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
+ AC_DEFINE(HAVE_U_INT64_T)
+@@ -1395,27 +1332,19 @@
+
+ if test -z "$have_u_int64_t" ; then
+ AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
+- AC_TRY_COMPILE(
+- [ #include <sys/bitypes.h> ],
+- [ u_int64_t a; a = 1],
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/bitypes.h> ]], [[ u_int64_t a; a = 1]])],[
+ AC_DEFINE(HAVE_U_INT64_T)
+ AC_MSG_RESULT(yes)
+- ],
+- [ AC_MSG_RESULT(no) ]
+- )
++ ],[ AC_MSG_RESULT(no)
++ ])
+ fi
+
+ if test -z "$have_u_intxx_t" ; then
+ AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+- ],
+- [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
+- [ ac_cv_have_uintxx_t="yes" ],
+- [ ac_cv_have_uintxx_t="no" ]
+- )
++ ]], [[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ]])],[ ac_cv_have_uintxx_t="yes" ],[ ac_cv_have_uintxx_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
+ AC_DEFINE(HAVE_UINTXX_T)
+@@ -1424,49 +1353,37 @@
+
+ if test -z "$have_uintxx_t" ; then
+ AC_MSG_CHECKING([for uintXX_t types in stdint.h])
+- AC_TRY_COMPILE(
+- [ #include <stdint.h> ],
+- [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdint.h> ]], [[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;]])],[
+ AC_DEFINE(HAVE_UINTXX_T)
+ AC_MSG_RESULT(yes)
+- ],
+- [ AC_MSG_RESULT(no) ]
+- )
++ ],[ AC_MSG_RESULT(no)
++ ])
+ fi
+
+ if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
+ test "x$ac_cv_header_sys_bitypes_h" = "xyes")
+ then
+ AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/bitypes.h>
+- ],
+- [
++ ]], [[
+ int8_t a; int16_t b; int32_t c;
+ u_int8_t e; u_int16_t f; u_int32_t g;
+ a = b = c = e = f = g = 1;
+- ],
+- [
++ ]])],[
+ AC_DEFINE(HAVE_U_INTXX_T)
+ AC_DEFINE(HAVE_INTXX_T)
+ AC_MSG_RESULT(yes)
+- ],
+- [AC_MSG_RESULT(no)]
+- )
++ ],[AC_MSG_RESULT(no)
++ ])
+ fi
+
+
+ AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+- ],
+- [ u_char foo; foo = 125; ],
+- [ ac_cv_have_u_char="yes" ],
+- [ ac_cv_have_u_char="no" ]
+- )
++ ]], [[ u_char foo; foo = 125; ]])],[ ac_cv_have_u_char="yes" ],[ ac_cv_have_u_char="no"
++ ])
+ ])
+ if test "x$ac_cv_have_u_char" = "xyes" ; then
+ AC_DEFINE(HAVE_U_CHAR)
+@@ -1477,56 +1394,40 @@
+ AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
+
+ AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+- ],
+- [ size_t foo; foo = 1235; ],
+- [ ac_cv_have_size_t="yes" ],
+- [ ac_cv_have_size_t="no" ]
+- )
++ ]], [[ size_t foo; foo = 1235; ]])],[ ac_cv_have_size_t="yes" ],[ ac_cv_have_size_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_size_t" = "xyes" ; then
+ AC_DEFINE(HAVE_SIZE_T)
+ fi
+
+ AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+- ],
+- [ ssize_t foo; foo = 1235; ],
+- [ ac_cv_have_ssize_t="yes" ],
+- [ ac_cv_have_ssize_t="no" ]
+- )
++ ]], [[ ssize_t foo; foo = 1235; ]])],[ ac_cv_have_ssize_t="yes" ],[ ac_cv_have_ssize_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_ssize_t" = "xyes" ; then
+ AC_DEFINE(HAVE_SSIZE_T)
+ fi
+
+ AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <time.h>
+- ],
+- [ clock_t foo; foo = 1235; ],
+- [ ac_cv_have_clock_t="yes" ],
+- [ ac_cv_have_clock_t="no" ]
+- )
++ ]], [[ clock_t foo; foo = 1235; ]])],[ ac_cv_have_clock_t="yes" ],[ ac_cv_have_clock_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_clock_t" = "xyes" ; then
+ AC_DEFINE(HAVE_CLOCK_T)
+ fi
+
+ AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+- ],
+- [ sa_family_t foo; foo = 1235; ],
+- [ ac_cv_have_sa_family_t="yes" ],
+- [ AC_TRY_COMPILE(
++ ]], [[ sa_family_t foo; foo = 1235; ]])],[ ac_cv_have_sa_family_t="yes" ],[ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+@@ -1536,36 +1437,28 @@
+ [ ac_cv_have_sa_family_t="yes" ],
+
+ [ ac_cv_have_sa_family_t="no" ]
+- )]
+ )
++ ])
+ ])
+ if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
+ AC_DEFINE(HAVE_SA_FAMILY_T)
+ fi
+
+ AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+- ],
+- [ pid_t foo; foo = 1235; ],
+- [ ac_cv_have_pid_t="yes" ],
+- [ ac_cv_have_pid_t="no" ]
+- )
++ ]], [[ pid_t foo; foo = 1235; ]])],[ ac_cv_have_pid_t="yes" ],[ ac_cv_have_pid_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_pid_t" = "xyes" ; then
+ AC_DEFINE(HAVE_PID_T)
+ fi
+
+ AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+- ],
+- [ mode_t foo; foo = 1235; ],
+- [ ac_cv_have_mode_t="yes" ],
+- [ ac_cv_have_mode_t="no" ]
+- )
++ ]], [[ mode_t foo; foo = 1235; ]])],[ ac_cv_have_mode_t="yes" ],[ ac_cv_have_mode_t="no"
++ ])
+ ])
+ if test "x$ac_cv_have_mode_t" = "xyes" ; then
+ AC_DEFINE(HAVE_MODE_T)
+@@ -1573,73 +1466,53 @@
+
+
+ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+- ],
+- [ struct sockaddr_storage s; ],
+- [ ac_cv_have_struct_sockaddr_storage="yes" ],
+- [ ac_cv_have_struct_sockaddr_storage="no" ]
+- )
++ ]], [[ struct sockaddr_storage s; ]])],[ ac_cv_have_struct_sockaddr_storage="yes" ],[ ac_cv_have_struct_sockaddr_storage="no"
++ ])
+ ])
+ if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
+ fi
+
+ AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <netinet/in.h>
+- ],
+- [ struct sockaddr_in6 s; s.sin6_family = 0; ],
+- [ ac_cv_have_struct_sockaddr_in6="yes" ],
+- [ ac_cv_have_struct_sockaddr_in6="no" ]
+- )
++ ]], [[ struct sockaddr_in6 s; s.sin6_family = 0; ]])],[ ac_cv_have_struct_sockaddr_in6="yes" ],[ ac_cv_have_struct_sockaddr_in6="no"
++ ])
+ ])
+ if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
+ fi
+
+ AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <netinet/in.h>
+- ],
+- [ struct in6_addr s; s.s6_addr[0] = 0; ],
+- [ ac_cv_have_struct_in6_addr="yes" ],
+- [ ac_cv_have_struct_in6_addr="no" ]
+- )
++ ]], [[ struct in6_addr s; s.s6_addr[0] = 0; ]])],[ ac_cv_have_struct_in6_addr="yes" ],[ ac_cv_have_struct_in6_addr="no"
++ ])
+ ])
+ if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
+ fi
+
+ AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+- ],
+- [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
+- [ ac_cv_have_struct_addrinfo="yes" ],
+- [ ac_cv_have_struct_addrinfo="no" ]
+- )
++ ]], [[ struct addrinfo s; s.ai_flags = AI_PASSIVE; ]])],[ ac_cv_have_struct_addrinfo="yes" ],[ ac_cv_have_struct_addrinfo="no"
++ ])
+ ])
+ if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_ADDRINFO)
+ fi
+
+ AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
+- AC_TRY_COMPILE(
+- [ #include <sys/time.h> ],
+- [ struct timeval tv; tv.tv_sec = 1;],
+- [ ac_cv_have_struct_timeval="yes" ],
+- [ ac_cv_have_struct_timeval="no" ]
+- )
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/time.h> ]], [[ struct timeval tv; tv.tv_sec = 1;]])],[ ac_cv_have_struct_timeval="yes" ],[ ac_cv_have_struct_timeval="no"
++ ])
+ ])
+ if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_TIMEVAL)
+@@ -1658,32 +1531,42 @@
+ exit 1;
+ else
+ dnl test snprintf (broken on SCO w/gcc)
+- AC_TRY_RUN(
+- [
+-#include <stdio.h>
+-#include <string.h>
+-#ifdef HAVE_SNPRINTF
+-main()
+-{
+- char buf[50];
+- char expected_out[50];
+- int mazsize = 50 ;
+-#if (SIZEOF_LONG_INT == 8)
+- long int num = 0x7fffffffffffffff;
+-#else
+- long long num = 0x7fffffffffffffffll;
+-#endif
+- strcpy(expected_out, "9223372036854775807");
+- snprintf(buf, mazsize, "%lld", num);
+- if(strcmp(buf, expected_out) != 0)
+- exit(1);
+- exit(0);
+-}
+-#else
+-main() { exit(0); }
+-#endif
+- ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
+- )
++ if test "x$ac_cv_have_broken_snprintf" != "xyes" ; then
++# no need to test again if we already know its broken :)
++ AC_CACHE_CHECK([whether snprintf is broken],
++ ac_cv_have_broken_snprintf, [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <stdio.h>
++ #include <string.h>
++ #ifdef HAVE_SNPRINTF
++ main()
++ {
++ char buf[50];
++ char expected_out[50];
++ int mazsize = 50 ;
++ #if (SIZEOF_LONG_INT == 8)
++ long int num = 0x7fffffffffffffff;
++ #else
++ long long num = 0x7fffffffffffffffll;
++ #endif
++ strcpy(expected_out, "9223372036854775807");
++ snprintf(buf, mazsize, "%lld", num);
++ if(strcmp(buf, expected_out) != 0)
++ exit(1);
++ exit(0);
++ }
++ #else
++ main() { exit(0); }
++ #endif
++ ]])],[ true ],[
++ ac_cv_have_broken_snprintf="yes"
++
++ ],[])
++ ])
++ if test "x$ac_cv_have_broken_snprintf" = "xyes" ; then
++ AC_DEFINE(BROKEN_SNPRINTF)
++ fi
++ fi
+ fi
+
+ dnl Checks for structure members
+@@ -1709,15 +1592,10 @@
+
+ AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
+ ac_cv_have_ss_family_in_struct_ss, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+- ],
+- [ struct sockaddr_storage s; s.ss_family = 1; ],
+- [ ac_cv_have_ss_family_in_struct_ss="yes" ],
+- [ ac_cv_have_ss_family_in_struct_ss="no" ],
+- )
++ ]], [[ struct sockaddr_storage s; s.ss_family = 1; ]])],[ ac_cv_have_ss_family_in_struct_ss="yes" ],[ ac_cv_have_ss_family_in_struct_ss="no" ])
+ ])
+ if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+ AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
+@@ -1725,15 +1603,11 @@
+
+ AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
+ ac_cv_have___ss_family_in_struct_ss, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+- ],
+- [ struct sockaddr_storage s; s.__ss_family = 1; ],
+- [ ac_cv_have___ss_family_in_struct_ss="yes" ],
+- [ ac_cv_have___ss_family_in_struct_ss="no" ]
+- )
++ ]], [[ struct sockaddr_storage s; s.__ss_family = 1; ]])],[ ac_cv_have___ss_family_in_struct_ss="yes" ],[ ac_cv_have___ss_family_in_struct_ss="no"
++ ])
+ ])
+ if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+ AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
+@@ -1741,14 +1615,10 @@
+
+ AC_CACHE_CHECK([for pw_class field in struct passwd],
+ ac_cv_have_pw_class_in_struct_passwd, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <pwd.h>
+- ],
+- [ struct passwd p; p.pw_class = 0; ],
+- [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
+- [ ac_cv_have_pw_class_in_struct_passwd="no" ]
+- )
++ ]], [[ struct passwd p; p.pw_class = 0; ]])],[ ac_cv_have_pw_class_in_struct_passwd="yes" ],[ ac_cv_have_pw_class_in_struct_passwd="no"
++ ])
+ ])
+ if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
+ AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
+@@ -1756,14 +1626,10 @@
+
+ AC_CACHE_CHECK([for pw_expire field in struct passwd],
+ ac_cv_have_pw_expire_in_struct_passwd, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <pwd.h>
+- ],
+- [ struct passwd p; p.pw_expire = 0; ],
+- [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
+- [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
+- )
++ ]], [[ struct passwd p; p.pw_expire = 0; ]])],[ ac_cv_have_pw_expire_in_struct_passwd="yes" ],[ ac_cv_have_pw_expire_in_struct_passwd="no"
++ ])
+ ])
+ if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
+ AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
+@@ -1771,14 +1637,10 @@
+
+ AC_CACHE_CHECK([for pw_change field in struct passwd],
+ ac_cv_have_pw_change_in_struct_passwd, [
+- AC_TRY_COMPILE(
+- [
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <pwd.h>
+- ],
+- [ struct passwd p; p.pw_change = 0; ],
+- [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
+- [ ac_cv_have_pw_change_in_struct_passwd="no" ]
+- )
++ ]], [[ struct passwd p; p.pw_change = 0; ]])],[ ac_cv_have_pw_change_in_struct_passwd="yes" ],[ ac_cv_have_pw_change_in_struct_passwd="no"
++ ])
+ ])
+ if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
+ AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
+@@ -1787,8 +1649,7 @@
+ dnl make sure we're using the real structure members and not defines
+ AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
+ ac_cv_have_accrights_in_msghdr, [
+- AC_TRY_RUN(
+- [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/uio.h>
+@@ -1800,10 +1661,8 @@
+ m.msg_accrights = 0;
+ exit(0);
+ }
+- ],
+- [ ac_cv_have_accrights_in_msghdr="yes" ],
+- [ ac_cv_have_accrights_in_msghdr="no" ]
+- )
++ ]])],[ ac_cv_have_accrights_in_msghdr="yes" ],[ ac_cv_have_accrights_in_msghdr="no"
++ ],[])
+ ])
+ if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
+ AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
+@@ -1811,8 +1670,7 @@
+
+ AC_CACHE_CHECK([for msg_control field in struct msghdr],
+ ac_cv_have_control_in_msghdr, [
+- AC_TRY_RUN(
+- [
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/uio.h>
+@@ -1824,47 +1682,36 @@
+ m.msg_control = 0;
+ exit(0);
+ }
+- ],
+- [ ac_cv_have_control_in_msghdr="yes" ],
+- [ ac_cv_have_control_in_msghdr="no" ]
+- )
++ ]])],[ ac_cv_have_control_in_msghdr="yes" ],[ ac_cv_have_control_in_msghdr="no"
++ ],[])
+ ])
+ if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
+ AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
+ fi
+
+ AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
+- AC_TRY_LINK([],
+- [ extern char *__progname; printf("%s", __progname); ],
+- [ ac_cv_libc_defines___progname="yes" ],
+- [ ac_cv_libc_defines___progname="no" ]
+- )
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern char *__progname; printf("%s", __progname); ]])],[ ac_cv_libc_defines___progname="yes" ],[ ac_cv_libc_defines___progname="no"
++ ])
+ ])
+ if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
+ AC_DEFINE(HAVE___PROGNAME)
+ fi
+
+ AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
+- AC_TRY_LINK([
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+-],
+- [ printf("%s", __FUNCTION__); ],
+- [ ac_cv_cc_implements___FUNCTION__="yes" ],
+- [ ac_cv_cc_implements___FUNCTION__="no" ]
+- )
++]], [[ printf("%s", __FUNCTION__); ]])],[ ac_cv_cc_implements___FUNCTION__="yes" ],[ ac_cv_cc_implements___FUNCTION__="no"
++ ])
+ ])
+ if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
+ AC_DEFINE(HAVE___FUNCTION__)
+ fi
+
+ AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
+- AC_TRY_LINK([
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+-],
+- [ printf("%s", __func__); ],
+- [ ac_cv_cc_implements___func__="yes" ],
+- [ ac_cv_cc_implements___func__="no" ]
+- )
++]], [[ printf("%s", __func__); ]])],[ ac_cv_cc_implements___func__="yes" ],[ ac_cv_cc_implements___func__="no"
++ ])
+ ])
+ if test "x$ac_cv_cc_implements___func__" = "xyes" ; then