]> granicus.if.org Git - graphviz/commitdiff
Fix code to rely on explicit --with-sfdp in configure
authorerg <devnull@localhost>
Wed, 30 Apr 2008 03:43:33 +0000 (03:43 +0000)
committererg <devnull@localhost>
Wed, 30 Apr 2008 03:43:33 +0000 (03:43 +0000)
configure.ac
lib/neatogen/adjust.c
plugin/neato_layout/Makefile.am

index 95d097cf15111a592b458db591bd1a6c681c2f6d..ad9dcb986e74b9e463539df8982fdc9761068bf4 100644 (file)
@@ -2277,6 +2277,21 @@ AC_SUBST(TCL_PKGINDEX_GD)
 AC_SUBST(TCL_PKGINDEX_SWIG)
 AC_SUBST(TK_PKGINDEX)
 
+dnl -----------------------------------
+dnl SFDP
+AC_ARG_WITH(sfdp,
+  [AC_HELP_STRING([--with-sfdp=no], [sfdp layout engine])],
+  [], [with_sfdp=no])
+
+if test "x$with_sfdp" = "xyes"; then
+       AC_DEFINE_UNQUOTED(SFDP,1,[Define if you want SFDP])
+       AC_MSG_RESULT(Optional SFDP is enabled)
+else
+       AC_MSG_WARN(Optional SFDP is disabled)
+fi
+AM_CONDITIONAL(WITH_SFDP, [test "x$with_sfdp" = "xyes"])
+
 dnl -----------------------------------
 dnl SMYRNA 
 
index e32eaf990984eba0fae9c53ef2f8d9c750dfe7a7..f556bf1cd8853dae18bbc8b82b3c51af5721e082 100644 (file)
@@ -30,7 +30,7 @@
 #include "heap.h"
 #include "hedges.h"
 #include "digcola.h"
-#ifdef HAVE_GTS
+#if (HAVE_GTS && SFDP)
 #include "sfdp.h"
 #endif
 #ifdef IPSEPCOLA
@@ -862,7 +862,7 @@ removeOverlapAs(graph_t * G, char* flag)
        case AM_COMPRESS:
            ret = scAdjust(G, -1);
            break;
-#ifdef HAVE_GTS
+#if (HAVE_GTS && SFDP)
        case AM_FDP:
            ret = fdpAdjust(G);
            break;
index 1375170ce99feed95baba2e05384b1811894dd49..e459ae3dd35978083fd8039789db55b3b96d7bb6 100644 (file)
@@ -25,7 +25,6 @@ libgvplugin_neato_layout_C_la_LIBADD = \
        $(top_builddir)/lib/neatogen/libneatogen_C.la \
        $(top_builddir)/lib/twopigen/libtwopigen_C.la \
        $(top_builddir)/lib/fdpgen/libfdpgen_C.la \
-       $(top_builddir)/lib/sfdpgen/libsfdpgen_C.la \
        $(top_builddir)/lib/circogen/libcircogen_C.la
 
 libgvplugin_neato_layout_la_LDFLAGS = -version-info @GVPLUGIN_VERSION_INFO@
@@ -37,6 +36,10 @@ libgvplugin_neato_layout_la_LIBADD = $(libgvplugin_neato_layout_C_la_LIBADD) \
        $(top_builddir)/lib/pathplan/libpathplan.la \
        $(GTS_LIBS) @IPSEPCOLA_LIBS@ @MATH_LIBS@
        
+if WITH_SFDP
+libgvplugin_neato_layout_C_la_LIBADD += $(top_builddir)/lib/sfdpgen/libsfdpgen_C.la
+endif
+
 if WITH_WIN32
 libgvplugin_neato_layout_la_LDFLAGS += -no-undefined
 libgvplugin_neato_layout_la_LIBADD += $(top_builddir)/lib/graph/libgraph.la $(top_builddir)/lib/cdt/libcdt.la