From aeb24896fee8f962e21fcf441396f61c82714155 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 5 Apr 2005 03:40:39 +0000 Subject: [PATCH] add --disable-ltdl option to configure --- cmd/dot/Makefile.am | 10 +++++----- configure.ac | 18 ++++++++++++------ lib/gvc/gvplugin.c | 8 ++++---- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index e7046dc8d..bdc7faf5a 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -32,16 +32,16 @@ libdotneato_la_LIBADD = \ dot_SOURCES = dot.c args.c -if ENABLE_LTDL +if DISABLE_LTDL dot_LDADD = \ - $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/common/libcommon.la \ - $(top_builddir)/lib/gvc/libgvc.la @LIBGEN_LIBS@ + $(top_builddir)/lib/gvc/libgvc.la \ + $(top_builddir)/plugin/libplugins.la else dot_LDADD = \ + $(top_builddir)/lib/graph/libgraph.la \ $(top_builddir)/lib/common/libcommon.la \ - $(top_builddir)/lib/gvc/libgvc.la \ - $(top_builddir)/plugin/libplugins.la + $(top_builddir)/lib/gvc/libgvc.la @LIBGEN_LIBS@ endif install-data-hook: diff --git a/configure.ac b/configure.ac index dc973e9f2..3d4737bc6 100644 --- a/configure.ac +++ b/configure.ac @@ -3,15 +3,21 @@ AC_INIT(graphviz, 2.3) AC_CONFIG_SRCDIR(configure.ac) AC_CONFIG_AUX_DIR(config) -AC_CONFIG_SUBDIRS(libltdl) -AC_LIBTOOL_DLOPEN -AC_LIBLTDL_CONVENIENCE +dnl ----------------------------------- +dnl libtool ltdl on-demand plugin loading -HAVE_LTDL=1 +AC_ARG_ENABLE(ltdl, + [AC_HELP_STRING([--disable-ltdl], [don't support on-demand plugin loading])]) +if test "x$enable_ltdl" = "xno"; then + AC_DEFINE(DISABLE_LTDL,1,[Define if you don't want on-demand plugin loading]) +else + AC_CONFIG_SUBDIRS(libltdl) + AC_LIBTOOL_DLOPEN + AC_LIBLTDL_CONVENIENCE +fi +AM_CONDITIONAL(DISABLE_LTDL, [test "x$enable_ltdl" = "xno"]) AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) -AC_DEFINE_UNQUOTED(HAVE_LTDL,$HAVE_LTDL,Define if to use libltdl dynamic loading of plugins.) -AM_CONDITIONAL(ENABLE_LTDL, [test "x$HAVE_LTDL" = "x1"]) # Checks for system type AC_CANONICAL_TARGET diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index 4890a2268..581374231 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -23,7 +23,7 @@ #include "macros.h" #include "gvc.h" -#if HAVE_LTDL +#ifndef DISABLE_LTDL #include #endif @@ -93,7 +93,7 @@ boolean gvplugin_install(GVC_t * gvc, api_t api, gvplugin_library_t *gvplugin_library_load(char *path) { -#if HAVE_LTDL +#ifndef DISABLE_LTDL lt_dlhandle hndl; lt_ptr ptr; char *s, *sym; @@ -289,13 +289,13 @@ const char *gvplugin_list(GVC_t * gvc, api_t api, char *str) return buf; } -#ifndef HAVE_LTDL +#ifdef DISABLE_LTDL extern gvplugin_library_t *builtins[]; #endif void gvplugin_builtins(GVC_t * gvc) { -#ifndef HAVE_LTDL +#ifdef DISABLE_LTDL gvplugin_library_t **library; gvplugin_api_t *apis; gvplugin_type_t *types; -- 2.40.0