Autoconf cleanup. Works for both 2.13 and 2.53, although running autoconf
2.53 still gives some errors.
This commit is contained in:
parent
de6835a9dd
commit
8988b127e1
6 changed files with 31 additions and 110 deletions
80
acconfig.h
80
acconfig.h
|
@ -1,80 +0,0 @@
|
||||||
/* Define to the name name of this package */
|
|
||||||
#undef PACKAGE
|
|
||||||
|
|
||||||
/* Define to the version of the package */
|
|
||||||
#undef VERSION
|
|
||||||
|
|
||||||
/* Define to rpl_malloc if the replacement function should be used. */
|
|
||||||
#undef malloc
|
|
||||||
|
|
||||||
/* Define to rpl_realloc if the replacement function should be used. */
|
|
||||||
#undef realloc
|
|
||||||
|
|
||||||
/* This is always defined. It enables GNU extensions on systems that
|
|
||||||
have them. */
|
|
||||||
#if !defined(_GNU_SOURCE)
|
|
||||||
# undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__USE_BSD)
|
|
||||||
# undef __USE_BSD
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if NLS is requested. */
|
|
||||||
#undef ENABLE_NLS
|
|
||||||
|
|
||||||
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
|
|
||||||
#undef HAVE_CATGETS
|
|
||||||
|
|
||||||
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
|
|
||||||
#undef HAVE_GETTEXT
|
|
||||||
|
|
||||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
|
||||||
#undef HAVE_LC_MESSAGES
|
|
||||||
|
|
||||||
/* Define to 1 if you have the stpcpy function. */
|
|
||||||
#undef HAVE_STPCPY
|
|
||||||
|
|
||||||
/* For getopt */
|
|
||||||
#if HAVE_STDLIB_H
|
|
||||||
# define getopt system_getopt
|
|
||||||
# include <stdlib.h>
|
|
||||||
# undef getopt
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Linux */
|
|
||||||
#undef HAVE_LINUX
|
|
||||||
|
|
||||||
/* FreeBSD */
|
|
||||||
#undef HAVE_FREEBSD
|
|
||||||
|
|
||||||
/* OpenBSD */
|
|
||||||
#undef HAVE_OPENBSD
|
|
||||||
|
|
||||||
/* Solaris */
|
|
||||||
#undef HAVE_SOLARIS
|
|
||||||
|
|
||||||
/* NetBSD */
|
|
||||||
#undef HAVE_NETBSD
|
|
||||||
|
|
||||||
/* Define to the location of the kernel sources */
|
|
||||||
#undef CONFIG_TINC_KERNELDIR
|
|
||||||
|
|
||||||
/* Define to 1 if tun/tap support is enabled and found */
|
|
||||||
#undef HAVE_TUNTAP
|
|
||||||
|
|
||||||
/* Define to the location of if_tun.h */
|
|
||||||
#undef LINUX_IF_TUN_H
|
|
||||||
|
|
||||||
/* Define to 1 if support for jumbograms is enabled */
|
|
||||||
#undef ENABLE_JUMBOGRAMS
|
|
||||||
|
|
||||||
/* Define to 1 if checkpoint tracing is enabled */
|
|
||||||
#undef ENABLE_TRACING
|
|
||||||
|
|
||||||
/* Define to enable use of old SSLeay_add_all_algorithms() function */
|
|
||||||
#undef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
|
|
||||||
|
|
||||||
/* Define if there a socklen_t */
|
|
||||||
#undef HAVE_SOCKLEN_T
|
|
23
configure.in
23
configure.in
|
@ -1,6 +1,6 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
dnl $Id: configure.in,v 1.13.2.50 2002/06/10 14:35:18 guus Exp $
|
dnl $Id: configure.in,v 1.13.2.51 2002/06/11 11:03:17 guus Exp $
|
||||||
|
|
||||||
AC_INIT(src/tincd.c)
|
AC_INIT(src/tincd.c)
|
||||||
AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
|
AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
|
||||||
|
@ -12,7 +12,8 @@ AM_ACLOCAL_INCLUDE(m4)
|
||||||
# Enable GNU extensions.
|
# Enable GNU extensions.
|
||||||
# Define this here, not in acconfig's @TOP@ section, since definitions
|
# Define this here, not in acconfig's @TOP@ section, since definitions
|
||||||
# in the latter don't make it into the configure-time tests.
|
# in the latter don't make it into the configure-time tests.
|
||||||
AC_DEFINE([_GNU_SOURCE], [__USE_BSD])
|
AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions])
|
||||||
|
AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions])
|
||||||
|
|
||||||
ALL_LINGUAS="nl"
|
ALL_LINGUAS="nl"
|
||||||
|
|
||||||
|
@ -35,27 +36,27 @@ AC_CANONICAL_HOST
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*linux*)
|
*linux*)
|
||||||
AC_DEFINE(HAVE_LINUX)
|
AC_DEFINE(HAVE_LINUX, 1, [Linux])
|
||||||
[ rm -f src/device.c; ln -sf linux/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf linux/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*freebsd*)
|
*freebsd*)
|
||||||
AC_DEFINE(HAVE_FREEBSD)
|
AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD])
|
||||||
[ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
AC_DEFINE(HAVE_DARWIN)
|
AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)])
|
||||||
[ rm -f src/device.c; ln -sf darwin/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf darwin/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*solaris*)
|
*solaris*)
|
||||||
AC_DEFINE(HAVE_SOLARIS)
|
AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS])
|
||||||
[ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*openbsd*)
|
*openbsd*)
|
||||||
AC_DEFINE(HAVE_OPENBSD)
|
AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD])
|
||||||
[ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*netbsd*)
|
*netbsd*)
|
||||||
AC_DEFINE(HAVE_NETBSD)
|
AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
|
||||||
[ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
|
[ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -97,7 +98,7 @@ AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
|
||||||
ac_cv_type_socklen_t=no)
|
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)
|
AC_DEFINE(HAVE_SOCKLEN_T, 1, [socklen_t available])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
|
@ -130,13 +131,13 @@ tinc_ZLIB
|
||||||
dnl Check if support for jumbograms is requested
|
dnl Check if support for jumbograms is requested
|
||||||
AC_ARG_ENABLE(jumbograms,
|
AC_ARG_ENABLE(jumbograms,
|
||||||
[ --enable-jumbograms enable support for jumbograms (packets up to 9000 bytes)],
|
[ --enable-jumbograms enable support for jumbograms (packets up to 9000 bytes)],
|
||||||
[ AC_DEFINE(ENABLE_JUMBOGRAMS) ]
|
[ AC_DEFINE(ENABLE_JUMBOGRAMS, 1, [Support for jumbograms (packets up to 9000 bytes)]) ]
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl Check if checkpoint tracing has to be enabled
|
dnl Check if checkpoint tracing has to be enabled
|
||||||
AC_ARG_ENABLE(tracing,
|
AC_ARG_ENABLE(tracing,
|
||||||
[ --enable-tracing enable checkpoint tracing (debugging only)],
|
[ --enable-tracing enable checkpoint tracing (debugging only)],
|
||||||
[ AC_DEFINE(ENABLE_TRACING) ]
|
[ AC_DEFINE(ENABLE_TRACING, 1, [Checkpoint tracing]) ]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_SUBST(INCLUDES)
|
AC_SUBST(INCLUDES)
|
||||||
|
|
|
@ -20,8 +20,7 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
||||||
fi
|
fi
|
||||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||||
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
|
||||||
ac_kludge=HAVE_DONE_WORKING_MALLOC_CHECK
|
AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1, [Needed for xmalloc.c])
|
||||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
|
@ -38,7 +37,8 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
||||||
jm_cv_func_working_malloc=no)
|
jm_cv_func_working_malloc=no)
|
||||||
])
|
])
|
||||||
if test $jm_cv_func_working_malloc = no; then
|
if test $jm_cv_func_working_malloc = no; then
|
||||||
LIBOBJS="$LIBOBJS malloc.o"
|
dnl This should be converted to: AC_LIBOBJ([malloc])
|
||||||
AC_DEFINE_UNQUOTED(malloc, rpl_malloc)
|
LIBOBJS="$LIBOBJS malloc.$ac_objext"
|
||||||
|
AC_DEFINE(malloc, rpl_malloc, [Replacement malloc()])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
|
@ -19,31 +19,31 @@ AC_DEFUN(tinc_OPENSSL,
|
||||||
|
|
||||||
AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h,
|
AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h,
|
||||||
[],
|
[],
|
||||||
[AC_MSG_ERROR("OpenSSL header files not found."); break]
|
[AC_MSG_ERROR([OpenSSL header files not found.]); break]
|
||||||
)
|
)
|
||||||
|
|
||||||
CPPFLAGS="$tinc_ac_save_CPPFLAGS"
|
CPPFLAGS="$tinc_ac_save_CPPFLAGS"
|
||||||
|
|
||||||
AC_CHECK_LIB(crypto, SHA1_version,
|
AC_CHECK_LIB(crypto, SHA1_version,
|
||||||
[LIBS="$LIBS -lcrypto"],
|
[LIBS="$LIBS -lcrypto"],
|
||||||
[AC_MSG_ERROR("OpenSSL libraries not found.")]
|
[AC_MSG_ERROR([OpenSSL libraries not found.])]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_FUNCS(RAND_pseudo_bytes)
|
AC_CHECK_FUNCS(RAND_pseudo_bytes)
|
||||||
|
|
||||||
AC_CHECK_FUNC(OpenSSL_add_all_algorithms,
|
AC_CHECK_FUNC(OpenSSL_add_all_algorithms,
|
||||||
[],
|
[],
|
||||||
AC_CHECK_FUNC(SSLeay_add_all_algorithms,
|
[AC_CHECK_FUNC(SSLeay_add_all_algorithms,
|
||||||
[AC_DEFINE(HAVE_SSLEAY_ADD_ALL_ALGORITHMS)],
|
[AC_DEFINE(HAVE_SSLEAY_ADD_ALL_ALGORITHMS, 1, [Defined if this function should be used instead of OpenSLL_add_all_algorithms])],
|
||||||
[AC_MSG_ERROR("Missing required OpenSSL functionality!")]
|
[AC_MSG_ERROR([Missing required OpenSSL functionality!])]
|
||||||
)
|
)]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_FUNC(dlopen,
|
AC_CHECK_FUNC(dlopen,
|
||||||
[],
|
[],
|
||||||
AC_CHECK_LIB(dl, dlopen,
|
[AC_CHECK_LIB(dl, dlopen,
|
||||||
[LIBS="$LIBS -ldl"],
|
[LIBS="$LIBS -ldl"],
|
||||||
[AC_MSG_ERROR("OpenSSL depends on libdl.")]
|
[AC_MSG_ERROR([OpenSSL depends on libdl.])]
|
||||||
)
|
)]
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
|
|
|
@ -20,8 +20,7 @@ AC_DEFUN(jm_FUNC_REALLOC,
|
||||||
fi
|
fi
|
||||||
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
dnl xmalloc.c requires that this symbol be defined so it doesn't
|
||||||
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
|
||||||
ac_kludge=HAVE_DONE_WORKING_REALLOC_CHECK
|
AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1, [Needed for xmalloc.c])
|
||||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
||||||
[AC_TRY_RUN([
|
[AC_TRY_RUN([
|
||||||
|
@ -38,7 +37,8 @@ AC_DEFUN(jm_FUNC_REALLOC,
|
||||||
jm_cv_func_working_realloc=no)
|
jm_cv_func_working_realloc=no)
|
||||||
])
|
])
|
||||||
if test $jm_cv_func_working_realloc = no; then
|
if test $jm_cv_func_working_realloc = no; then
|
||||||
LIBOBJS="$LIBOBJS realloc.o"
|
dnl This should be converted to: AC_LIBOBJ([realloc])
|
||||||
AC_DEFINE_UNQUOTED(realloc, rpl_realloc)
|
LIBOBJS="$LIBOBJS realloc.$ac_objext"
|
||||||
|
AC_DEFINE(realloc, rpl_realloc, [Replacement realloc()])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
|
@ -29,9 +29,9 @@ AC_CACHE_CHECK([for linux/if_tun.h], tinc_cv_linux_if_tun_h,
|
||||||
])
|
])
|
||||||
|
|
||||||
if test $tinc_cv_linux_if_tun_h != none; then
|
if test $tinc_cv_linux_if_tun_h != none; then
|
||||||
AC_DEFINE(HAVE_TUNTAP)
|
AC_DEFINE(HAVE_TUNTAP, 1, [Universal tun/tap driver present])
|
||||||
if test $tinc_cv_linux_if_tun_h != default; then
|
if test $tinc_cv_linux_if_tun_h != default; then
|
||||||
AC_DEFINE_UNQUOTED(LINUX_IF_TUN_H, $tinc_cv_linux_if_tun_h)
|
AC_DEFINE_UNQUOTED(LINUX_IF_TUN_H, $tinc_cv_linux_if_tun_h, [Location of if_tun.h])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST(LINUX_IF_TUN_H)
|
AC_SUBST(LINUX_IF_TUN_H)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue