From: John Ellson Date: Tue, 24 Jul 2012 22:13:11 +0000 (-0400) Subject: improved method for setting WITH_CGRAPH in lib/gvc/gvc.h X-Git-Tag: LAST_LIBGRAPH~32^2~368 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ebf0abba3a140ff9b91607aa60de143ea5594d0;p=graphviz improved method for setting WITH_CGRAPH in lib/gvc/gvc.h --- diff --git a/configure.ac b/configure.ac index 86acdd2b5..63365e8e1 100644 --- a/configure.ac +++ b/configure.ac @@ -194,7 +194,7 @@ AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) # Suppress verbose compile lines m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([config.h lib/gvc/gvc.h]) # put BUILDDATE in its own file so that only targets that use it get rebuilt echo "#define BUILDDATE \"$VERSION_DATE\"" > builddate.h @@ -2874,12 +2874,6 @@ else fi AM_CONDITIONAL(WITH_CGRAPH, [test "x$use_cgraph" = "xYes"]) -if test "x$use_cgraph" = "xYes"; then - cp $(top_srcdir)lib/gvc/gvc.h.cgraph $(top_srcdir)lib/gvc/gvc.h -else - cp $(top_srcdir)lib/gvc/gvc.h.graph $(top_srcdir)lib/gvc/gvc.h -fi - dnl ----------------------------------- dnl ORTHO diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index 1c69ac787..93876c90b 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -72,6 +72,6 @@ libgvc_la_DEPENDENCIES = $(libgvc_C_la_DEPENDENCIES) gvc.3.pdf: $(srcdir)/gvc.3 - @GROFF@ -Tps -man $(srcdir)/gvc.3 | @PS2PDF@ - - > gvc.3.pdf -EXTRA_DIST = $(man_MANS) $(pdf_DATA) Makefile.old regex_win32.h regex_win32.c gvc.vcproj gvc.h.cgraph gvc.h.graph +EXTRA_DIST = $(man_MANS) $(pdf_DATA) Makefile.old regex_win32.h regex_win32.c gvc.vcproj gvc.h.in DISTCLEANFILES = $(pdf_DATA) diff --git a/lib/gvc/gvc.h.cgraph b/lib/gvc/gvc.h.cgraph deleted file mode 100644 index 4a3d162c7..000000000 --- a/lib/gvc/gvc.h.cgraph +++ /dev/null @@ -1,128 +0,0 @@ -/* $Id$ $Revision$ */ -/* vim:set shiftwidth=4 ts=8: */ - -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - *************************************************************************/ - -#ifndef GVC_H -#define GVC_H - -#define WITH_CGRAPH 1 - -#include "types.h" -#include "gvplugin.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef GVDLL -#define extern __declspec(dllexport) -#else -#define extern -#endif - -/*visual studio*/ -#ifdef WIN32_DLL -#ifndef GVC_EXPORTS -#define extern __declspec(dllimport) -#endif -#endif -/*end visual studio*/ - -/* misc */ -/* FIXME - this needs eliminating or renaming */ -extern void gvToggle(int); - -/* set up a graphviz context */ -extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading); - -/* set up a graphviz context - and init graph - retaining old API */ -extern GVC_t *gvContext(void); -/* set up a graphviz context - and init graph - with builtins */ -extern GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading); - -/* get information associated with a graphviz context */ -extern char **gvcInfo(GVC_t*); -extern char *gvcVersion(GVC_t*); -extern char *gvcBuildDate(GVC_t*); - -/* parse command line args - minimally argv[0] sets layout engine */ -extern int gvParseArgs(GVC_t *gvc, int argc, char **argv); -extern graph_t *gvNextInputGraph(GVC_t *gvc); -extern graph_t *gvPluginsGraph(GVC_t *gvc); - -/* Compute a layout using a specified engine */ -extern int gvLayout(GVC_t *gvc, graph_t *g, const char *engine); - -/* Compute a layout using layout engine from command line args */ -extern int gvLayoutJobs(GVC_t *gvc, graph_t *g); - -/* Render layout into string attributes of the graph */ -extern void attach_attrs(graph_t *g); - -/* Parse an html string */ -#ifndef WITH_CGRAPH -extern char *agstrdup_html(char *s); -extern int aghtmlstr(char *s); -#endif - -/* Render layout in a specified format to an open FILE */ -extern int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out); - -/* Render layout in a specified format to an open FILE */ -extern int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename); - -/* Render layout in a specified format to an external context */ -extern int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context); - -/* Render layout in a specified format to a malloc'ed string */ -extern int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length); - -/* Render layout according to -T and -o options found by gvParseArgs */ -extern int gvRenderJobs(GVC_t *gvc, graph_t *g); - -/* Clean up layout data structures - layouts are not nestable (yet) */ -extern int gvFreeLayout(GVC_t *gvc, graph_t *g); - -/* Clean up graphviz context */ -extern void gvFinalize(GVC_t *gvc); -extern int gvFreeContext(GVC_t *gvc); - -/* Return list of plugins of type kind. - * kind would normally be "render" "layout" "textlayout" "device" "loadimage" - * The size of the list is stored in sz. - * The caller is responsible for freeing the storage. This involves - * freeing each item, then the list. - * Returns NULL on error, or if there are no plugins. - * In the former case, sz is unchanged; in the latter, sz = 0. - * - * At present, the str argument is unused, but may be used to modify - * the search as in gvplugin_list above. - */ -extern char** gvPluginList (GVC_t *gvc, char* kind, int* sz, char*); - -/** Add a library from your user application - * @param gvc Graphviz context to add library to - * @param lib library to add - */ - - - - -extern void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib); - -#undef extern - -#ifdef __cplusplus -} -#endif - -#endif /* GVC_H */ diff --git a/lib/gvc/gvc.h.graph b/lib/gvc/gvc.h.in similarity index 99% rename from lib/gvc/gvc.h.graph rename to lib/gvc/gvc.h.in index f8c0a74cf..be8653e69 100644 --- a/lib/gvc/gvc.h.graph +++ b/lib/gvc/gvc.h.in @@ -14,6 +14,7 @@ #ifndef GVC_H #define GVC_H +/* Define if you want CGRAPH */ #undef WITH_CGRAPH #include "types.h"