diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/configure.in b/configure.in index 84fc77ff..d75d5c03 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ dnl Process this file with aclocal, autoconf and automake. AC_INIT([dillo], [2.2]) -dnl Detect the canonical host and target build environment -AC_CANONICAL_SYSTEM +dnl Detect the canonical target build environment +AC_CANONICAL_TARGET AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/dillo.cc]) @@ -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" ) @@ -152,7 +152,7 @@ case $fltk_version in 1.3.*) AC_MSG_RESULT(yes) LIBFLTK_CXXFLAGS=`fltk-config --cxxflags` LIBFLTK_CFLAGS=`fltk-config --cflags` - LIBFLTK_LIBS=`fltk-config --use-images --ldflags`;; + LIBFLTK_LIBS=`fltk-config --ldflags`;; ?*) AC_MSG_RESULT(no) AC_ERROR(FLTK 1.3 required; version found: $fltk_version);; *) AC_MSG_RESULT(no) @@ -205,7 +205,7 @@ fi if test "x$libz_ok" = xyes; then LIBZ_LIBS="-lz" else - AC_ERROR(zlib must be installed!) + AC_MSG_ERROR(zlib must be installed!) fi dnl --------------- @@ -321,8 +321,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" @@ -330,7 +334,7 @@ if test "x$iconv_ok" = "xno"; then fi if test "x$iconv_ok" = "xno"; then - AC_ERROR(libiconv must be installed!) + AC_MSG_ERROR(libiconv must be installed!) fi dnl ---------------------- @@ -344,14 +348,15 @@ if test "x$iconv_ok" = "xyes"; then old_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_LANG_PUSH([C++]) - AC_TRY_COMPILE([#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); -], + 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" @@ -390,7 +395,8 @@ case $target in AC_MSG_CHECKING(whether threads work with -pthread) LDSAVEFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -pthread" - AC_TRY_LINK_FUNC(pthread_create, pthread_ok=yes, pthread_ok=no) + AC_LINK_IFELSE([AC_LANG_CALL([],[pthread_create])], +pthread_ok=yes, pthread_ok=no) LDFLAGS=$LDSAVEFLAGS if test "x$pthread_ok" = "xyes"; then |