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
|
@ -20,8 +20,7 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
|||
fi
|
||||
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.
|
||||
ac_kludge=HAVE_DONE_WORKING_MALLOC_CHECK
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1, [Needed for xmalloc.c])
|
||||
|
||||
AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
|
||||
[AC_TRY_RUN([
|
||||
|
@ -38,7 +37,8 @@ AC_DEFUN(jm_FUNC_MALLOC,
|
|||
jm_cv_func_working_malloc=no)
|
||||
])
|
||||
if test $jm_cv_func_working_malloc = no; then
|
||||
LIBOBJS="$LIBOBJS malloc.o"
|
||||
AC_DEFINE_UNQUOTED(malloc, rpl_malloc)
|
||||
dnl This should be converted to: AC_LIBOBJ([malloc])
|
||||
LIBOBJS="$LIBOBJS malloc.$ac_objext"
|
||||
AC_DEFINE(malloc, rpl_malloc, [Replacement malloc()])
|
||||
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_MSG_ERROR("OpenSSL header files not found."); break]
|
||||
[AC_MSG_ERROR([OpenSSL header files not found.]); break]
|
||||
)
|
||||
|
||||
CPPFLAGS="$tinc_ac_save_CPPFLAGS"
|
||||
|
||||
AC_CHECK_LIB(crypto, SHA1_version,
|
||||
[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_FUNC(OpenSSL_add_all_algorithms,
|
||||
[],
|
||||
AC_CHECK_FUNC(SSLeay_add_all_algorithms,
|
||||
[AC_DEFINE(HAVE_SSLEAY_ADD_ALL_ALGORITHMS)],
|
||||
[AC_MSG_ERROR("Missing required OpenSSL functionality!")]
|
||||
)
|
||||
[AC_CHECK_FUNC(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_CHECK_FUNC(dlopen,
|
||||
[],
|
||||
AC_CHECK_LIB(dl, dlopen,
|
||||
[AC_CHECK_LIB(dl, dlopen,
|
||||
[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
|
||||
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.
|
||||
ac_kludge=HAVE_DONE_WORKING_REALLOC_CHECK
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1, [Needed for xmalloc.c])
|
||||
|
||||
AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
|
||||
[AC_TRY_RUN([
|
||||
|
@ -38,7 +37,8 @@ AC_DEFUN(jm_FUNC_REALLOC,
|
|||
jm_cv_func_working_realloc=no)
|
||||
])
|
||||
if test $jm_cv_func_working_realloc = no; then
|
||||
LIBOBJS="$LIBOBJS realloc.o"
|
||||
AC_DEFINE_UNQUOTED(realloc, rpl_realloc)
|
||||
dnl This should be converted to: AC_LIBOBJ([realloc])
|
||||
LIBOBJS="$LIBOBJS realloc.$ac_objext"
|
||||
AC_DEFINE(realloc, rpl_realloc, [Replacement realloc()])
|
||||
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
|
||||
AC_DEFINE(HAVE_TUNTAP)
|
||||
AC_DEFINE(HAVE_TUNTAP, 1, [Universal tun/tap driver present])
|
||||
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
|
||||
AC_SUBST(LINUX_IF_TUN_H)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue