From e4d967580b8b766439c046fa5db9b1523203b372 Mon Sep 17 00:00:00 2001 From: Stefan de Konink Date: Sat, 23 Oct 2021 01:35:33 +0200 Subject: [PATCH] Fix autogen.sh with recent autoconf-2.71 and automake-1.16 (#1271) With a recent upgrade of a development system I have noticed the issues from #1249 and #1239. While both did not resolve the problems I encountered I was able to resolve the issues in the following way. Starting from the work of @rdratlos I noticed that AM_INIT_AUTOMAKE was defined twice, this alone caused the direct breaking of autogen.sh with recent versions of automake and autoconf. Removing the second instance resolved the issue. While @neelpatel05 suggested to use AM_INIT_AUTOMAKE with "foreign subdir-objects" I have still not reproduced that using automake 1.16.5. Hence I have ignored this suggestion, but if someone can show how it breaks without it I'll obviously include it. autoupdate-2.71 failed apply an update and terminated processing at an old AC_TRY_COMPILE code block of "Check of func and co.." I manually rewrote the AC_COMPILE_IFELSE. Applying autoupdate-2.71 to the rest of the m4 files in the repository allowed me to clean up all the remaining warnings. Co-authored-by: Thomas Reim --- acinclude.m4 | 106 +++++++----------- cherokee.m4 | 12 +- configure.ac | 261 +++++++++++++++++++------------------------ m4/etr_socket_nsl.m4 | 32 ++---- m4/libwww.m4 | 18 ++- m4/mysql.m4 | 15 +-- m4/network.m4 | 55 ++++----- m4/nls.m4 | 2 +- m4/po.m4 | 2 +- m4/progtest.m4 | 2 +- m4/pwd_grp.m4 | 56 ++++------ m4/sendfile_samba.m4 | 70 +++++------- 12 files changed, 259 insertions(+), 372 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 03f553f56..ee39a2ba1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,7 +1,7 @@ AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE -AC_LANG_C +AC_LANG([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h @@ -104,11 +104,9 @@ for flag in $acx_pthread_flags; do # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" @@ -133,13 +131,9 @@ if test "x$acx_pthread_ok" = xyes; then # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) - AC_TRY_LINK([#include ], - [int attr=PTHREAD_CREATE_JOINABLE;], - ok=PTHREAD_CREATE_JOINABLE, ok=unknown) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int attr=PTHREAD_CREATE_JOINABLE;]])],[ok=PTHREAD_CREATE_JOINABLE],[ok=unknown]) if test x"$ok" = xunknown; then - AC_TRY_LINK([#include ], - [int attr=PTHREAD_CREATE_UNDETACHED;], - ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int attr=PTHREAD_CREATE_UNDETACHED;]])],[ok=PTHREAD_CREATE_UNDETACHED],[ok=unknown]) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, @@ -206,39 +200,33 @@ AC_ARG_WITH(sendfile-support, case "$host_os" in *linux*) AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[\ int tofd, fromfd; off64_t offset; size_t total; ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) +]])],[samba_cv_HAVE_SENDFILE64=yes],[samba_cv_HAVE_SENDFILE64=no])]) AC_CACHE_CHECK([for linux sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[\ int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) # Try and cope with broken Linux sendfile.... AC_CACHE_CHECK([for broken linux sendfile support],samba_cv_HAVE_BROKEN_LINUX_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) #undef _FILE_OFFSET_BITS #endif -#include ], -[\ +#include ]], [[\ int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)]) +]])],[samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes],[samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then AC_DEFINE(HAVE_SENDFILE64,1,[Whether 64-bit sendfile() is available]) @@ -258,12 +246,11 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)] ;; *freebsd*) AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include #include #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd, ret, total=0; off_t offset, nwritten; struct sf_hdtr hdr; @@ -275,8 +262,7 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)] hdtrl.iov_base = NULL; hdtrl.iov_len = 0; ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() support is available]) @@ -289,10 +275,9 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) *hpux*) AC_CACHE_CHECK([for hpux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd; size_t total=0; struct iovec hdtrl[2]; @@ -303,8 +288,7 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) hdtrl[0].iov_len = 0; nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) +]])],[samba_cv_HAVE_SENDFILE64=yes],[samba_cv_HAVE_SENDFILE64=no])]) if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then AC_DEFINE(HAVE_SENDFILE64,1,[Whether sendfile64() is available]) AC_DEFINE(HPUX_SENDFILE_API,1,[Whether the hpux sendfile() API is available]) @@ -314,10 +298,9 @@ samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) fi AC_CACHE_CHECK([for hpux sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd; size_t total=0; struct iovec hdtrl[2]; @@ -328,8 +311,7 @@ samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) hdtrl[0].iov_len = 0; nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) AC_DEFINE(HPUX_SENDFILE_API,1,[Whether the hpux sendfile() API is available]) @@ -342,9 +324,8 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) *solaris*) AC_CHECK_LIB(sendfile,sendfilev) AC_CACHE_CHECK([for solaris sendfilev64 support],samba_cv_HAVE_SENDFILEV64,[ - AC_TRY_LINK([\ -#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ +#include ]], [[\ int sfvcnt; size_t xferred; struct sendfilevec vec[2]; @@ -363,8 +344,7 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) vec[1].sfv_off = 0; vec[1].sfv_len = 0; nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) +]])],[samba_cv_HAVE_SENDFILEV64=yes],[samba_cv_HAVE_SENDFILEV64=no])]) if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then AC_DEFINE(HAVE_SENDFILEV64,1,[Whether sendfilev64() is available]) @@ -375,9 +355,8 @@ samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) fi AC_CACHE_CHECK([for solaris sendfilev support],samba_cv_HAVE_SENDFILEV,[ - AC_TRY_LINK([\ -#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ +#include ]], [[\ int sfvcnt; size_t xferred; struct sendfilevec vec[2]; @@ -396,8 +375,7 @@ samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) vec[1].sfv_off = 0; vec[1].sfv_len = 0; nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) +]])],[samba_cv_HAVE_SENDFILEV=yes],[samba_cv_HAVE_SENDFILEV=no])]) if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then AC_DEFINE(HAVE_SENDFILEV,1,[Whether sendfilev() is available]) @@ -427,47 +405,41 @@ samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) AC_DEFUN([HYDRA_TCP_CORK], [ AC_MSG_CHECKING([whether TCP_CORK is a valid TCP socket option]) -AC_TRY_COMPILE( -#include +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include #include -,[ +]], [[ int one = 1, fd; if (setsockopt(fd, IPPROTO_TCP, TCP_CORK, (void *) &one, sizeof (one)) == -1) return -1; return 0; -], -dnl *** FOUND -AC_DEFINE( HAVE_TCP_CORK, 1, [TCP_CORK was found and will be used]) -AC_MSG_RESULT(yes), -dnl *** NOT FOUND +]])],[dnl *** FOUND +AC_DEFINE( HAVE_TCP_CORK, 1, TCP_CORK was found and will be used) +AC_MSG_RESULT(yes)],[dnl *** NOT FOUND AC_MSG_RESULT(no) -) +]) ]) AC_DEFUN([HYDRA_TCP_NOPUSH], [ AC_MSG_CHECKING([whether TCP_NOPUSH is a valid TCP socket option]) -AC_TRY_COMPILE( -#include +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include #include -,[ +]], [[ int one = 1, fd; if (setsockopt(fd, IPPROTO_TCP, TCP_NOPUSH, (void *) &one, sizeof (one)) == -1) return -1; return 0; -], -dnl *** FOUND -AC_DEFINE( HAVE_TCP_NOPUSH, 1, [TCP_NOPUSH was found and will be used]) -AC_MSG_RESULT(yes), -dnl *** NOT FOUND +]])],[dnl *** FOUND +AC_DEFINE( HAVE_TCP_NOPUSH, 1, TCP_NOPUSH was found and will be used) +AC_MSG_RESULT(yes)],[dnl *** NOT FOUND AC_MSG_RESULT(no) -) +]) ]) diff --git a/cherokee.m4 b/cherokee.m4 index 49d127f00..0416b7dda 100644 --- a/cherokee.m4 +++ b/cherokee.m4 @@ -59,7 +59,7 @@ dnl Now check if the installed CHEROKEE is sufficiently new. (Also sanity dnl checks the results of cherokee-config to some extent dnl rm -f conf.cherokeetest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -118,7 +118,7 @@ int main (int argc, char *argv[]) } } -],, no_cherokee=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_cherokee=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -140,11 +140,10 @@ int main (int argc, char *argv[]) echo "*** Could not run Cherokee test program, checking why..." CFLAGS="$CFLAGS $CHEROKEE_CFLAGS $SDL_CFLAGS" LIBS="$LIBS $CHEROKEE_LIBS $SDL_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include "cherokee.h" -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding Cherokee or finding the wrong" echo "*** version of Cherokee. If it is not finding Cherokee, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -152,8 +151,7 @@ int main (int argc, char *argv[]) echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + 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 "*** exact error that occured. This usually means Cherokee was incorrectly installed" echo "*** or that you have moved Cherokee since it was installed. In the latter case, you" echo "*** may want to edit the cherokee-config script: $CHEROKEE_CONFIG" ]) diff --git a/configure.ac b/configure.ac index d6298f27a..a41197ff0 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ USA ]) dnl require autoconf 2.68 -AC_PREREQ([2.68]) +AC_PREREQ([2.71]) dnl Version m4_define([cherokee_major_version], [1]) @@ -29,7 +29,7 @@ m4_define([cherokee_micro_version], [104]) m4_define([cherokee_version], m4_format('%s.%s.%s', cherokee_major_version, cherokee_minor_version, cherokee_micro_version)) dnl Init autoconf and automake -AC_INIT([cherokee], [cherokee_version], [http://bugs.cherokee-project.com/], [cherokee]) +AC_INIT([cherokee],[cherokee_version],[https://github.com/cherokee/webserver/issues],[cherokee]) AC_CONFIG_SRCDIR([cherokee/server.c]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([no-define]) @@ -57,7 +57,7 @@ AC_SUBST(CHEROKEE_REVISION) AC_DEFINE_UNQUOTED(CHEROKEE_CONFIG_ARGS, "$ac_configure_args", [configure arguments]) dnl Check the SVN revision -AC_ARG_ENABLE(beta, AC_HELP_STRING([--enable-beta], [Enable beta development]), +AC_ARG_ENABLE(beta, AS_HELP_STRING([--enable-beta],[Enable beta development]), is_beta="$enableval", is_beta="no") if test x"$is_beta" = "xyes"; then @@ -164,13 +164,13 @@ AC_MSG_RESULT($CPU_CACHE_LINE) dnl dnl OS string dnl -AC_ARG_ENABLE(os_string, AC_HELP_STRING([--enable-os-string=STR], [Set a customized OS type string]), [os_string="$enableval"]) +AC_ARG_ENABLE(os_string, AS_HELP_STRING([--enable-os-string=STR],[Set a customized OS type string]), [os_string="$enableval"]) AC_DEFINE_UNQUOTED(OS_TYPE, "${os_string}", [OS type]) dnl dnl Tracing dnl -AC_ARG_ENABLE(trace, AC_HELP_STRING([--enable-trace], [Enable trace facility]), +AC_ARG_ENABLE(trace, AS_HELP_STRING([--enable-trace],[Enable trace facility]), [enable_trace="$enableval" AC_DEFINE(TRACE_ENABLED, 1, [Trace facility]) ], [enable_trace="no"]) @@ -178,7 +178,7 @@ AC_ARG_ENABLE(trace, AC_HELP_STRING([--enable-trace], [Enable trace facility]), dnl dnl Backtraces dnl -AC_ARG_ENABLE(backtraces, AC_HELP_STRING([--enable-backtraces], [Enable backtraces on error]), +AC_ARG_ENABLE(backtraces, AS_HELP_STRING([--enable-backtraces],[Enable backtraces on error]), [enable_backtraces="$enableval" AC_DEFINE(BACKTRACES_ENABLED, 1, [Backtracing facility]) ], [enable_backtraces="no"]) @@ -197,21 +197,20 @@ LIBTOOL_EXPORT_OPTIONS= AC_SUBST(LIBTOOL_EXPORT_OPTIONS) dnl Set the Version -AM_INIT_AUTOMAKE AM_MAINTAINER_MODE AC_CONFIG_HEADERS(config.h) AC_SUBST(VERSION) -dnl Initialize Libtool -m4_ifdef([LT_INIT], [LT_INIT([dlopen shared static])], [AC_LIBTOOL_DLOPEN]) - dnl Paths AC_PROG_CC -AC_PROG_CC_STDC +AC_PROG_CXX AC_PROG_INSTALL AC_PROG_MAKE_SET -AM_PROG_LIBTOOL +AC_PROG_YACC +AC_PROG_LEX(noyywrap) +AC_PROG_LN_S +LT_INIT(dlopen) AC_PATH_PROG(cherokeepath, cherokee) @@ -230,9 +229,7 @@ fi dnl dnl Check for headers dnl -AC_HEADER_STDC AC_HEADER_DIRENT -AC_HEADER_TIME AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(endian.h machine/endian.h sys/machine.h sys/endian.h sys/isa_defs.h sys/utsname.h sys/poll.h poll.h ) @@ -240,16 +237,24 @@ AC_CHECK_HEADERS(sys/socket.h sys/un.h netinet/in.h arpa/inet.h netinet/tcp.h sy AC_CHECK_HEADERS(sys/resource.h resource.h unistd.h syslog.h stdint.h inttypes.h error.h pwd.h sys/uio.h) AC_CHECK_HEADERS(pthread.h netdb.h stdarg.h sys/filio.h sys/varargs.h sys/select.h sys/mman.h sys/uio.h grp.h) AC_CHECK_HEADERS(sched.h execinfo.h) +AC_CHECK_HEADERS(fenv.h float.h libintl.h limits.h locale.h stddef.h stdlib.h string.h strings.h sys/param.h wchar.h wctype.h) AC_SYS_LARGEFILE -AC_SIZE_T +AC_CHECK_HEADER_STDBOOL AC_TYPE_UID_T -AC_TYPE_MODE_T +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_PID_T -AC_STRUCT_ST_RDEV +AC_C_RESTRICT +AC_TYPE_SSIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T AC_CHECK_TYPE(ino_t, unsigned) AC_CHECK_TYPE(loff_t, off_t) AC_CHECK_TYPE(offset_t, loff_t) @@ -267,18 +272,20 @@ AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(time_t) AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[ -AC_TRY_RUN([#include -main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], -samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)]) +AC_RUN_IFELSE([AC_LANG_SOURCE([[#include +main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }]])],[samba_cv_have_longlong=yes],[samba_cv_have_longlong=no],[samba_cv_have_longlong=cross])]) if test x"$samba_cv_have_longlong" = x"yes"; then - AC_DEFINE(HAVE_LONGLONG,1,[Whether the host supports long long']) + AC_DEFINE(HAVE_LONGLONG,1,[Whether the host supports long long]) fi AC_FUNC_MEMCMP AC_FUNC_MMAP AC_FUNC_FORK +AC_FUNC_CHOWN +AC_FUNC_ERROR_AT_LINE +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK -AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r getrlimit getdtablesize readdir readdir_r flockfile funlockfile strnstr backtrace random srandom srandomdev) +AC_CHECK_FUNCS(dup2 ftruncate getcwd gettimeofday inet_ntoa gmtime gmtime_r localtime localtime_r getrlimit getdtablesize memset mkdir readdir readdir_r flockfile funlockfile backtrace munmap pathconf pstat_getdynamic realpath rmdir strchr strcspn strdup strncasecmp strpbrk strrchr strspn strnstr strstr strtol strtoul random srandom srandomdev) FW_CHECK_PWD FW_CHECK_GRP @@ -331,7 +338,7 @@ dnl Epoll dnl AC_CHECK_HEADER(sys/epoll.h, have_epoll_include=yes, have_epoll_include=no) -AC_ARG_ENABLE(epoll, AC_HELP_STRING([--disable-epoll],[Disable epoll() support]), +AC_ARG_ENABLE(epoll, AS_HELP_STRING([--disable-epoll],[Disable epoll() support]), wants_epoll="$enableval", wants_epoll="yes") have_epoll=no @@ -455,7 +462,7 @@ dnl Pthread dnl with_pthread="yes" have_pthread="no" -AC_ARG_ENABLE(pthread, AC_HELP_STRING([--disable-pthread],[Disable threading support]), +AC_ARG_ENABLE(pthread, AS_HELP_STRING([--disable-pthread],[Disable threading support]), with_pthread="$enableval", with_pthread="yes") AM_CONDITIONAL(USE_PTHREAD, test "x$with_pthread" = "xyes") @@ -510,9 +517,7 @@ then AC_MSG_CHECKING([for pthread_rwlock_t support]) have_pthread_rwlock_t=yes - AC_TRY_COMPILE([#include ], - [pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);], - compiled=yes, compiled=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);]])],[compiled=yes],[compiled=no]) if test "$compiled" = "yes"; then AC_MSG_RESULT([ok]) @@ -523,9 +528,7 @@ then oldcflags2="$CFLAGS" CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500" - AC_TRY_COMPILE([#include ], - [pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);], - compiled=yes, compiled=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);]])],[compiled=yes],[compiled=no]) if test "$compiled" = "yes"; then AC_MSG_RESULT([-D_XOPEN_SOURCE=500]) @@ -612,7 +615,7 @@ dnl also just to be sure. dnl AC_MSG_CHECKING(whether va_list assignments need array notation) AC_CACHE_VAL(ac_cv_valistisarray, - [AC_TRY_RUN([#include + [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include void foo(int i, ...) { va_list ap1, ap2; @@ -622,10 +625,7 @@ AC_CACHE_VAL(ac_cv_valistisarray, va_end(ap1); va_end(ap2); } int main() - { foo(0, 123); return(0); }], - [ac_cv_valistisarray=false], - [ac_cv_valistisarray=true], - [ac_cv_valistisarray=false])]) + { foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])]) if test "$ac_cv_valistisarray" = true ; then AC_DEFINE(HAVE_VA_LIST_AS_ARRAY,,[va_list works copying an array]) @@ -642,11 +642,8 @@ dnl AC_STRUCT_TIMEZONE AC_MSG_CHECKING(for global timezone) -AC_TRY_LINK([#include ], -[int res; res = timezone / 60;], -[AC_MSG_RESULT(yes) -AC_DEFINE(HAVE_INT_TIMEZONE,, [Set to 1 if you have the global variable timezone])], -AC_MSG_RESULT(no)) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int res; res = timezone / 60;]])],[AC_MSG_RESULT(yes) +AC_DEFINE(HAVE_INT_TIMEZONE,, [Set to 1 if you have the global variable timezone])],[AC_MSG_RESULT(no)]) dnl @@ -730,14 +727,13 @@ dnl dnl Check of off64_t dnl AC_CACHE_CHECK([for off64_t],samba_cv_HAVE_OFF64_T,[ -AC_TRY_RUN([ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ #if defined(HAVE_UNISTD_H) #include #endif #include #include -main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }], -samba_cv_HAVE_OFF64_T=yes,samba_cv_HAVE_OFF64_T=no,samba_cv_HAVE_OFF64_T=cross)]) +main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }]])],[samba_cv_HAVE_OFF64_T=yes],[samba_cv_HAVE_OFF64_T=no],[samba_cv_HAVE_OFF64_T=cross])]) if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then AC_DEFINE(HAVE_OFF64_T,1,[Whether off64_t is available]) fi @@ -763,17 +759,14 @@ dnl union semun dnl AC_MSG_CHECKING([for union semun]) AC_CACHE_VAL(ac_cv_struct_semun, [ - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include #include ; - ],[ + ]], [[ union semun semdat; - ], - ac_cv_struct_semun=yes, - ac_cv_struct_semun=no - ) + ]])],[ac_cv_struct_semun=yes],[ac_cv_struct_semun=no + ]) ]) AC_MSG_RESULT($ac_cv_struct_semun) if test "$ac_cv_struct_semun" = "yes"; then @@ -797,7 +790,7 @@ dnl I got this mostly from Apache's tests dnl AC_ARG_ENABLE(ipv6, - AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support]), + AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), [ if test "$enableval" = "no"; then disabled_ipv6=1 fi ], @@ -881,13 +874,9 @@ dnl dnl Look for socklen_t dnl AC_MSG_CHECKING([for socklen_t]) -AC_TRY_COMPILE( - [#include - #include ], - [socklen_t len = 42; return 0;], - ac_cv_type_socklen_t=yes, - ac_cv_type_socklen_t=no -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[socklen_t len = 42; return 0;]])],[ac_cv_type_socklen_t=yes],[ac_cv_type_socklen_t=no +]) if test $ac_cv_type_socklen_t != yes; then AC_DEFINE(socklen_t, int, [Substitute for socklen_t]) @@ -900,25 +889,21 @@ dnl dnl Check of __func__ and co.. dnl AC_MSG_CHECKING([whether our compiler supports __func__]) -AC_TRY_COMPILE([], - [const char *cp = __func__;], +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[const char *cp = __func__;]], AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) AC_MSG_CHECKING([whether our compiler supports __FUNCTION__]) - AC_TRY_COMPILE([], - [const char *cp = __FUNCTION__;], - AC_MSG_RESULT([yes]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[const char *cp = __FUNCTION__;]])],[AC_MSG_RESULT(yes) AC_DEFINE(__func__, __FUNCTION__, - [Define to appropriate substitue if compiler doesnt have __func__]), - AC_MSG_RESULT([no]) + Define to appropriate substitue if compiler doesnt have __func__)],[AC_MSG_RESULT(no) AC_DEFINE(__func__, __FILE__, - [Define to appropriate substitue if compiler doesnt have __func__]))) + Define to appropriate substitue if compiler doesnt have __func__)]))]) dnl dnl Temporal directory dnl -AC_ARG_ENABLE(tmpdir, AC_HELP_STRING([--enable-tmpdir=DIR],[default directory for temporary files])) +AC_ARG_ENABLE(tmpdir, AS_HELP_STRING([--enable-tmpdir=DIR],[default directory for temporary files])) AC_MSG_CHECKING(directory to use for temporary files) if test -n "$enable_tmpdir"; then @@ -957,7 +942,7 @@ dnl have_pcre="built-in" AC_ARG_ENABLE(internal_pcre, - AC_HELP_STRING([--enable-internal-pcre],[Enable internal PCRE]), + AS_HELP_STRING([--enable-internal-pcre],[Enable internal PCRE]), use_internal_pcre="$enableval", use_internal_pcre="no") if test "x$use_internal_pcre" != "xyes"; then @@ -973,7 +958,7 @@ AM_CONDITIONAL(USE_INTERNAL_PCRE, test "x$have_pcre" = "xbuilt-in") dnl dnl PAM dnl -AC_ARG_ENABLE(pam, AC_HELP_STRING([--disable-pam],[Disable PAM support]), use_pam="$enableval", use_pam="yes") +AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam],[Disable PAM support]), use_pam="$enableval", use_pam="yes") if test "x$use_pam" = "xyes"; then AC_CHECK_LIB(pam, pam_start, have_pam_lib=yes, have_pam_lib=no) AC_CHECK_LIB(pam, _pam_dispatch, have_pam_dispatch=yes, have_pam_dispatch=no) @@ -1037,24 +1022,18 @@ if test "$use_crypt_r" = "yes"; then crypt_r_style=none # pthread.h is needed on AIX - AC_TRY_COMPILE([#include - #include ], - [CRYPTD buffer;], - crypt_r_style=cryptd) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[CRYPTD buffer;]])],[crypt_r_style=cryptd],[]) if test "$crypt_r_style" = "none"; then - AC_TRY_COMPILE([#include ], - [struct crypt_data buffer;], - crypt_r_style=struct_crypt_data) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct crypt_data buffer;]])],[crypt_r_style=struct_crypt_data],[]) fi if test "$crypt_r_style" = "none"; then - AC_TRY_COMPILE([#define _GNU_SOURCE - #include ], - [struct crypt_data buffer;], - [crypt_r_style=struct_crypt_data + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE + #include ]], [[struct crypt_data buffer;]])],[crypt_r_style=struct_crypt_data CRYPT_CFLAGS="-D_GNU_SOURCE" - AC_SUBST(CRYPT_CFLAGS)]) + AC_SUBST(CRYPT_CFLAGS)],[]) fi AC_MSG_RESULT([$crypt_r_style]) @@ -1079,7 +1058,7 @@ dnl dnl OpenSSL dnl AC_ARG_WITH(libssl, - AC_HELP_STRING([--with-libssl@<:@=DIR@:>@],[Include libssl/OpenSSL support (default yes)]), + AS_HELP_STRING([--with-libssl@<:@=DIR@:>@],[Include libssl/OpenSSL support (default yes)]), [WITH_OPENSSL=$withval],[WITH_OPENSSL=yes]) have_openssl=no @@ -1125,15 +1104,13 @@ if test "x$USE_NLS" = "xyes"; then fi AM_CONDITIONAL(NLS_ENABLED, test "x$USE_NLS" = "xyes") -AC_CONFIG_FILES([po/admin/Makefile.in]) dnl dnl LDAP dnl AC_ARG_WITH([ldap], - AC_HELP_STRING([--with-ldap=@<:@ARG@:>@], - [use OpenLDAP development library @<:@default=yes@:>@, optionally specify path to dev libs] - ), + AS_HELP_STRING([--with-ldap=@<:@ARG@:>@],[use OpenLDAP development library @<:@default=yes@:>@, optionally specify path to dev libs + ]), [ if test "$withval" = "no"; then want_ldap="no" @@ -1178,9 +1155,8 @@ dnl dnl GeoIP library dnl AC_ARG_WITH([geoip], - AC_HELP_STRING([--with-geoip=@<:@ARG@:>@], - [use the GeoIP library @<:@default=yes@:>@, optionally specify path to dev libs] - ), + AS_HELP_STRING([--with-geoip=@<:@ARG@:>@],[use the GeoIP library @<:@default=yes@:>@, optionally specify path to dev libs + ]), [ if test "$withval" = "no"; then want_geoip="no" @@ -1212,9 +1188,8 @@ dnl dnl FFMpeg library dnl AC_ARG_WITH([ffmpeg], - AC_HELP_STRING([--with-ffmpeg=@<:@ARG@:>@], - [use the FFMpeg library @<:@default=yes@:>@, optionally specify path to dev libs] - ), + AS_HELP_STRING([--with-ffmpeg=@<:@ARG@:>@],[use the FFMpeg library @<:@default=yes@:>@, optionally specify path to dev libs + ]), [ if test "$withval" = "no"; then want_ffmpeg="no" @@ -1261,7 +1236,7 @@ AM_CONDITIONAL(HAVE_FFMPEG, test "x$have_ffmpeg" = "xyes") dnl dnl WWW root directory, and user/group dnl -AC_ARG_WITH(wwwroot, AC_HELP_STRING([--with-wwwroot=DIR], [Set the WWW root directory]), +AC_ARG_WITH(wwwroot, AS_HELP_STRING([--with-wwwroot=DIR],[Set the WWW root directory]), WWW_ROOT="$withval", [ dnl MacOS X if test -d "/Library/WebServer/Documents"; then @@ -1276,7 +1251,7 @@ AC_ARG_WITH(wwwroot, AC_HELP_STRING([--with-wwwroot=DIR], [Set the WWW root dire ]) AC_SUBST(WWW_ROOT) -AC_ARG_WITH(cgiroot, AC_HELP_STRING([--with-cgiroot=DIR], [Set the CGI directory]), +AC_ARG_WITH(cgiroot, AS_HELP_STRING([--with-cgiroot=DIR],[Set the CGI directory]), CGI_ROOT="$withval", [ dnl MacOS X if test -d "/Library/WebServer/CGI-Executables"; then @@ -1291,11 +1266,11 @@ AC_ARG_WITH(cgiroot, AC_HELP_STRING([--with-cgiroot=DIR], [Set the CGI directory ]) AC_SUBST(CGI_ROOT) -AC_ARG_WITH(wwwuser, AC_HELP_STRING([--with-wwwuser=USER], [Set default execution user]), +AC_ARG_WITH(wwwuser, AS_HELP_STRING([--with-wwwuser=USER],[Set default execution user]), WWW_USER="$withval", WWW_USER="") AC_SUBST(WWW_USER) -AC_ARG_WITH(wwwgroup, AC_HELP_STRING([--with-wwwgroup=GROUP], [Set default execution group]), +AC_ARG_WITH(wwwgroup, AS_HELP_STRING([--with-wwwgroup=GROUP],[Set default execution group]), WWW_GROUP="$withval", WWW_GROUP="") AC_SUBST(WWW_GROUP) @@ -1303,7 +1278,7 @@ AC_SUBST(WWW_GROUP) dnl dnl PHP fcgi dnl -AC_ARG_WITH(php, AC_HELP_STRING([--with-php=/path/to/php], [Path to php-fpm or php-cgi]), +AC_ARG_WITH(php, AS_HELP_STRING([--with-php=/path/to/php],[Path to php-fpm or php-cgi]), PHPCGI="$withval", PHPCGI="") dnl If no php, try to find it @@ -1356,7 +1331,7 @@ dnl wants_admin="yes" have_python="yes" -AC_ARG_WITH([python], AC_HELP_STRING([--with-python=/path/to/python],[Path to Python interpreter]), +AC_ARG_WITH([python], AS_HELP_STRING([--with-python=/path/to/python],[Path to Python interpreter]), PYTHON="$withval", [ AC_PATH_PROGS(PYTHON, python python2 python2.7 python2.6 python2.5 python2.4) @@ -1390,7 +1365,7 @@ dnl Cherokee admin dnl if test "x$wants_admin" = "xyes"; then AC_ARG_ENABLE(admin, - AC_HELP_STRING([--disable-admin],[Disable Cherokee-admin installation]), + AS_HELP_STRING([--disable-admin],[Disable Cherokee-admin installation]), wants_admin="$enableval", wants_admin="yes") fi AM_CONDITIONAL(INSTALL_ADMIN, test "x$wants_admin" != "xno") @@ -1408,7 +1383,7 @@ dnl Options dnl use_static_module="" AC_ARG_ENABLE(static-module, - AC_HELP_STRING([--enable-static-module=MODULE][]), + AS_HELP_STRING([--enable-static-module=MODULE]), [use_static_module="$use_static_module $enableval "],[]) modules="error_redir error_nn server_info file dirlist cgi fcgi scgi uwsgi proxy redir common ssi secdownload empty_gif drop admin custom_error dbslayer streaming gzip deflate ncsa combined custom pam ldap mysql htpasswd plain htdigest authlist round_robin ip_hash failover directory extensions request header exists fullpath method from bind tls geoip url_arg v_or wildcard rehost target_ip evhost post_track post_report libssl render_rrd rrd not and or" @@ -1532,49 +1507,49 @@ AM_CONDITIONAL(STATIC_RULE_NOT, grep _not_ $conf_h >/dev/ AM_CONDITIONAL(STATIC_RULE_AND, grep _and_ $conf_h >/dev/null) AM_CONDITIONAL(STATIC_RULE_OR, grep _or_ $conf_h >/dev/null) -AC_OUTPUT([ -Makefile -cget/Makefile -cherokee-config -cherokee.pc -cherokee.spec -org.cherokee.webserver.plist -cherokee/Makefile -contrib/Makefile -icons/Makefile -m4/Makefile -qa/Makefile -doc/Makefile -themes/Makefile -themes/default/Makefile -themes/firefox3/Makefile -themes/white/Makefile -themes/plain/Makefile -packages/Makefile -packages/osx/Makefile -packages/osx/Info.plist -packages/osx/Description.plist -www/Makefile -dbslayer/Makefile -admin/Makefile -admin/icons/Makefile -admin/plugins/Makefile -admin/wizards/Makefile -admin/static/Makefile -admin/static/js/Makefile -admin/static/css/Makefile -admin/static/images/Makefile -admin/static/images/flags/Makefile -admin/static/images/wizards/Makefile -admin/static/images/other/Makefile -admin/CTK/Makefile -admin/CTK/CTK/Makefile -admin/CTK/static/css/Makefile -admin/CTK/static/images/Makefile -admin/CTK/static/js/Makefile -admin/CTK/static/Makefile -po/Makefile -]) +AC_CONFIG_FILES([Makefile + admin/CTK/CTK/Makefile + admin/CTK/Makefile + admin/CTK/static/Makefile + admin/CTK/static/css/Makefile + admin/CTK/static/images/Makefile + admin/CTK/static/js/Makefile + admin/Makefile + admin/icons/Makefile + admin/plugins/Makefile + admin/static/Makefile + admin/static/css/Makefile + admin/static/images/Makefile + admin/static/images/flags/Makefile + admin/static/images/other/Makefile + admin/static/images/wizards/Makefile + admin/static/js/Makefile + admin/wizards/Makefile + cget/Makefile + cherokee-config + cherokee.pc + cherokee.spec + cherokee/Makefile + contrib/Makefile + dbslayer/Makefile + doc/Makefile + icons/Makefile + m4/Makefile + org.cherokee.webserver.plist + packages/Makefile + packages/osx/Description.plist + packages/osx/Info.plist + packages/osx/Makefile + po/Makefile + po/admin/Makefile.in + qa/Makefile + themes/Makefile + themes/default/Makefile + themes/firefox3/Makefile + themes/plain/Makefile + themes/white/Makefile + www/Makefile]) +AC_OUTPUT methods="" diff --git a/m4/etr_socket_nsl.m4 b/m4/etr_socket_nsl.m4 index d9ca9e004..800d57cb2 100644 --- a/m4/etr_socket_nsl.m4 +++ b/m4/etr_socket_nsl.m4 @@ -13,57 +13,51 @@ AC_CACHE_CHECK(for libraries containing socket functions, ac_cv_socket_libs, [ oCFLAGS=$CFLAGS - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include - ], - [ + ]], [[ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); - ], - ac_cv_socket_libs=-lc, ac_cv_socket_libs=no) + ]])],[ac_cv_socket_libs=-lc],[ac_cv_socket_libs=no]) if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include - ], - [ + ]], [[ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); - ], - ac_cv_socket_libs=-lsocket, ac_cv_socket_libs=no) + ]])],[ac_cv_socket_libs=-lsocket],[ac_cv_socket_libs=no]) fi if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lsocket -lnsl" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include - ], - [ + ]], [[ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); - ], - ac_cv_socket_libs="-lsocket -lnsl", ac_cv_socket_libs=no) + ]])],[ac_cv_socket_libs="-lsocket -lnsl"],[ac_cv_socket_libs=no]) fi if test x"$ac_cv_socket_libs" = "xno" then CFLAGS="$oCFLAGS -lws2_32" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include @@ -74,13 +68,11 @@ ac_cv_socket_libs, [ #include #include #include - ], - [ + ]], [[ struct in_addr add; int sd = socket(AF_INET, SOCK_STREAM, 0); inet_ntoa(add); - ], - ac_cv_socket_libs="-lws2_32", ac_cv_socket_libs=no) + ]])],[ac_cv_socket_libs="-lws2_32"],[ac_cv_socket_libs=no]) fi CFLAGS=$oCFLAGS diff --git a/m4/libwww.m4 b/m4/libwww.m4 index 1dec5cdce..f9adb3cf3 100644 --- a/m4/libwww.m4 +++ b/m4/libwww.m4 @@ -6,33 +6,29 @@ dnl Code from libwww/configure.in AC_MSG_CHECKING(for readdir_r) if test -z "$ac_cv_readdir_args"; then - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include - ], - [ + ]], [[ struct dirent dir, *dirp; DIR *mydir; dirp = readdir_r(mydir, &dir); - ], ac_cv_readdir_args=2) + ]])],[ac_cv_readdir_args=2],[]) fi if test -z "$ac_cv_readdir_args"; then - AC_TRY_COMPILE( - [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include - ], - [ + ]], [[ struct dirent dir, *dirp; DIR *mydir; int rc; rc = readdir_r(mydir, &dir, &dirp); - ], ac_cv_readdir_args=3) + ]])],[ac_cv_readdir_args=3],[]) fi AC_ARG_ENABLE([readdir_r], - AC_HELP_STRING([--disable-readdir_r], [disable readdir_r usage]), + AS_HELP_STRING([--disable-readdir_r],[disable readdir_r usage]), want_readdir_r="$enableval", want_readdir_r="yes") diff --git a/m4/mysql.m4 b/m4/mysql.m4 index fb9a5d6c8..2df2569eb 100644 --- a/m4/mysql.m4 +++ b/m4/mysql.m4 @@ -1,8 +1,7 @@ AC_DEFUN([AX_LIB_MYSQL],[ AC_ARG_WITH([mysql], - AC_HELP_STRING([--with-mysql=@<:@ARG@:>@], - [use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config] - ), + AS_HELP_STRING([--with-mysql=@<:@ARG@:>@],[use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config + ]), [ if test "$withval" = "no"; then want_mysql="no" @@ -51,14 +50,12 @@ AC_DEFUN([AX_LIB_MYSQL],[ old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $MYSQL_CFLAGS" - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include - ],[ + ]], [[ int a = 1; - ], - have_mysql_h=yes, - have_mysql_h=no - ) + ]])],[have_mysql_h=yes],[have_mysql_h=no + ]) CFLAGS="$old_CFLAGS" if test "x$have_mysql_h" = "xyes" ; then diff --git a/m4/network.m4 b/m4/network.m4 index 7d8266cd3..134c605a0 100644 --- a/m4/network.m4 +++ b/m4/network.m4 @@ -7,7 +7,7 @@ dnl describing the error codes. dnl AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO],[ AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[ - AC_TRY_RUN( [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -29,7 +29,7 @@ void main(void) { } exit(0); } -],[ +]])],[ ac_cv_working_getaddrinfo="yes" ],[ ac_cv_working_getaddrinfo="no" @@ -51,7 +51,7 @@ dnl check for working getnameinfo() dnl AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO],[ AC_CACHE_CHECK(for working getnameinfo, ac_cv_working_getnameinfo,[ - AC_TRY_RUN( [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -79,7 +79,7 @@ void main(void) { exit(0); } } -],[ +]])],[ ac_cv_working_getnameinfo="yes" ],[ ac_cv_working_getnameinfo="no" @@ -94,12 +94,12 @@ fi AC_DEFUN([APR_CHECK_SOCKADDR_IN6],[ AC_CACHE_CHECK(for sockaddr_in6, ac_cv_define_sockaddr_in6,[ -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -],[ +]], [[ struct sockaddr_in6 sa; -],[ +]])],[ ac_cv_define_sockaddr_in6=yes ],[ ac_cv_define_sockaddr_in6=no @@ -128,12 +128,9 @@ dnl AC_DEFUN([AC_ACME_SOCKADDR_STORAGE], [AC_MSG_CHECKING(if struct sockaddr_storage exists) AC_CACHE_VAL(ac_cv_acme_sockaddr_storage, - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -#include ], - [struct sockaddr_storage sas], - ac_cv_acme_sockaddr_storage=yes, - ac_cv_acme_sockaddr_storage=no)) +#include ]], [[struct sockaddr_storage sas]])],[ac_cv_acme_sockaddr_storage=yes],[ac_cv_acme_sockaddr_storage=no])) AC_MSG_RESULT($ac_cv_acme_sockaddr_storage) if test $ac_cv_acme_sockaddr_storage = yes ; then AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [HAVE_SOCKADDR_STORAGE]) @@ -153,13 +150,10 @@ dnl AC_DEFUN([AC_ACME_SOCKADDR_IN6], [AC_MSG_CHECKING(if struct sockaddr_in6 exists) AC_CACHE_VAL(ac_cv_acme_sockaddr_in6, - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -#include ], - [struct sockaddr_in6 sa6], - ac_cv_acme_sockaddr_in6=yes, - ac_cv_acme_sockaddr_in6=no)) +#include ]], [[struct sockaddr_in6 sa6]])],[ac_cv_acme_sockaddr_in6=yes],[ac_cv_acme_sockaddr_in6=no])) AC_MSG_RESULT($ac_cv_acme_sockaddr_in6) if test $ac_cv_acme_sockaddr_in6 = yes ; then AC_DEFINE(HAVE_SOCKADDR_IN6, 1, [HAVE_SOCKADDR_IN6]) @@ -180,13 +174,10 @@ dnl AC_DEFUN([AC_ACME_SOCKADDR_UN], [AC_MSG_CHECKING(if struct sockaddr_un exists) AC_CACHE_VAL(ac_cv_acme_sockaddr_un, - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -#include ], - [struct sockaddr_un sa6], - ac_cv_acme_sockaddr_un=yes, - ac_cv_acme_sockaddr_un=no)) +#include ]], [[struct sockaddr_un sa6]])],[ac_cv_acme_sockaddr_un=yes],[ac_cv_acme_sockaddr_un=no])) AC_MSG_RESULT($ac_cv_acme_sockaddr_un) if test $ac_cv_acme_sockaddr_un = yes ; then AC_DEFINE(HAVE_SOCKADDR_UN, 1, [HAVE_SOCKADDR_UN]) @@ -204,20 +195,12 @@ AC_DEFUN([ECOS_C_PRETTY_FUNCTION],[ AC_CACHE_CHECK("for __PRETTY_FUNCTION__ support",ecos_cv_c_pretty_function,[ AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK( - [#include ], - [puts(__PRETTY_FUNCTION__);], - c_ok="yes", - c_ok="no" - ) - AC_LANG_CPLUSPLUS - AC_TRY_LINK( - [#include ], - [puts(__PRETTY_FUNCTION__);], - cxx_ok="yes", - cxx_ok="no" - ) + AC_LANG([C]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[puts(__PRETTY_FUNCTION__);]])],[c_ok="yes"],[c_ok="no" + ]) + AC_LANG([C++]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[puts(__PRETTY_FUNCTION__);]])],[cxx_ok="yes"],[cxx_ok="no" + ]) AC_LANG_RESTORE if test "${c_ok}" = "yes" -a "${cxx_ok}" = "yes"; then ecos_cv_c_pretty_function="yes" diff --git a/m4/nls.m4 b/m4/nls.m4 index 7967cc2f9..f28756b5c 100644 --- a/m4/nls.m4 +++ b/m4/nls.m4 @@ -17,7 +17,7 @@ dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ(2.50) +AC_PREREQ([2.71]) AC_DEFUN([AM_NLS], [ diff --git a/m4/po.m4 b/m4/po.m4 index f7c9c067f..7228ac086 100644 --- a/m4/po.m4 +++ b/m4/po.m4 @@ -17,7 +17,7 @@ dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. -AC_PREREQ(2.50) +AC_PREREQ([2.71]) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], diff --git a/m4/progtest.m4 b/m4/progtest.m4 index a56365cd3..c6708fe3b 100644 --- a/m4/progtest.m4 +++ b/m4/progtest.m4 @@ -16,7 +16,7 @@ dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. -AC_PREREQ(2.50) +AC_PREREQ([2.71]) # Search path for a program which passes the given test. diff --git a/m4/pwd_grp.m4 b/m4/pwd_grp.m4 index 8b217c0f8..3d42c6fd0 100644 --- a/m4/pwd_grp.m4 +++ b/m4/pwd_grp.m4 @@ -7,35 +7,31 @@ AC_DEFUN([FW_CHECK_PWD], HAVE_GETPWNAM_R="" AC_MSG_CHECKING(for getpwnam_r with 5 parameters) -AC_TRY_LINK([#include -#include ], -getpwnam_r(NULL,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETPWNAM_R_5,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1, -Some systems have getpwnam_r) AC_MSG_RESULT(yes); HAVE_GETPWNAM_R="yes", AC_MSG_RESULT(no)) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getpwnam_r(NULL,NULL,NULL,0,NULL);]])],[AC_DEFINE(HAVE_GETPWNAM_R_5,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1, +Some systems have getpwnam_r) AC_MSG_RESULT(yes); HAVE_GETPWNAM_R="yes"],[AC_MSG_RESULT(no)]) if ( test -z "$HAVE_GETPWNAM_R" ) then AC_MSG_CHECKING(for getpwnam_r with 4 parameters) - AC_TRY_LINK([#include -#include ], -getpwnam_r(NULL,NULL,NULL,0);,AC_DEFINE(HAVE_GETPWNAM_R_4,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1,Some -systems have getpwnam_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getpwnam_r(NULL,NULL,NULL,0);]])],[AC_DEFINE(HAVE_GETPWNAM_R_4,1,Some systems have getpwnam_r) AC_DEFINE(HAVE_GETPWNAM_R,1,Some +systems have getpwnam_r) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) fi HAVE_GETPWUID_R="" AC_MSG_CHECKING(for getpwuid_r with 5 parameters) -AC_TRY_LINK([#include -#include ], -getpwuid_r(0,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETPWUID_R_5,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Som -e systems have getpwuid_r) AC_MSG_RESULT(yes); HAVE_GETPWUID_R="yes", AC_MSG_RESULT(no)) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getpwuid_r(0,NULL,NULL,0,NULL);]])],[AC_DEFINE(HAVE_GETPWUID_R_5,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Som +e systems have getpwuid_r) AC_MSG_RESULT(yes); HAVE_GETPWUID_R="yes"],[AC_MSG_RESULT(no)]) if ( test -z "$HAVE_GETPWUID_R" ) then AC_MSG_CHECKING(for getpwuid_r with 4 parameters) - AC_TRY_LINK([#include -#include ], -getpwuid_r(0,NULL,NULL,0);,AC_DEFINE(HAVE_GETPWUID_R_4,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Some sys -tems have getpwuid_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getpwuid_r(0,NULL,NULL,0);]])],[AC_DEFINE(HAVE_GETPWUID_R_4,1,Some systems have getpwuid_r) AC_DEFINE(HAVE_GETPWUID_R,1,Some sys +tems have getpwuid_r) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) fi ]) @@ -51,35 +47,31 @@ AC_DEFUN([FW_CHECK_GRP], HAVE_GETGRNAM_R="" AC_MSG_CHECKING(for getgrnam_r with 5 parameters) -AC_TRY_LINK([#include -#include ], -getgrnam_r(NULL,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETGRNAM_R_5,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1, -Some systems have getgrnam_r) AC_MSG_RESULT(yes); HAVE_GETGRNAM_R="yes", AC_MSG_RESULT(no)) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getgrnam_r(NULL,NULL,NULL,0,NULL);]])],[AC_DEFINE(HAVE_GETGRNAM_R_5,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1, +Some systems have getgrnam_r) AC_MSG_RESULT(yes); HAVE_GETGRNAM_R="yes"],[AC_MSG_RESULT(no)]) if ( test -z "$HAVE_GETGRNAM_R" ) then AC_MSG_CHECKING(for getgrnam_r with 4 parameters) - AC_TRY_LINK([#include -#include ], -getgrnam_r(NULL,NULL,NULL,0);,AC_DEFINE(HAVE_GETGRNAM_R_4,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1,Some -systems have getgrnam_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getgrnam_r(NULL,NULL,NULL,0);]])],[AC_DEFINE(HAVE_GETGRNAM_R_4,1,Some systems have getgrnam_r) AC_DEFINE(HAVE_GETGRNAM_R,1,Some +systems have getgrnam_r) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) fi HAVE_GETGRGID_R="" AC_MSG_CHECKING(for getgrgid_r with 5 parameters) -AC_TRY_LINK([#include -#include ], -getgrgid_r(0,NULL,NULL,0,NULL);,AC_DEFINE(HAVE_GETGRGID_R_5,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Som -e systems have getgrgid_r) AC_MSG_RESULT(yes); HAVE_GETGRGID_R="yes", AC_MSG_RESULT(no)) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getgrgid_r(0,NULL,NULL,0,NULL);]])],[AC_DEFINE(HAVE_GETGRGID_R_5,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Som +e systems have getgrgid_r) AC_MSG_RESULT(yes); HAVE_GETGRGID_R="yes"],[AC_MSG_RESULT(no)]) if ( test -z "$HAVE_GETGRGID_R" ) then AC_MSG_CHECKING(for getgrgid_r with 4 parameters) - AC_TRY_LINK([#include -#include ], -getgrgid_r(0,NULL,NULL,0);,AC_DEFINE(HAVE_GETGRGID_R_4,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Some sys -tems have getgrgid_r) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +#include ]], [[getgrgid_r(0,NULL,NULL,0);]])],[AC_DEFINE(HAVE_GETGRGID_R_4,1,Some systems have getgrgid_r) AC_DEFINE(HAVE_GETGRGID_R,1,Some sys +tems have getgrgid_r) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)]) fi ]) diff --git a/m4/sendfile_samba.m4 b/m4/sendfile_samba.m4 index a0b3f0010..4530f2fff 100644 --- a/m4/sendfile_samba.m4 +++ b/m4/sendfile_samba.m4 @@ -5,7 +5,7 @@ AC_DEFUN([SENDFILE_CHECK],[ AC_MSG_CHECKING(whether to check to support sendfile) -AC_ARG_WITH(sendfile-support, AC_HELP_STRING([--with-sendfile-support], [Check for sendfile support (default=yes)]), +AC_ARG_WITH(sendfile-support, AS_HELP_STRING([--with-sendfile-support],[Check for sendfile support (default=yes)]), [check_sendfile="$withval"], [check_sendfile="yes"]) @@ -21,39 +21,33 @@ case "$check_sendfile" in # *linux*) AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[\ int tofd, fromfd; off64_t offset; size_t total; ssize_t nwritten = sendfile64(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) +]])],[samba_cv_HAVE_SENDFILE64=yes],[samba_cv_HAVE_SENDFILE64=no])]) AC_CACHE_CHECK([for linux sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[\ int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) # Try and cope with broken Linux sendfile.... AC_CACHE_CHECK([for broken linux sendfile support],samba_cv_HAVE_BROKEN_LINUX_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) #undef _FILE_OFFSET_BITS #endif -#include ], -[\ +#include ]], [[\ int tofd, fromfd; off_t offset; size_t total; ssize_t nwritten = sendfile(tofd, fromfd, &offset, total); -], -samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)]) +]])],[samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes],[samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then found=yes @@ -80,12 +74,11 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)] # *freebsd* | *DragonFly* ) AC_CACHE_CHECK([for BSD sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include #include #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd, ret, total=0; off_t offset, nwritten; struct sf_hdtr hdr; @@ -97,8 +90,7 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)] hdtrl.iov_base = NULL; hdtrl.iov_len = 0; ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then found=yes @@ -115,12 +107,11 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) # *darwin*) AC_CACHE_CHECK([for MacOS X sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include #include #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd, ret, total=0; off_t offset; struct sf_hdtr hdr; @@ -132,8 +123,7 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) hdtrl.iov_base = NULL; hdtrl.iov_len = 0; ret = sendfile(fromfd, tofd, offset, &total, &hdr, 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then found=yes @@ -150,10 +140,9 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) # *hpux*) AC_CACHE_CHECK([for hpux sendfile64 support],samba_cv_HAVE_SENDFILE64,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd; size_t total=0; struct iovec hdtrl[2]; @@ -164,8 +153,7 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) hdtrl[0].iov_len = 0; nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); -], -samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) +]])],[samba_cv_HAVE_SENDFILE64=yes],[samba_cv_HAVE_SENDFILE64=no])]) if test x"$samba_cv_HAVE_SENDFILE64" = x"yes"; then found=yes AC_DEFINE(HAVE_SENDFILE64,1,[Whether sendfile64() is available]) @@ -176,10 +164,9 @@ samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) fi AC_CACHE_CHECK([for hpux sendfile support],samba_cv_HAVE_SENDFILE,[ - AC_TRY_LINK([\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ #include -#include ], -[\ +#include ]], [[\ int fromfd, tofd; size_t total=0; struct iovec hdtrl[2]; @@ -190,8 +177,7 @@ samba_cv_HAVE_SENDFILE64=yes,samba_cv_HAVE_SENDFILE64=no)]) hdtrl[0].iov_len = 0; nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); -], -samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) +]])],[samba_cv_HAVE_SENDFILE=yes],[samba_cv_HAVE_SENDFILE=no])]) if test x"$samba_cv_HAVE_SENDFILE" = x"yes"; then found=yes AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) @@ -208,9 +194,8 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) *solaris*) AC_CHECK_LIB(sendfile,sendfilev) AC_CACHE_CHECK([for solaris sendfilev64 support],samba_cv_HAVE_SENDFILEV64,[ - AC_TRY_LINK([\ -#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ +#include ]], [[\ int sfvcnt; size_t xferred; struct sendfilevec vec[2]; @@ -229,8 +214,7 @@ samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)]) vec[1].sfv_off = 0; vec[1].sfv_len = 0; nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) +]])],[samba_cv_HAVE_SENDFILEV64=yes],[samba_cv_HAVE_SENDFILEV64=no])]) if test x"$samba_cv_HAVE_SENDFILEV64" = x"yes"; then found=yes @@ -242,9 +226,8 @@ samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) fi AC_CACHE_CHECK([for solaris sendfilev support],samba_cv_HAVE_SENDFILEV,[ - AC_TRY_LINK([\ -#include ], -[\ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[\ +#include ]], [[\ int sfvcnt; size_t xferred; struct sendfilevec vec[2]; @@ -263,8 +246,7 @@ samba_cv_HAVE_SENDFILEV64=yes,samba_cv_HAVE_SENDFILEV64=no)]) vec[1].sfv_off = 0; vec[1].sfv_len = 0; nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); -], -samba_cv_HAVE_SENDFILEV=yes,samba_cv_HAVE_SENDFILEV=no)]) +]])],[samba_cv_HAVE_SENDFILEV=yes],[samba_cv_HAVE_SENDFILEV=no])]) if test x"$samba_cv_HAVE_SENDFILEV" = x"yes"; then found=yes