From 6fb9d3b64430512269fc9f030ad645d63484ca0e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 25 Oct 2006 02:51:45 +0000 Subject: [PATCH] r9384@Kushana: nickm | 2006-10-24 22:51:42 -0400 Libevent-1.2 exports, but does not define in its headers, strlcpy. Try to fix this in configure.in by checking for most functions before we check for libevent. svn:r8826 --- configure.in | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 1ff97916d7..7dc4d6b674 100644 --- a/configure.in +++ b/configure.in @@ -157,7 +157,6 @@ if test $bwin32 = true; then AC_DEFINE(MS_WINDOWS, 1, [Define to 1 if we are building for Windows.]) fi - AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(gethostbyname, [nsl]) AC_SEARCH_LIBS(dlopen, [dl]) @@ -168,6 +167,17 @@ if test $enable_threads = "yes"; then AC_SEARCH_LIBS(pthread_detach, [pthread]) fi +dnl ------------------------------------------------------------------- +dnl Check for functions before libevent, since libevent-1.2 apparently +dnl exports strlcpy without defining it in a header. + +AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull ftello getaddrinfo localtime_r gmtime_r memmem strtok_r) + +if test $enable_threads = "yes"; then + AC_CHECK_HEADERS(pthread.h) + AC_CHECK_FUNCS(pthread_create) +fi + dnl ------------------------------------------------------ dnl Where do you live, libevent? And how do we call you? @@ -278,6 +288,9 @@ if test $ac_cv_libevent_linker_option != '(none)' ; then fi fi +dnl Now check for particular libevent functions. +AC_CHECK_FUNCS(event_get_version event_get_method event_set_log_callback) + dnl ------------------------------------------------------ dnl Where do you live, openssl? And how do we call you? @@ -469,13 +482,6 @@ AC_CHECK_HEADERS(linux/netfilter_ipv4.h, #include #endif]) -AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull ftello getaddrinfo localtime_r gmtime_r event_get_version event_get_method event_set_log_callback memmem strtok_r) - -if test $enable_threads = "yes"; then - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_FUNCS(pthread_create) -fi - if test x$transparent = xtrue ; then transparent_ok=0 if test x$net_if_found = x1 -a x$net_pfvar_found = x1 ; then