summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc9557d)
raw | patch | inline | side by side (parent: cc9557d)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 8 Dec 2009 09:12:58 +0000 (10:12 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 8 Dec 2009 09:12:58 +0000 (10:12 +0100) |
configure.in | patch | blob | history | |
src/plugin.c | patch | blob | history |
diff --git a/configure.in b/configure.in
index 3a5901e2b5f9ed8f1702bc8302b5f945427bf28e..6a520a6456f4c18fcd3e38bfd266c50525c5b586 100644 (file)
--- a/configure.in
+++ b/configure.in
LT_CONFIG_LTDL_DIR([libltdl])
LT_INIT([dlopen])
LTDL_INIT([convenience])
+ AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
]
,
# libtool <= 1.5
AC_SUBST(LIBLTDL)
AC_LIBTOOL_DLOPEN
AC_CONFIG_SUBDIRS(libltdl)
+ AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
]
)
diff --git a/src/plugin.c b/src/plugin.c
index 7b30e21176d2552bfbeacf4726e40875d61821c8..2579856455cee341a100192cf079efb66a393062 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
lt_dlinit ();
lt_dlerror (); /* clear errors */
+#if LIBTOOL_VERSION == 2
if (flags & PLUGIN_FLAGS_GLOBAL) {
lt_dladvise advise;
lt_dladvise_init(&advise);
} else {
dlh = lt_dlopen (file);
}
+#else /* if LIBTOOL_VERSION == 1 */
+ if (flags & PLUGIN_FLAGS_GLOBAL)
+ ERROR ("plugin_load_file: The global flag is not supported, "
+ "libtool 2 is required for this.");
+ dlh = lt_dlopen (file);
+#endif
+
if (dlh == NULL)
{
const char *error = lt_dlerror ();