[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torsocks/master] Use AC_CHECK_FUNC rather than AC_LINK_IFELSE.



commit 5f91d0e3a2fed2642a24393d6b6aecd30573430f
Author: Linus Nordberg <linus@xxxxxxxxxxx>
Date:   Mon Aug 26 22:07:08 2013 +0200

    Use AC_CHECK_FUNC rather than AC_LINK_IFELSE.
    
    It does the same thing, only with less eye pain.
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 70c9efb..8f2f392 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AC_CHECK_HEADER(fcntl.h,,AC_MSG_ERROR("fcntl.h not found"))
 dnl Other headers we're interested in
 AC_CHECK_HEADERS(unistd.h)
 
-dnl Checks for library functions.
+dnl Checks for required library functions.
 AC_CHECK_FUNCS(strcspn strdup strerror strspn strtol mmap strcasecmp \
    strncasecmp strtol,,[AC_MSG_ERROR("Required function not found")])
 
@@ -106,7 +106,7 @@ AC_CHECK_FUNC(gethostbyname, AC_DEFINE([HAVE_GETHOSTBYNAME],[],[Description]), [
 
 
 dnl Do we have dlopen(3) without -ldl?
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[return dlopen ();]])], [have_builtin_dl=yes])
+AC_CHECK_FUNC([dlopen], [have_builtin_dl=yes])
 AM_CONDITIONAL([HAVE_BUILTIN_DL], [test "$have_builtin_dl" = "yes"])
 
 dnl OpenBSD needs -lpthread. It also doesn't support AI_V4MAPPED.



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits