diff --git a/ChangeLog b/ChangeLog index a2bae72ac7..f0a55a2a46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-03-10 Christian Stimming + * configure.in, src/gnome-utils/dialog-utils.c: Gnucash replaced + dlopen/dlsym by the g_module functions, so don't error out if they + are unavailable; dlsym is needed only optionally for BSD + linkers. Also removes quotation error in AC_MSG_ERROR macro. + * src/gnome-utils/gnc-druid-provider-multifile-gnome.h, gnc-druid-provider-file-gnome.c: If unavailable, provide own typedef and disable globbing. diff --git a/configure.in b/configure.in index 6b5959c961..e3a1e52412 100644 --- a/configure.in +++ b/configure.in @@ -176,13 +176,13 @@ fi AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h) +# Gnucash replaced dlopen/dlsym by the g_module functions; dlsym +# is needed optionally in one place for BSD linkers, though. DL_LIB= -AC_CHECK_FUNCS(dlopen,,[ - AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[ +AC_CHECK_FUNCS(dlsym,,[ + AC_CHECK_LIB(dl, dlsym, DL_LIB="-ldl",[ AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[ - AC_CHECK_FUNCS(dlopen, DL_LIB="", - AC_MSG_ERROR(Dynamic linking is not available on this platform. Some apps, -like panel, will not run properly.)) + AC_CHECK_FUNCS(dlsym, DL_LIB="") ]) ]) ]) diff --git a/src/gnome-utils/dialog-utils.c b/src/gnome-utils/dialog-utils.c index 28146e079d..ce5df659a0 100644 --- a/src/gnome-utils/dialog-utils.c +++ b/src/gnome-utils/dialog-utils.c @@ -33,7 +33,9 @@ #include #include #include -#include +#ifdef HAVE_DLFCN_H +# include +#endif #include "dialog-utils.h" #include "gnc-commodity.h" @@ -869,8 +871,12 @@ gnc_glade_autoconnect_full_func(const gchar *handler_name, } if (!g_module_symbol(allsymbols, handler_name, (gpointer *)p_func)) { +#ifdef HAVE_DLSYM /* Fallback to dlsym -- necessary for *BSD linkers */ func = dlsym(RTLD_DEFAULT, handler_name); +#else + func = NULL; +#endif if (func == NULL) { g_warning("ggaff: could not find signal handler '%s'.", handler_name); return;