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.])
]
)
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 ();