summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGergely Nagy <algernon@balabit.hu>2012-03-24 16:06:05 +0100
committerGergely Nagy <algernon@balabit.hu>2012-03-24 16:06:05 +0100
commitedd3b75417caafeb1c6476c2958a970d8f799437 (patch)
tree982a1c7b39a4fd2c3062a81208e037d8058eb52d /configure.ac
parentc515ced437047b459cfce6b6a34eb572558566f9 (diff)
downloadlibumberlog-edd3b75417caafeb1c6476c2958a970d8f799437.tar.gz
libumberlog-edd3b75417caafeb1c6476c2958a970d8f799437.tar.xz
libumberlog-edd3b75417caafeb1c6476c2958a970d8f799437.zip
More portability fixes
While on glibc-based systems, we need -ldl (for dlopen) and -lrt (for clock_gettime), FreeBSD has both in libc, and does not have these extra libraries. Teach configure about this. Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f2c37b8..6879c3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,18 @@ dnl ***************************************************************************
dnl Checks for libraries
AC_CHECK_FUNCS([gethostname strdup clock_gettime])
+dnl The dlopen() function is in the C library for *BSD and in
+dnl libdl on GLIBC-based systems
+AC_SEARCH_LIBS([dlopen], [dl dld], [], [
+ AC_MSG_ERROR([unable to find the dlopen() function])
+])
+
+dnl Similarly, clock_gettime is in the C library on *BSD, and in librt
+dnl on GLIBC-based systems.
+AC_SEARCH_LIBS([clock_gettime], [rt], [], [
+ AC_MSG_ERROR([unable to find the clock_gettime() function])
+])
+
dnl ***************************************************************************
dnl JSON-C headers/libraries
dnl ***************************************************************************