Support for MaxOS/X.
[tinc] / configure.in
index ec76e6d..d8b68e4 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-dnl $Id: configure.in,v 1.13.2.40 2002/02/11 15:59:18 guus Exp $
+dnl $Id: configure.in,v 1.13.2.44 2002/04/19 14:06:40 guus Exp $
 
 AC_INIT(src/tincd.c)
 AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
@@ -42,6 +42,10 @@ case $host_os in
     AC_DEFINE(HAVE_FREEBSD)
     [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
   ;;
+  *darwin*)
+    AC_DEFINE(HAVE_FREEBSD)
+    [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
+  ;;
   *solaris*)
     AC_DEFINE(HAVE_SOLARIS)
     [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
@@ -50,6 +54,13 @@ case $host_os in
     AC_DEFINE(HAVE_OPENBSD)
     [ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
   ;;
+  *netbsd*)
+    AC_DEFINE(HAVE_NETBSD)
+    [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
+  ;;
+  *)
+    AC_MSG_ERROR("Unknown operating system.")
+  ;;
 esac
 
 AC_CACHE_SAVE
@@ -68,6 +79,18 @@ AC_TYPE_SIZE_T
 AC_HEADER_TIME
 AC_STRUCT_TM
 
+AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
+[
+  AC_TRY_COMPILE(
+  [#include <sys/socket.h>],
+  [socklen_t len = 42; return len;],
+  ac_cv_type_socklen_t=yes,
+  ac_cv_type_socklen_t=no)
+])
+if test $ac_cv_type_socklen_t == yes; then
+  AC_DEFINE(HAVE_SOCKLEN_T)
+fi
+
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
 AC_FUNC_ALLOCA
@@ -79,7 +102,6 @@ jm_FUNC_REALLOC
 
 AM_GNU_GETTEXT
 
-
 dnl Support for SunOS
 
 AC_CHECK_FUNC(socket, [], [
@@ -96,6 +118,12 @@ tinc_TUNTAP
 tinc_OPENSSL
 tinc_ZLIB
 
+dnl Check if support for jumbograms is requested 
+AC_ARG_ENABLE(jumbograms,
+  [  --enable-jumbograms     enable support for jumbograms (packets up to 9000 bytes)],
+  [ AC_DEFINE(ENABLE_JUMBOGRAMS) ]
+)
+
 dnl Check if checkpoint tracing has to be enabled
 AC_ARG_ENABLE(tracing,
   [  --enable-tracing        enable checkpoint tracing (debugging only)],
@@ -112,6 +140,4 @@ intl/Makefile
 lib/Makefile
 m4/Makefile
 po/Makefile.in
-po/POTFILES
-po/Makefile
 )