From: erg Date: Wed, 30 Apr 2008 03:43:33 +0000 (+0000) Subject: Fix code to rely on explicit --with-sfdp in configure X-Git-Tag: LAST_LIBGRAPH~32^2~4146 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=093ad4ad2a977bcfbed36f932ac963fc4220699a;p=graphviz Fix code to rely on explicit --with-sfdp in configure --- diff --git a/configure.ac b/configure.ac index 95d097cf1..ad9dcb986 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/lib/neatogen/adjust.c b/lib/neatogen/adjust.c index e32eaf990..f556bf1cd 100644 --- a/lib/neatogen/adjust.c +++ b/lib/neatogen/adjust.c @@ -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; diff --git a/plugin/neato_layout/Makefile.am b/plugin/neato_layout/Makefile.am index 1375170ce..e459ae3dd 100644 --- a/plugin/neato_layout/Makefile.am +++ b/plugin/neato_layout/Makefile.am @@ -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