Browse Source

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)

next
Georg Hopp 12 years ago
parent
commit
b6df620190
  1. 6
      configure.ac

6
configure.ac

@ -8,7 +8,7 @@ AC_INIT([taskrambler],
LT_INIT LT_INIT
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
#AM_INIT_AUTOMAKE([subdir-objects]) #AM_INIT_AUTOMAKE([subdir-objects])
AM_SILENT_RULES([yes])
#AM_SILENT_RULES([yes])
AC_COPYRIGHT([Copyright © 2013 Georg Hopp]) AC_COPYRIGHT([Copyright © 2013 Georg Hopp])
AC_REVISION([m4_esyscmd_s([git describe --always])]) AC_REVISION([m4_esyscmd_s([git describe --always])])
AC_CONFIG_SRCDIR([src/taskrambler.c]) 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_MSG_ERROR([json-c library not found], [1])])
AC_CHECK_LIB([ssl], [SSL_library_init], [], AC_CHECK_LIB([ssl], [SSL_library_init], [],
[AC_MSG_ERROR([openssl not found], [1])]) [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. # 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]) 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/user/Makefile
src/config/Makefile src/config/Makefile
src/router/Makefile src/router/Makefile
src/uuid/Makefile
docs/Makefile docs/Makefile
config/Makefile config/Makefile
tests/Makefile]) tests/Makefile])

Loading…
Cancel
Save