dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.13.2.44 2002/04/19 14:06:40 guus Exp $
+dnl $Id: configure.in,v 1.13.2.49 2002/06/09 15:58:05 zarq Exp $
AC_INIT(src/tincd.c)
AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
AC_CACHE_SAVE
+if test -d /sw/include ; then
+ CPPFLAGS="$CPPFLAGS -I/sw/include"
+fi
+if test -d /sw/lib ; then
+ LIBS="$LIBS -L/sw/lib"
+fi
+
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h limits.h sys/ioctl.h syslog.h unistd.h \
-sys/time.h malloc.h strings.h sys/file.h])
+AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \
+net/ethernet.h net/if.h netinet/in_systm.h netinet/ip.h netinet/tcp.h \
+sys/file.h sys/ioctl.h sys/param.h sys/time.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
AC_TRY_COMPILE(
- [#include <sys/socket.h>],
+ [#include <sys/types.h>
+ #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
+if test $ac_cv_type_socklen_t = yes; then
AC_DEFINE(HAVE_SOCKLEN_T)
fi
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([ftime socket select strtol strerror flock unsetenv \
-asprintf putenv strdup fcloseall daemon strsignal get_current_dir_name])
+AC_CHECK_FUNCS([asprintf daemon fcloseall flock ftime get_current_dir_name \
+putenv select strdup strerror strsignal strtol unsetenv getnameinfo])
jm_FUNC_MALLOC
jm_FUNC_REALLOC