From: Ari Johnson Date: Tue, 26 Apr 2011 03:20:07 +0000 (-0400) Subject: Use AC_LANG_SOURCE and AC_LANG_PROGRAM correctly where needed with newer autoconf... X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=e0965d1756de02ae2442c88bb5122be5456c916b;p=cobramush.git Use AC_LANG_SOURCE and AC_LANG_PROGRAM correctly where needed with newer autoconf versions --- diff --git a/configure.ac b/configure.ac index ea64a54..5beda89 100644 --- a/configure.ac +++ b/configure.ac @@ -206,12 +206,7 @@ if test "$enable_zlib" = "yes"; then fi -AX_CHECK_OPENSSL([ - AC_DEFINE(HAVE_SSL, , [Check for OpenSSL Library]) - HAVE_SSL="yes" - ]) - - +AX_CHECK_OPENSSL([AC_DEFINE(HAVE_SSL, , [Check for OpenSSL Library]) HAVE_SSL="yes"]) AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Don't use zlib for database compression.]), enable_zlib=$enableval, enable_zlib=yes) @@ -240,12 +235,12 @@ AC_CHECK_FUNC(bindtextdomain, [AC_DEFINE(HAS_BINDTEXTDOMAIN, , [bindtextdomain f AC_CHECK_FUNC(crypt, [AC_DEFINE(HAS_CRYPT, , [Has system crypt])]) AC_CHECK_FUNCS([fpsetmask fpsetround]) AC_MSG_CHECKING([for isnormal]) -AC_LINK_IFELSE([ +AC_LINK_IFELSE([AC_LANG_SOURCE([ #include int main(void) { return !isnormal(1.0); } -], +])], [AC_MSG_RESULT(yes)] [AC_DEFINE(HAVE_ISNORMAL, , [check for isnormal function in math.h])], AC_MSG_RESULT(no)) @@ -276,32 +271,30 @@ AC_CHECK_FUNCS([pread pwrite]) # through an AC_CHECK_FUNCS but not when it comes time to actually use # them in source. AC_MSG_CHECKING([for posix_fallocate]) -AC_LINK_IFELSE([ +AC_LINK_IFELSE([AC_LANG_SOURCE([ #define _XOPEN_SOURCE 600 #include - int main(void) { posix_fallocate(0, 0, 100); return 0; } -], +])], [AC_MSG_RESULT(yes)] [AC_DEFINE(HAVE_POSIX_FALLOCATE, , [check for posix_fallocate function in fcntl.h])], AC_MSG_RESULT(no)) AC_MSG_CHECKING([for posix_fadvise and associated constants]) -AC_LINK_IFELSE([ +AC_LINK_IFELSE([AC_LANG_SOURCE([ #define _XOPEN_SOURCE 600 #include - int main(void) { posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL); return 0; } -], +])], [AC_MSG_RESULT(yes)] [AC_DEFINE(HAVE_POSIX_FADVISE, , [check for posix_fadvise function])], AC_MSG_RESULT(no)) diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4 index ea77008..2288cd4 100644 --- a/m4/ax_check_openssl.m4 +++ b/m4/ax_check_openssl.m4 @@ -106,7 +106,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ LIBS="$OPENSSL_LIBS $LIBS" CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" AC_LINK_IFELSE( - AC_LANG_PROGRAM([#include ], [SSL_new(NULL)]), + [AC_LANG_PROGRAM([#include ], [SSL_new(NULL)])], [ AC_MSG_RESULT([yes]) $1