Use AC_LANG_SOURCE and AC_LANG_PROGRAM correctly where needed with newer autoconf...
authorAri Johnson <ari@theari.com>
Tue, 26 Apr 2011 03:20:07 +0000 (23:20 -0400)
committerAri Johnson <ari@theari.com>
Tue, 26 Apr 2011 03:20:07 +0000 (23:20 -0400)
configure.ac
m4/ax_check_openssl.m4

index ea64a54aaf80e4c09ab6962cce82d1a27588a479..5beda895aea3345bfbdedad42f00a2b363878cbf 100644 (file)
@@ -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 <math.h>
 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 <fcntl.h>
-
 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 <fcntl.h>
-
 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))
index ea77008e0a4260002586776b959d8fd06b2b407f..2288cd44d6186f7caf998d4a9cc921cc39de9369 100644 (file)
@@ -106,7 +106,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
     LIBS="$OPENSSL_LIBS $LIBS"
     CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
     AC_LINK_IFELSE(
-        AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)]),
+        [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
         [
             AC_MSG_RESULT([yes])
             $1