updates
[silc.git] / configure.in.pre
index 82762d4420d9b9d7c51a6aea4608087c61f6bf84..b7acfd23ff95cbb1a202c8e375e1be726ed7629d 100644 (file)
@@ -67,7 +67,7 @@ AC_HEADER_STAT
 
 # More header checking
 AC_CHECK_HEADERS(unistd.h string.h getopt.h errno.h fcntl.h assert.h)
-AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h)
+AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h)
 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
 AC_CHECK_HEADERS(ncurses.h signal.h ctype.h regex.h)
@@ -597,7 +597,6 @@ AC_ARG_WITH(silcd-pid-file,
        esac ],
 )
 AC_SUBST(PIDFILE)
-AC_DEFINE_UNQUOTED(SILC_SERVER_PID_FILE, "$PIDFILE")
 
 #
 # Native WIN32 compilation under cygwin
@@ -611,12 +610,49 @@ AC_ARG_WITH(win32,
 
 AM_CONDITIONAL(SILC_WIN32, test x$win32-support = xtrue)
 
+#
+# IPv6 support
+#
+AC_MSG_CHECKING(for IPv6 support)
+AC_ARG_ENABLE(ipv6,
+[  --enable-ipv6           Enable IPv6 support],
+[ case "${enableval}" in
+  yes) 
+    want_ipv6=true
+    check_ipv6=false
+    AC_DEFINE(HAVE_IPV6)
+    AC_MSG_RESULT(yes)
+    ;;
+  *)
+    want_ipv6=false
+    check_ipv6=false
+    AC_MSG_RESULT(no)
+    ;;
+esac ], check_ipv6=true)
+
+if test x$check_ipv6 = xtrue; then
+  AC_TRY_COMPILE([#ifdef HAVE_NETINET_TCP_H
+                 #include <netinet/tcp.h>
+                 #endif
+                 #ifdef HAVE_NETDB_H
+                 #include <netdb.h>
+                 #endif
+                 #include <sys/socket.h>
+                 #ifdef HAVE_NETDB_IN_H
+                 #include <netinet/in.h>
+                 #endif],
+                 [struct sockaddr_in6 sin6;
+                  int family = AF_INET6;
+                 ], [AC_DEFINE(HAVE_IPV6)
+                     AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
+fi
+
 #
 # Debug checking
 #
 AC_MSG_CHECKING(for enabled debugging)
 AC_ARG_ENABLE(debug,
-[  --enable-debug          Enable debugging (warning: it is heavy!)],
+[  --enable-debug          Enable debugging],
 [ case "${enableval}" in
   yes) 
     AC_MSG_RESULT(yes)
@@ -719,8 +755,6 @@ fi
 #
 # Other configure scripts
 #
-AC_CONFIG_SUBDIRS(lib/dotconf)
-AC_CONFIG_SUBDIRS(lib/trq)
 AC_CONFIG_SUBDIRS(irssi)
 AC_CONFIG_SUBDIRS(lib/silcmath/mpi)
 #AC_CONFIG_SUBDIRS(lib/zlib)
@@ -750,7 +784,6 @@ lib/silcmath/Makefile
 lib/silcmath/mpi/Makefile.defines
 lib/silcmath/mpi/Makefile.defines_int
 lib/silcsim/Makefile
-lib/silcsim/modules/Makefile
 lib/silcske/Makefile
 lib/silcutil/Makefile
 lib/silcutil/unix/Makefile