diff options
author | Jeremy Henty <onepoint@starurchin.org> | 2011-01-08 17:55:36 +0000 |
---|---|---|
committer | Jeremy Henty <onepoint@starurchin.org> | 2011-01-08 17:55:36 +0000 |
commit | 1e559352ca52524b3c438f03efc4db06ac294d35 (patch) | |
tree | 3a63bcd49e2a6637d9d9c2a09e2a95e12644af7b | |
parent | acfbdc6019b5691eff50a0645767cb05afd5c3b4 (diff) |
configure.in: replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE/AC_LANG_PROGRAM.
-rw-r--r-- | configure.in | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/configure.in b/configure.in index 2b22f73a..6af695b9 100644 --- a/configure.in +++ b/configure.in @@ -115,21 +115,21 @@ dnl -------------------- dnl AC_MSG_CHECKING([for socklen_t]) ac_cv_socklen_t="" -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #include <sys/socket.h> -],[ +]],[[ socklen_t a=0; getsockname(0,(struct sockaddr*)0, &a); -], +]])], ac_cv_socklen_t="socklen_t", -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> #include <sys/socket.h> -],[ +]],[[ int a=0; getsockname(0,(struct sockaddr*)0, &a); -], +]])], ac_cv_socklen_t="int", ac_cv_socklen_t="size_t" ) @@ -318,8 +318,12 @@ if test "x$iconv_ok" = "xno"; then dnl Test for OpenBSD old_libs="$LIBS" LIBS="$old_libs -liconv" - AC_TRY_COMPILE([#include <iconv.h>],[iconv_open("","");], - iconv_ok=yes, iconv_ok=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <iconv.h> +]],[[ +iconv_open("",""); +]])], +iconv_ok=yes,iconv_ok=no) LIBS="$old_libs" if test "x$iconv_ok" = "xyes"; then LIBICONV_LIBS="-liconv" @@ -341,14 +345,15 @@ if test "x$iconv_ok" = "xyes"; then old_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_LANG_PUSH([C++]) - AC_TRY_COMPILE([#include <iconv.h>], -[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <iconv.h> +]],[[ const char *inPtr; char *outPtr; size_t inLeft = 0, outRoom = 0; iconv_t encoder = iconv_open("ASCII", "UTF-8"); iconv(encoder, &inPtr, &inLeft, &outPtr, &outRoom); -], +]])], iconv_old=yes,iconv_old=no) AC_LANG_POP([C++]) LIBS="$old_libs" |