From 9eb142036eb13d84fc06e304157b78b75ee3e24a Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 17 Oct 2005 10:36:09 +0000 Subject: [PATCH] When dlopen function is found without dl lib, do not link with -ldl (now ok under FreeBSD) --- configure.in | 13 +++++++------ weechat/configure.in | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 0fc835d72..950d0518c 100644 --- a/configure.in +++ b/configure.in @@ -254,18 +254,19 @@ if test "x$enable_ruby" = "xyes" ; then fi if test "x$enable_plugins" = "xyes" ; then + PLUGINS_LIBS="../../plugins/lib_weechat_plugins.a" AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no) if test "$LIBDL_FOUND" != "yes"; then AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no) - fi - if test "$LIBDL_FOUND" = "yes"; then - PLUGINS_LIBS="../../plugins/lib_weechat_plugins.a -ldl" - AC_DEFINE(PLUGINS) - else - AC_MSG_ERROR([ + if test "$LIBDL_FOUND" = "yes"; then + PLUGINS_LIBS="$PLUGINS_LIBS -ldl" + else + AC_MSG_ERROR([ *** "dl" library (dynamic library loader) couldn't be found in your system. *** Try to install it with your software package manager or disable plugins.]) + fi fi + AC_DEFINE(PLUGINS) fi AC_SUBST(PLUGINS_LIBS) diff --git a/weechat/configure.in b/weechat/configure.in index 0fc835d72..950d0518c 100644 --- a/weechat/configure.in +++ b/weechat/configure.in @@ -254,18 +254,19 @@ if test "x$enable_ruby" = "xyes" ; then fi if test "x$enable_plugins" = "xyes" ; then + PLUGINS_LIBS="../../plugins/lib_weechat_plugins.a" AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no) if test "$LIBDL_FOUND" != "yes"; then AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no) - fi - if test "$LIBDL_FOUND" = "yes"; then - PLUGINS_LIBS="../../plugins/lib_weechat_plugins.a -ldl" - AC_DEFINE(PLUGINS) - else - AC_MSG_ERROR([ + if test "$LIBDL_FOUND" = "yes"; then + PLUGINS_LIBS="$PLUGINS_LIBS -ldl" + else + AC_MSG_ERROR([ *** "dl" library (dynamic library loader) couldn't be found in your system. *** Try to install it with your software package manager or disable plugins.]) + fi fi + AC_DEFINE(PLUGINS) fi AC_SUBST(PLUGINS_LIBS)