]> granicus.if.org Git - graphviz/commitdiff
allow tcl packages that don't require swig to build on redhat[789]
authorellson <devnull@localhost>
Fri, 6 Jul 2007 15:45:39 +0000 (15:45 +0000)
committerellson <devnull@localhost>
Fri, 6 Jul 2007 15:45:39 +0000 (15:45 +0000)
configure.ac
tclpkg/Makefile.am

index d7eaba41c4a9783dca4b07b67034269c8025445b..285336c2f3aab0334d3655695da4a294a1bad255 100644 (file)
@@ -873,7 +873,6 @@ AM_CONDITIONAL(WITH_RUBY, [test "x$RUBY" != "x"])
 dnl -----------------------------------
 dnl INCLUDES and LIBS for TCL
 
-if test "x$SWIG" != "x"; then
 AC_ARG_ENABLE(tcl,
   [AC_HELP_STRING([--disable-tcl], [don't support tcl language bindings])])
 if test "x$enable_tcl" != "xno"; then
@@ -882,12 +881,6 @@ HAVE_TCL=1
 else
 HAVE_TCL=0
 fi
-fi
-
-if test `$SWIG -help 2>&1 | $GREP -c '\-tcl *- Generate'` = 0; then
-       HAVE_TCL=0
-       AC_MSG_WARN([swig does not support tcl. The TCL packages will not be built])
-else
 
 AC_ARG_WITH(tclsh,
     [  --with-tclsh=PROG       build graphviz for specific tclsh],
@@ -901,12 +894,10 @@ if test "x$TCLSH" = "x"; then
             AC_PATH_PROG(TCLSH,tclsh)
         fi
     fi
-fi
-
-if test "x$TCLSH" = "x"; then
-    AC_MSG_WARN([Unable to find a tclsh. The Tcl packages will not be built])
-    HAVE_TCL=0
-fi
+    if test "x$TCLSH" = "x"; then
+        AC_MSG_WARN([Unable to find a tclsh. The Tcl packages will not be built])
+        HAVE_TCL=0
+    fi
 fi
 
 if test "$HAVE_TCL" = "1"; then
@@ -1844,21 +1835,25 @@ AC_SUBST(TKINT_INCLUDES)
 # ----------------------------------
 # tcl/tk pkgIndex.tcl generation
 
+TCL_PKGINDEX=""
+TCL_PKGINDEX_GD=""
+TCL_PKGINDEX_SWIG=""
+TK_PKGINDEX=""
 if test "$HAVE_TCL" = "1"; then
+    TCL_PKGINDEX="tcldot/pkgIndex.tcl tclpathplan/pkgIndex.tcl"
     if test "x$with_libgd" = "xyes"; then
-       TCL_PKGINDEX="gdtclft/pkgIndex.tcl tcldot/pkgIndex.tcl tclpathplan/pkgIndex.tcl gv/pkgIndex.tcl"
-    else
-       TCL_PKGINDEX="tcldot/pkgIndex.tcl tclpathplan/pkgIndex.tcl gv/pkgIndex.tcl"
+       TCL_PKGINDEX_GD="gdtclft/pkgIndex.tcl"
+    fi
+    if test "x$SWIG" != "x"; then
+       TCL_PKGINDEX_SWIG="gv/pkgIndex.tcl"
+    fi
+    if test "$HAVE_TK" = "1"; then
+        TK_PKGINDEX="tkspline/pkgIndex.tcl"
     fi
-else
-    TCL_PKGINDEX=""
-fi
-if test "$HAVE_TK" = "1"; then
-    TK_PKGINDEX="tkspline/pkgIndex.tcl"
-else
-    TK_PKGINDEX=""
 fi
 AC_SUBST(TCL_PKGINDEX)
+AC_SUBST(TCL_PKGINDEX_GD)
+AC_SUBST(TCL_PKGINDEX_SWIG)
 AC_SUBST(TK_PKGINDEX)
 
 # -----------------------------------
index 1ff3cba683d59076fcfe9e145d85b13d78d88e1c..f5562b7f60f6ad9298455b3b186f01fd25e89e22 100644 (file)
@@ -6,9 +6,9 @@ pkgindex_DATA = pkgIndex.tcl
 
 SUBDIRS = tclstubs tkstubs tclhandle gdtclft tcldot tclpathplan tkspline gv
 
-pkgIndex.tcl: @TCL_PKGINDEX@ @TK_PKGINDEX@
+pkgIndex.tcl: @TCL_PKGINDEX@ @TCL_PKGINDEX_GD@ @TCL_PKGINDEX_SWIG@ @TK_PKGINDEX@
        echo "# end" >end
-       cat @TCL_PKGINDEX@ @TK_PKGINDEX@ end >$@
+       cat @TCL_PKGINDEX@ @TCL_PKGINDEX_GD@ @TCL_PKGINDEX_SWIG@ @TK_PKGINDEX@ end >$@
        rm -f end
 
 EXTRA_DIST = Makefile.old mkpkgindex.sh