From: ellson Date: Wed, 4 Jun 2008 18:57:53 +0000 (+0000) Subject: add configure test for lib/sfdpgen/triangle.[ch] and define HAVE_TRIANGLE is present X-Git-Tag: LAST_LIBGRAPH~32^2~3975 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9612cb75c5784b331013e2c7c9f6392a87ffb34;p=graphviz add configure test for lib/sfdpgen/triangle.[ch] and define HAVE_TRIANGLE is present change tests to "#if defined", since HAVE_TRIANGLE is not defined if not present. --- diff --git a/configure.ac b/configure.ac index b349af84c..614f7fde9 100644 --- a/configure.ac +++ b/configure.ac @@ -2503,6 +2503,15 @@ fi fi AC_SUBST(TKINT_INCLUDES) +# ------------------------------------ +# triangle.[ch] + +if test -f "lib/sfdpgen/triangle.c"; then +if test -f "lib/sfdpgen/triangle.h"; then + AC_DEFINE_UNQUOTED(HAVE_TRIANGLE,1,[Define if triangle.[ch] are available.]) +fi +fi + # ---------------------------------- # tcl/tk pkgIndex.tcl generation diff --git a/lib/neatogen/adjust.c b/lib/neatogen/adjust.c index 984d7c32a..5f3eab934 100644 --- a/lib/neatogen/adjust.c +++ b/lib/neatogen/adjust.c @@ -30,7 +30,7 @@ #include "heap.h" #include "hedges.h" #include "digcola.h" -#if ((HAVE_GTS || HAVE_TRIANGLE) && SFDP) +#if ((defined(HAVE_GTS) || defined(HAVE_TRIANGLE)) && defined(SFDP)) #include "sfdp.h" #endif #ifdef IPSEPCOLA