aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCampus <campus@ntop.org>2016-11-24 10:07:10 +0100
committerCampus <campus@ntop.org>2016-11-24 10:07:10 +0100
commit098812d3cc9fa53b436a473a79457e464afa1194 (patch)
treed8f03758e8cc44d6c88f848b377bc1af71531671 /configure.ac
parent797eb2c3ca69654c5e1926f626882dcd9a5a1c0b (diff)
parent4eb5297a799d2256f9bc2417b6cbca0caf173ce8 (diff)
Merge branch 'mgigante-dev_libdl' into dev
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 70e3f1888..0e46e15aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,11 @@ if test -f $PCAP_HOME/libpcap/libpcap.a; then :
AC_CHECK_LIB([rt], [clock_gettime], [PCAP_LIB="$PCAP_LIB -lrt"])
AC_CHECK_LIB([nl], [nl_handle_alloc], [PCAP_LIB="$PCAP_LIB -lnl"])
+ # The dlopen() function is in libdl on GLIBC-based systems
+ # and in the C library for *BSD systems
+ AC_CHECK_LIB([dl], [dlopen, dlsym], [DL_LIB="-ldl"],
+ [AC_CHECK_LIB([c], [dlopen, dlsym], [DL_LIB="-lc"],
+ [AC_MSG_ERROR([unable to find the dlopen(), dlsym() functions]) ]) ])
else
AC_CHECK_LIB([pcap], [pcap_open_live], [PCAP_LIB="-lpcap"])
@@ -94,6 +99,7 @@ AC_SUBST(SVN_DATE)
AC_SUBST(JSON_C_LIB)
AC_SUBST(PCAP_INC)
AC_SUBST(PCAP_LIB)
+AC_SUBST(DL_LIB)
AC_SUBST(HAVE_PTHREAD_SETAFFINITY_NP)
AC_OUTPUT