]> granicus.if.org Git - graphviz/commitdiff
autoconf/automake magick for script interfaces
authorellson <devnull@localhost>
Sat, 26 Mar 2005 03:37:26 +0000 (03:37 +0000)
committerellson <devnull@localhost>
Sat, 26 Mar 2005 03:37:26 +0000 (03:37 +0000)
config_perl.pl [new file with mode: 0644]
config_python.py [new file with mode: 0644]
config_ruby.rb [new file with mode: 0644]
config_tcl.tcl [new file with mode: 0644]
configure.ac
lib/Makefile.am
lib/common/emit.c

diff --git a/config_perl.pl b/config_perl.pl
new file mode 100644 (file)
index 0000000..a54ecc5
--- /dev/null
@@ -0,0 +1,14 @@
+use Config;
+
+$archlib = $Config{archlib};
+
+print $archlib, "\n";
+
+# if sys.argv[1] == "archlib":
+#     print sysconfig.get_python_lib(1,1)
+# elif sys.argv[1] == "lib":
+#     print sysconfig.get_python_lib(0,1)
+# elif sys.argv[1] == "archsitelib":
+#     print sysconfig.get_python_lib(1,0)
+# elif sys.argv[1] == "sitelib":
+#     print sysconfig.get_python_lib(0,0)
diff --git a/config_python.py b/config_python.py
new file mode 100644 (file)
index 0000000..b747045
--- /dev/null
@@ -0,0 +1,12 @@
+import sys
+from distutils import sysconfig
+
+if sys.argv[1] == "archlib":
+    print sysconfig.get_python_lib(1,1)
+elif sys.argv[1] == "lib":
+    print sysconfig.get_python_lib(0,1)
+elif sys.argv[1] == "archsitelib":
+    print sysconfig.get_python_lib(1,0)
+elif sys.argv[1] == "sitelib":
+    print sysconfig.get_python_lib(0,0)
+
diff --git a/config_ruby.rb b/config_ruby.rb
new file mode 100644 (file)
index 0000000..9211cdd
--- /dev/null
@@ -0,0 +1,16 @@
+require 'rbconfig'
+
+CONFIG = Config::MAKEFILE_CONFIG
+
+
+case ARGV[0]
+when "INCLUDES"
+    puts Config::expand(CONFIG["archdir"])
+when "lib"
+    puts Config::expand(CONFIG["libdir"])
+when "archsitelib"
+    puts Config::expand(CONFIG["sitearchdir"])
+when "sitelib"
+    puts Config::expand(CONFIG["sitedir"])
+end
+
diff --git a/config_tcl.tcl b/config_tcl.tcl
new file mode 100644 (file)
index 0000000..e69de29
index 9ec7c86361721b2adb5f4fcd7a6f8ddb602fd307..f4e5e5de2d381666381265b0813deda0930a12e9 100644 (file)
@@ -138,8 +138,6 @@ AC_ISC_POSIX
 AM_PROG_LEX
 AC_PROG_YACC
 AC_PROG_AWK
-# AM_PROG_LIBTOOL includes check for ranlib and supercedes AC_CHECK_RANLIB
-# AC_PROG_RANLIB
 AM_PROG_LIBTOOL
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -214,6 +212,60 @@ if test "X$no_x" = Xyes; then
 fi
 AM_CONDITIONAL(WITH_X, [test "X$no_x" != "Xyes"])
 
