]> granicus.if.org Git - graphviz/commitdiff
improved method for setting WITH_CGRAPH in lib/gvc/gvc.h
authorJohn Ellson <ellson@research.att.com>
Tue, 24 Jul 2012 22:13:11 +0000 (18:13 -0400)
committerJohn Ellson <ellson@research.att.com>
Tue, 24 Jul 2012 22:13:11 +0000 (18:13 -0400)
configure.ac
lib/gvc/Makefile.am
lib/gvc/gvc.h.cgraph [deleted file]
lib/gvc/gvc.h.in [moved from lib/gvc/gvc.h.graph with 99% similarity]

index 86acdd2b54f2a90f98e3811a3e9aa1daf6788baa..63365e8e11eb1fab909fca6423f36da30f204668 100644 (file)
@@ -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 
 
index 1c69ac7875455443e345c6a4ed05db0676df090e..93876c90b8d0b0995fd6717c04c186293d1eb582 100644 (file)
@@ -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 (file)
index 4a3d162..0000000
+++ /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 */
similarity index 99%
rename from lib/gvc/gvc.h.graph
rename to lib/gvc/gvc.h.in
index f8c0a74cf582e1446f583ac7b1a7eec0cec3e1ac..be8653e69a23a4e2aecd81cf3f813e12238ef7e2 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef                        GVC_H
 #define                        GVC_H
 
+/* Define if you want CGRAPH */
 #undef WITH_CGRAPH
 
 #include "types.h"