man_MANS = dot.1
pdf_DATA = dot.pdf
-dot_SOURCES = dot.c $(top_srcdir)/lib/gvc/builtins.c
+dot_SOURCES = dot.c
+dot_LDFLAGS = -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library'
dot_LDADD = \
$(top_builddir)/lib/plugin/libgvplugin_dot_layout.la \
$(top_builddir)/lib/plugin/libgvplugin_neato_layout.la \
$(top_builddir)/lib/graph/.libs/libgraph.a \
$(top_builddir)/lib/cdt/.libs/libcdt.a \
$(top_builddir)/lib/gd/.libs/libgvgd.a
+dot_static_LDFLAGS = -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library'
+
dot_static_LDADD = \
$(top_builddir)/lib/plugin/.libs/libgvplugin_dot_layout.a \
$(top_builddir)/lib/plugin/.libs/libgvplugin_neato_layout.a \
$(top_builddir)/lib/graph/.libs/libgraph.a \
$(top_builddir)/lib/cdt/.libs/libcdt.a \
$(top_builddir)/lib/gd/.libs/libgvgd.a \
- @GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@
+ @ICONV_LIBS@ @FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @MATH_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@ @LIBLTDL@ @SOCKET_LIBS@
EXTRA_DIST = Makefile.old dot.1 dot.pdf
$(top_builddir)/lib/ingraphs/libingraphs.la \
$(top_builddir)/lib/graph/libgraph.la
-gvpack_SOURCES = gvpack.c plugins.c
+gvpack_SOURCES = gvpack.c
+
+gvpack_LDFLAGS = -export-dynamic -dlpreopen self -export-symbols-regex '.*_LTX_library'
gvpack_LDADD = \
$(top_builddir)/lib/common/libcommon.la \
+++ /dev/null
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/**********************************************************
-* This software is part of the graphviz package *
-* http://www.graphviz.org/ *
-* *
-* Copyright (c) 1994-2004 AT&T Corp. *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Corp. *
-* *
-* Information and Software Systems Research *
-* AT&T Research, Florham Park NJ *
-**********************************************************/
-
-#include <stdio.h>
-
-#include "config.h"
-#include "types.h"
-#include "macros.h"
-#include "gvc.h"
-gvplugin_library_t *builtins[] = {
- NULL
-};
-
$(top_builddir)/lib/pathplan/libpathplan.la \
@GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@
-EXTRA_DIST = Makefile.old builtins.c
+EXTRA_DIST = Makefile.old
+++ /dev/null
-/* $Id$ $Revision$ */
-/* vim:set shiftwidth=4 ts=8: */
-
-/**********************************************************
-* This software is part of the graphviz package *
-* http://www.graphviz.org/ *
-* *
-* Copyright (c) 1994-2004 AT&T Corp. *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Corp. *
-* *
-* Information and Software Systems Research *
-* AT&T Research, Florham Park NJ *
-**********************************************************/
-
-#include "gvplugin.h"
-
-extern gvplugin_library_t
- gvplugin_dot_layout_LTX_library,
- gvplugin_neato_layout_LTX_library,
- gvplugin_usershape_gd_LTX_library;
-
-gvplugin_library_t *builtins[] = {
- &gvplugin_dot_layout_LTX_library,
- &gvplugin_neato_layout_LTX_library,
- &gvplugin_usershape_gd_LTX_library,
- NULL
-};
-
#include "gvc.h"
-char *Info[] = {
+char *LibInfo[] = {
"libgvc", /* Program */
VERSION, /* Version */
BUILDDATE /* Build Date */
aginit();
agnodeattr(NULL, "label", NODENAME_ESC);
- gvc = gvNEWcontext(Info, username());
+ gvc = gvNEWcontext(LibInfo, username());
gvconfig(gvc, FALSE); /* configure for available plugins and codegens */
return gvc;
}
}
}
+struct lt_symlist
+{
+ const char *name;
+ void* address;
+};
+
+extern const struct lt_symlist lt_preloaded_symbols[];
+
+static void gvconfig_plugin_install_builtins(GVC_t * gvc)
+{
+ const struct lt_symlist *s;
+ const char *name;
+
+ s = lt_preloaded_symbols;
+ while ((name = s->name)) {
+fprintf(stderr,"%s\n",name);
+ if (name[0] == 'g'
+ && name[1] == 'v'
+ && name[2] == 'p'
+ && strstr(name, "_LTX_library")) {
+ gvconfig_plugin_install_from_library(gvc, NULL, (gvplugin_library_t *)(s->address));
+ }
+ s++;
+ }
+}
+
#ifndef DISABLE_LTDL
static void gvconfig_write_library_config(char *path, gvplugin_library_t *library, FILE *f)
{
}
#endif
-extern gvplugin_library_t *builtins[];
-
#ifndef DISABLE_LTDL
static void config_rescan(GVC_t *gvc, char *config_path)
{
*/
void gvconfig(GVC_t * gvc, boolean rescan)
{
+#if 0
gvplugin_library_t **libraryp;
+#endif
#ifndef DISABLE_LTDL
int sz, rc;
struct stat config_st, libdir_st;
"cg", NULL, (gvplugin_installed_t *) p);
#endif
- for (libraryp = builtins; *libraryp; libraryp++) {
- gvconfig_plugin_install_from_library(gvc, NULL, *libraryp);
- }
#ifndef DISABLE_LTDL
+ gvconfig_plugin_install_builtins(gvc);
+
/* see if there are any new plugins */
libdir = gvconfig_libdir();
rc = stat(libdir, &libdir_st);
}
hndl = lt_dlopen (p);
if (!hndl) {
- agerr(AGWARN, "failed to dlopen %s\n", p);
+ agerr(AGWARN, lt_dlerror());
return NULL;
}
#define NULL (void *)0
#endif
-
/*
* Terminology:
*
gvplugin_api_t *apis;
} gvplugin_library_t;
+ extern gvplugin_library_t *builtins[];
+
#ifdef __cplusplus
}
#endif
LIBS = @LIBS@ -lc
-BASESOURCES = gv.cpp $(top_srcdir)/lib/gvc/builtins.c
+BASESOURCES = gv.cpp builtins.c
BASELIBS = \
$(top_builddir)/lib/plugin/libgvplugin_dot_layout.la \
$(top_builddir)/lib/plugin/libgvplugin_neato_layout.la \
--- /dev/null
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+* This software is part of the graphviz package *
+* http://www.graphviz.org/ *
+* *
+* Copyright (c) 1994-2004 AT&T Corp. *
+* and is licensed under the *
+* Common Public License, Version 1.0 *
+* by AT&T Corp. *
+* *
+* Information and Software Systems Research *
+* AT&T Research, Florham Park NJ *
+**********************************************************/
+
+#include "gvplugin.h"
+
+struct lt_symlist
+{
+ const char *name;
+ void* address;
+};
+
+#if 0
+const char *gvplugin_dot_layout_name = "gvplugin_dot_layout_LTX_library";
+const char *gvplugin_neato_layout_name = "gvplugin_neato_layout_LTX_library";
+const char *gvplugin_usershape_gd_name = "gvplugin_usershape_gd_LTX_library";
+
+extern gvplugin_library_t *gvplugin_dot_layout_LTX_library;
+extern gvplugin_library_t *gvplugin_neato_layout_LTX_library;
+extern gvplugin_library_t *gvplugin_usershape_gd_LTX_library;
+
+const struct lt_symlist lt_preloaded_symbols[] = {
+ { gvplugin_dot_layout_name,
+ (void*)gvplugin_dot_layout_LTX_library },
+ { gvplugin_neato_layout_name,
+ (void*)gvplugin_neato_layout_LTX_library },
+ { gvplugin_usershape_gd_name,
+ (void*)gvplugin_usershape_gd_LTX_library },
+ { 0,
+ 0 }
+};
+#else
+const struct lt_symlist lt_preloaded_symbols[] = {{0,0,},};
+#endif
+
html_DATA = $(html)
endif
-libtcldot_la_SOURCES = tcldot.c tkgen.c \
- $(top_srcdir)/tclpkg/gdtclft/gdtclft.c \
- $(top_srcdir)/lib/gvc/builtins.c
+libtcldot_la_SOURCES = tcldot.c tkgen.c builtins.c \
+ $(top_srcdir)/tclpkg/gdtclft/gdtclft.c
libtcldot_la_LIBADD = \
$(top_builddir)/tclpkg/tclhandle/libtclhandle.la \
$(top_builddir)/tclpkg/tclstubs/libtclstubs.la \
$(top_builddir)/lib/plugin/libgvplugin_dot_layout.la \
$(top_builddir)/lib/plugin/libgvplugin_neato_layout.la \
$(top_builddir)/lib/plugin/libgvplugin_usershape_gd.la \
- $(top_builddir)/lib/gvc/libgvc.la
+ $(top_builddir)/lib/gvc/libgvc.la @LIBGEN_LIBS@ @LIBLTDL@
if WITH_TCL
all-local: pkgIndex.tcl
--- /dev/null
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+* This software is part of the graphviz package *
+* http://www.graphviz.org/ *
+* *
+* Copyright (c) 1994-2004 AT&T Corp. *
+* and is licensed under the *
+* Common Public License, Version 1.0 *
+* by AT&T Corp. *
+* *
+* Information and Software Systems Research *
+* AT&T Research, Florham Park NJ *
+**********************************************************/
+
+#include "gvplugin.h"
+
+struct lt_symlist
+{
+ const char *name;
+ void* address;
+};
+
+#if 0
+const char *gvplugin_dot_layout_name = "gvplugin_dot_layout_LTX_library";
+const char *gvplugin_neato_layout_name = "gvplugin_neato_layout_LTX_library";
+const char *gvplugin_usershape_gd_name = "gvplugin_usershape_gd_LTX_library";
+
+extern gvplugin_library_t *gvplugin_dot_layout_LTX_library;
+extern gvplugin_library_t *gvplugin_neato_layout_LTX_library;
+extern gvplugin_library_t *gvplugin_usershape_gd_LTX_library;
+
+const struct lt_symlist lt_preloaded_symbols[] = {
+ { gvplugin_dot_layout_name,
+ (void*)gvplugin_dot_layout_LTX_library },
+ { gvplugin_neato_layout_name,
+ (void*)gvplugin_neato_layout_LTX_library },
+ { gvplugin_usershape_gd_name,
+ (void*)gvplugin_usershape_gd_LTX_library },
+ { 0,
+ 0 }
+};
+#else
+const struct lt_symlist lt_preloaded_symbols[] = {{0,0,},};
+#endif
+