From ecd326b9f4fcc7f246c750334a3c8290037a9220 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 5e6bb6a..4965ce5 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]) @@ -48,6 +48,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]) @@ -101,7 +104,6 @@ AC_CONFIG_FILES([Makefile src/user/Makefile src/config/Makefile src/router/Makefile - src/uuid/Makefile docs/Makefile config/Makefile tests/Makefile])