+dnl -----------------------------------
+dnl check for SWIG - needed for script-language bindings
+
+AC_CHECK_PROG(SWIG,swig,swig)
+AM_CONDITIONAL(WITH_SWIG, [test "x$SWIG" != "x"])
+
+dnl -----------------------------------
+dnl INCLUDES and LIBS for PERL
+
+AC_CHECK_PROG(PERL,perl,perl)
+AM_CONDITIONAL(WITH_PERL, [test "x$PERL" != "x"])
+if test "x$PERL" = "x"; then
+  HAVE_PERL=0
+else
+  HAVE_PERL=1
+  PERL_ARCHLIB=`perl -e 'use Config; print $Config{archlib};'`
+  PERL_INCLUDES=-I$PERL_ARCHLIB/CORE
+  PERL_LIBS=-L$PERL_ARCHLIB/CORE -lperl
+fi
+AC_SUBST(HAVE_PERL)
+AC_SUBST(PERL_INCLUDES)
+AC_SUBST(PERL_LIBS)
+
+dnl -----------------------------------
+dnl INCLUDES and LIBS for PYTHON
+
+AC_CHECK_PROG(PYTHON,python,python)
+AM_CONDITIONAL(WITH_PYTHON, [test "x$PYTHON" != "x"])
+if test "x$PYTHON" = "x"; then
+  HAVE_PYTHON=0
+else
+  HAVE_PYTHON=1
+  PYTHON_INCLUDES=-I/usr/include/python2.4
+  PYTHON_LIBS=-lpython2.4
+fi
+AC_SUBST(HAVE_PYTHON)
+AC_SUBST(PYTHON_INCLUDES)
+AC_SUBST(PYTHON_LIBS)
+
+dnl -----------------------------------
+dnl INCLUDES and LIBS for RUBY
+AC_CHECK_PROG(RUBY,ruby,ruby)
+AM_CONDITIONAL(WITH_RUBY, [test "x$RUBY" != "x"])
+if test "x$RUBY" = "x"; then
+  HAVE_RUBY=0
+else
+  HAVE_RUBY=1
+  RUBY_INCLUDES=-I`ruby config_ruby.rb INCLUDES`
+  RUBY_LIBS=-lruby
+fi
+AC_SUBST(HAVE_RUBY)
+AC_SUBST(RUBY_INCLUDES)
+AC_SUBST(RUBY_LIBS)
+
 dnl -----------------------------------
 dnl INCLUDES and LIBS for TCL
 
@@ -1297,6 +1349,7 @@ AC_CONFIG_FILES(Makefile
        lib/ingraphs/Makefile
        lib/gvc/Makefile
        lib/gvc/libgvc.pc
+       lib/gvapi/Makefile
        plugin/Makefile
        plugin/cairo/Makefile
        plugin/gd/Makefile
@@ -1336,24 +1389,4 @@ AC_CONFIG_FILES(Makefile
        ast_common.h
        )
 
-#      ns/Makefile
-#      dynagraph/Makefile
-#      dynagraph/common/Makefile
-#      dynagraph/dynadag/Makefile
-#      dynagraph/incrface/Makefile
-#      dynagraph/fdp/Makefile
-#      dynagraph/shortspline/Makefile
-#      dynagraph/graphsearch/Makefile
-#      dynagraph/voronoi/Makefile
-#      dag/Makefile
-#      fdp/Makefile
-#      geo/Makefile
-#      grid/Makefile
-#      incr/Makefile
-#      shape/Makefile
-#      tcldgr/Makefile
-#      tcldgr/demo/Makefile
-#      tcldgl/Makefile
-#      tcldgl/demo/Makefile
-
 AC_OUTPUT
index 430ffaccfff606fb4db83b315bcd2763b4ea30f0..f0a6380ffaf842eb0980e81f29b95b5c55f9c2bc 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
 SUBDIRS = cdt graph agraph gd pathplan agutil sfio vmalloc ast circogen \
-       dotgen fdpgen neatogen pack twopigen common gvc ingraphs expr
+       dotgen fdpgen neatogen pack twopigen common gvc ingraphs expr gvapi
 
 EXTRA_DIST = Makefile.old
index 9cda98de6d66f27a572d041079efa0325aebf339..cb123dfa74b90d9c1e6d9c1b645659c6f6848a0d 100644 (file)
@@ -803,6 +803,7 @@ fprintf(stderr,"edge_in_layer %s edge_in_pageBox %s\n",
            numc2 = (2 + numc) / 2.0;
            for (i = 0; i < offspl.size; i++) {
                bz = ED_spl(e)->list[i];
+fprintf(stderr,"bz.size %d\n",bz.size);
                tmpspl.list[i].size = offspl.list[i].size = bz.size;
                offlist = offspl.list[i].list =
                    malloc(sizeof(pointf) * bz.size);