diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-10-06 09:16:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-10-06 09:16:21 -0400 |
commit | 6055bba8cc18f4d918fdd20f648e5e5deab37946 (patch) | |
tree | 62cf3b970215ac40e2f7eb176efda3e89c968623 /configure.ac | |
parent | fdc0a660b476fea19d8b4f7739aba05704d25bbe (diff) | |
download | tor-6055bba8cc18f4d918fdd20f648e5e5deab37946.tar.gz tor-6055bba8cc18f4d918fdd20f648e5e5deab37946.zip |
Only use -levent when checking functions if we will use it to link.
Fixes 19904; bugfix on b62abf9f21499ab; patch from Rubiate.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index f6edb3a513..23371d3b4b 100644 --- a/configure.ac +++ b/configure.ac @@ -490,21 +490,17 @@ void *event_init(void);], event_init(); ], [--with-libevent-dir], [/opt/libevent]) -dnl Now check for particular libevent functions. +dnl Determine the incantation needed to link libevent. save_LIBS="$LIBS" save_LDFLAGS="$LDFLAGS" save_CPPFLAGS="$CPPFLAGS" -LIBS="-levent $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $LIBS" + +LIBS="$STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $save_LIBS" LDFLAGS="$TOR_LDFLAGS_libevent $LDFLAGS" CPPFLAGS="$TOR_CPPFLAGS_libevent $CPPFLAGS" -AC_CHECK_FUNCS([evutil_secure_rng_set_urandom_device_file \ - evutil_secure_rng_add_bytes \ -]) AC_CHECK_HEADERS(event2/event.h event2/dns.h event2/bufferevent_ssl.h) -LIBS="$STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $save_LIBS" - if test "$enable_static_libevent" = "yes"; then if test "$tor_cv_library_libevent_dir" = "(system)"; then AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent") @@ -527,6 +523,11 @@ else fi fi +dnl Now check for particular libevent functions. +AC_CHECK_FUNCS([evutil_secure_rng_set_urandom_device_file \ + evutil_secure_rng_add_bytes \ +]) + LIBS="$save_LIBS" LDFLAGS="$save_LDFLAGS" CPPFLAGS="$save_CPPFLAGS" |