diff configure.in @ 1869:ea5ec76bee0a

merge in recent changes from main repo
author corvid <corvid@lavabit.com>
date Sat, 22 Jan 2011 19:45:01 +0000
parents a1cd7f0155b6 3311bde3bae8
children 55af06da5523
line wrap: on
line diff
--- a/configure.in	Sat Jan 22 16:20:53 2011 +0000
+++ b/configure.in	Sat Jan 22 19:45:01 2011 +0000
@@ -2,8 +2,8 @@
 
 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
 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 @@
   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 @@
 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 @@
   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 @@
 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 @@
   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 @@
     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