From b6df620190edff97dd8497da1db3a6b1d561ca1c Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Thu, 9 Jan 2014 23:43:51 +0000 Subject: [PATCH] add -ldl linker flag only if libdl is available, thus prepare the code to compile on platforms where the dynamic linker code is included within the C library (FreeBSD) --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ee9ad3a..18f083b 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_INIT([taskrambler], LT_INIT AM_INIT_AUTOMAKE #AM_INIT_AUTOMAKE([subdir-objects]) -AM_SILENT_RULES([yes]) +#AM_SILENT_RULES([yes]) AC_COPYRIGHT([Copyright © 2013 Georg Hopp]) AC_REVISION([m4_esyscmd_s([git describe --always])]) AC_CONFIG_SRCDIR([src/taskrambler.c]) @@ -51,6 +51,9 @@ AM_COND_IF([HAVE_DOXYGEN], # [AC_MSG_ERROR([json-c library not found], [1])]) AC_CHECK_LIB([ssl], [SSL_library_init], [], [AC_MSG_ERROR([openssl not found], [1])]) +AC_CHECK_LIB([dl], [dlopen], [LIBS="-ldl"], + [AC_MSG_ERROR([openssl not found], [1])]) + # Checks for header files. AC_CHECK_HEADERS([stdarg.h string.h stdlib.h stdio.h unistd.h syslog.h sys/types.h json/json.h]) @@ -104,7 +107,6 @@ AC_CONFIG_FILES([Makefile src/user/Makefile src/config/Makefile src/router/Makefile - src/uuid/Makefile docs/Makefile config/Makefile tests/Makefile])