Remove cmd/dot/dotneato-config-* Use pkgconfig mechanism now.
Add dot.demo/ with two demo programs.
-I$(top_srcdir) \
-I$(top_srcdir)/lib/common \
-I$(top_srcdir)/lib/gvc \
- -I$(top_srcdir)/lib/pack \
-I$(top_srcdir)/lib/pathplan \
-I$(top_srcdir)/lib/graph \
- -I$(top_srcdir)/lib/cdt \
- -I$(top_srcdir)/lib/fdpgen
+ -I$(top_srcdir)/lib/cdt
pkginclude_HEADERS = dotneato.h
pkglib_LTLIBRARIES = libdotneato.la
pkgconfig_DATA = libdotneato.pc
-bin_SCRIPTS = dotneato-config
bin_PROGRAMS = dot
-man_MANS = dot.1 dotneato-config.1
-pdf_DATA = dot.pdf dotneato-config.pdf
+man_MANS = dot.1
+pdf_DATA = dot.pdf
libdotneato_la_SOURCES = dotneato.c
-dot_SOURCES = dot.c args.c
+dot_SOURCES = dot.c
if DISABLE_LTDL
libdotneato_la_LIBADD = \
dot.pdf: $(top_srcdir)/cmd/dot/dot.1
groff -Tps -man $(top_srcdir)/cmd/dot/dot.1 | ps2pdf - - >$@
-dotneato-config.pdf: $(top_srcdir)/cmd/dot/dotneato-config.1
- groff -Tps -man $(top_srcdir)/cmd/dot/dotneato-config.1 | ps2pdf - - >$@
+EXTRA_DIST = Makefile.old dot.1 dot.pdf
-EXTRA_DIST = Makefile.old dot.1 dotneato-config.1 dot.pdf dotneato-config.pdf dotneato-config.in
-
-DISTCLEANFILES = dot.pdf dotneato-config.pdf
+DISTCLEANFILES = dot.pdf
LIBDOTNEATO = libdotneato.a
-OBJS = dot.o args.o
+OBJS = dot.o
SHLIBS = twopigen/libtwopi.a dotgen/libdot.a neatogen/libneato.a pack/libpack.a gvrender/libgvrender.a common/libcommon.a
all : dot $(LIBDOTNEATO)
dot.o : dot.c
$(CC) -c $(CCFLAGS) $(DEFINES) $(INCS) dot.c
-args.o : args.c
- $(CC) -c $(CCFLAGS) $(DEFINES) $(ALLINCS) args.c
-
plugins.o : plugins.c
$(CC) -c $(CCFLAGS) $(DEFINES) $(ALLINCS) plugins.c
+++ /dev/null
-.\" Process this file with
-.\" groff -man -Tascii dotneato-config.1
-.\"
-.TH dotneato-config 1 "FEBRUARY 1999" "Library Configuration" "User Manuals"
-.SH NAME
-dotneato-config \- Display Dotneato Library Configuration
-.SH SYNOPSIS
-.B dotneato-config
-.I OPTION
-.B [
-.I OPTION
-.B ... ]
-.SH DESCRIPTION
-.B dotneato-config
-is a script that is used to display the compiler and linker flags that are
-required for building applications that link to the dotneato libraries
-from GraphViz.
-
-.SH OPTIONS
-.IP --version
-dotneato version information
-.IP --prefix
-displays prefix of directory where dotneato was installed.
-.IP --exec-prefix
-displays exec-prefix of the directory where architecture-specific parts
-of dotneato were installed.
-.IP --cflags
-C pre-processor and compiler flags for use with dotneato.
-.IP --libs
-dotneato library linking information
-.IP --libtool
-dotneato libtool information
-.SH "SEE ALSO"
-.BR dot (1)
-.SH AUTHOR
-John Ellson <ellson@graphviz.org>
+++ /dev/null
-#! /bin/sh
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-pkglibdir=@libdir@/@PACKAGE@
-includedir=@includedir@
-pkgincludedir=${includedir}/@PACKAGE@
-
-usage()
-{
- cat <<EOF
-Usage: dotneato-config [OPTIONS] [LIBRARIES]
-Options:
- [--prefix[=DIR]]
- [--exec-prefix[=DIR]]
- [--version]
- [--cflags]
- [--ldflags]
- [--libs]
- [--rlibs]
- [--libtool]
-EOF
- exit $1
-}
-
-if test $# -eq 0 ; then
- usage 1 1>&2
-fi
-
-while test $# -gt 0 ; do
- case "$1" in
- -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- case $1 in
- --prefix=*)
- prefix=$optarg
- local_prefix=yes
- ;;
- --prefix)
- echo_prefix=yes
- ;;
- --exec-prefix=*)
- exec_prefix=$optarg
- exec_prefix_set=yes
- local_prefix=yes
- ;;
- --exec-prefix)
- echo_exec_prefix=yes
- ;;
- --version)
- echo @VERSION@
- exit 0
- ;;
- --cflags)
- echo_cflags=yes
- ;;
- --ldflags)
- echo_ldflags=yes
- ;;
- --libs)
- echo_libs=yes
- ;;
- --rlibs)
- echo_rlibs=yes
- ;;
- --libtool)
- echo_libtool=yes
- ;;
- *)
- usage 1 1>&2
- ;;
- esac
- shift
-done
-
-if test "$local_prefix" = "yes" ; then
- if test "$exec_prefix_set" != "yes" ; then
- exec_prefix=$prefix
- fi
-fi
-
-if test "$echo_prefix" = "yes" ; then
- echo $prefix
-fi
-
-if test "$echo_exec_prefix" = "yes" ; then
- echo $exec_prefix
-fi
-
-if test "$echo_cflags" = "yes" ; then
- echo -I$pkgincludedir $cflags
-fi
-
-if test "$echo_ldflags" = "yes" ; then
- echo "-L$pkglibdir"
-fi
-
-if test "$echo_libs" = "yes" ; then
- echo "-ldotneato"
-fi
-
-if test "$echo_rlibs" = "yes" ; then
- echo ""
-fi
-
-if test "$echo_libtool" = "yes" ; then
- echo "$pkglibdir/libdotneato.la"
-fi
-
-# EOF
--- /dev/null
+COMPILE=libtool --tag=CC --mode=compile ${CC} -c
+LINK=libtool --tag=CC --mode=link ${CC}
+
+CFLAGS=`pkg-config libdotneato --cflags`
+LDFLAGS=`pkg-config libdotneato --libs`
+
+all: dot demo
+
+dot: dot.lo
+ ${LINK} ${LDFLAGS} -o $@ dot.lo
+
+dot.lo: dot.c
+ ${COMPILE} ${CFLAGS} -o $@ dot.c
+
+demo: demo.lo
+ ${LINK} ${LDFLAGS} -o $@ demo.lo
+
+demo.lo: demo.c
+ ${COMPILE} ${CFLAGS} -o $@ demo.c
+
+clean:
+ rm -rf .libs dot demo *.o *.lo
--- /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 <dotneato.h>
+
+int main(int argc, char **argv)
+{
+ Agraph_t *g;
+ Agnode_t *n, *m;
+ Agedge_t *e;
+ Agsym_t *a;
+ GVC_t *gvc;
+
+ /* set up renderer context */
+ gvc = gvContext();
+
+ /* parse command line args - minimally argv[0] sets layout engine */
+ parse_args(gvc, argc, argv);
+
+ /* Create a simple digraph */
+ g = agopen("g", AGDIGRAPH);
+ n = agnode(g, "n");
+ m = agnode(g, "m");
+ e = agedge(g, n, m);
+
+ /* Set an attribute - in this case one that affects the visible rendering */
+ if (!(a = agfindattr(g->proto->n, "color")))
+ a = agnodeattr(g, "color", "");
+ agxset(n, a->index, "red");
+
+ /* Compute a layout */
+ gvlayout_layout(gvc, g);
+
+ /* Write the graph according to -T and -o options */
+ emit_jobs(gvc, g);
+
+ /* Clean out layout data */
+ gvlayout_cleanup(gvc, g);
+
+ /* Free graph structures */
+ agclose(g);
+
+ /* Clean up output file and errors */
+ dotneato_terminate(gvc);
+
+ return 0;
+}
--- /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 <dotneato.h>
+
+int main(int argc, char **argv)
+{
+ graph_t *g, *prev = NULL;
+ GVC_t *gvc;
+
+ gvc = gvContext();
+ parse_args(gvc, argc, argv);
+
+ while ((g = next_input_graph())) {
+ if (prev) {
+ gvlayout_cleanup(gvc, prev);
+ agclose(prev);
+ }
+ gvlayout_layout(gvc, g);
+ emit_jobs(gvc, g);
+ prev = g;
+ }
+ dotneato_terminate(gvc);
+ return 0;
+}
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/lib/gvc \
+ -I$(top_srcdir)/lib/pack \
+ -I$(top_srcdir)/lib/fdpgen \
-I$(top_srcdir)/lib/pathplan \
-I$(top_srcdir)/lib/graph \
-I$(top_srcdir)/lib/cdt @GD_INCLUDES@ @EXPAT_INCLUDES@ @Z_INCLUDES@
libcommon_la_SOURCES = arrows.c colxlate.c fontmetrics.c \
- gdtextsize.c gdusershape.c \
+ args.c gdtextsize.c gdusershape.c \
globals.c htmllex.c htmlparse.y htmltable.c input.c \
pointset.c postproc.c psusershape.c routespl.c splines.c \
svgusershape.c timing.c labels.c ns.c shapes.c utils.c \
INCS = -I. \
-I$(ROOT) \
-I../cdt \
+ -I../pack \
+ -I../fdpgen \
-I../pathplan \
-I../gd \
-I../graph \