Check for ranlib.
[tinc] / configure.in
index e8b9527..9a584b7 100644 (file)
@@ -1,7 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.
 
-dnl $Id: configure.in,v 1.13.2.51 2002/06/11 11:03:17 guus Exp $
+dnl $Id: configure.in,v 1.13.2.55 2002/08/24 12:54:55 guus Exp $
 
+AC_PREREQ(2.50)
 AC_INIT(src/tincd.c)
 AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
 AM_CONFIG_HEADER(config.h)
@@ -9,6 +10,9 @@ AM_CONFIG_HEADER(config.h)
 dnl Include the macros from the m4/ directory
 AM_ACLOCAL_INCLUDE(m4)
 
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION(0.11.5)
+
 # Enable GNU extensions.
 # Define this here, not in acconfig's @TOP@ section, since definitions
 # in the latter don't make it into the configure-time tests.
@@ -25,8 +29,7 @@ AC_PROG_AWK
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
-jm_PERL
-
+AC_PROG_RANLIB
 
 AC_ISC_POSIX
 
@@ -59,6 +62,10 @@ case $host_os in
     AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
     [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
   ;;
+  *cygwin*)
+    AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
+    [ rm -f src/device.c; ln -sf cygwin/device.c src/device.c ]
+  ;;
   *)
     AC_MSG_ERROR("Unknown operating system.")
   ;;
@@ -101,17 +108,30 @@ if test $ac_cv_type_socklen_t = yes; then
   AC_DEFINE(HAVE_SOCKLEN_T, 1, [socklen_t available])
 fi
 
+AC_CACHE_CHECK([for struct addrinfo], ac_cv_struct_addrinfo,
+[
+  AC_TRY_COMPILE(
+  [#include <sys/types.h>
+  #include <sys/socket.h>
+  #include <netdb.h>],
+  [struct addrinfo ai; ai.ai_family = AF_INET; return ai.ai_family;],
+  ac_cv_struct_addrinfo=yes,
+  ac_cv_struct_addrinfo=no)
+])
+if test $ac_cv_struct_addrinfo = yes; then
+  AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1, [struct addrinfo available])
+fi
+
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
 AC_FUNC_ALLOCA
 AC_TYPE_SIGNAL
 AC_CHECK_FUNCS([asprintf daemon fcloseall flock ftime get_current_dir_name \
-putenv select strdup strerror strsignal strtol unsetenv getnameinfo])
+putenv select strdup strerror strsignal strtol unsetenv \
+freeaddrinfo gai_strerror getaddrinfo getnameinfo])
 jm_FUNC_MALLOC
 jm_FUNC_REALLOC
 
-AM_GNU_GETTEXT
-
 dnl Support for SunOS
 
 AC_CHECK_FUNC(socket, [], [
@@ -142,11 +162,10 @@ AC_ARG_ENABLE(tracing,
 
 AC_SUBST(INCLUDES)
 
-AC_OUTPUT(Makefile
+AC_OUTPUT(Makefile po/Makefile.in  
 src/Makefile
 doc/Makefile
 doc/es/Makefile
-intl/Makefile
 lib/Makefile
 m4/Makefile
 po/Makefile.in