summaryrefslogtreecommitdiff
path: root/config/tcl.m4
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-09-25 22:23:01 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-09-25 22:23:01 +0000
commitf428d053ce075bafe1785d0ba7792f4eb92d93d5 (patch)
tree5a7e6981c0929343338ca0fa3de0f4e3e4702af1 /config/tcl.m4
parente353e73768e54c7e5cfd5a1d6e97e1f6315207bb (diff)
downloadpostgresql-f428d053ce075bafe1785d0ba7792f4eb92d93d5.tar.gz
Revise Tcl/Tk configuration. Make missing Tcl after --with-tcl an error,
add --without-tk option to disable Tk. We don't need the AC_PATH_XTRA test because tkConfig.sh already contains all the information about how to compile and link with X. Also make sure that libpq is up to date for libpgtcl. Remove executable bits from pgaccess.sh, but add it to pgaccess.
Diffstat (limited to 'config/tcl.m4')
-rw-r--r--config/tcl.m476
1 files changed, 76 insertions, 0 deletions
diff --git a/config/tcl.m4 b/config/tcl.m4
new file mode 100644
index 0000000000..6916fe998b
--- /dev/null
+++ b/config/tcl.m4
@@ -0,0 +1,76 @@
+# $Header: /cvsroot/pgsql/config/tcl.m4,v 1.1 2000/09/25 22:22:53 petere Exp $
+
+# Autoconf macros to check for Tcl related things
+
+
+AC_DEFUN([PGAC_PATH_TCLSH],
+ [AC_PATH_PROGS(TCLSH, [tclsh tcl])])
+
+
+# PGAC_PATH_TCLCONFIGSH([SEARCH-PATH])
+# ------------------------------------
+AC_DEFUN([PGAC_PATH_TCLCONFIGSH],
+[AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
+AC_BEFORE([$0], [PGAC_PATH_TKCONFIGSH])[]dnl
+AC_MSG_CHECKING([for tclConfig.sh])
+# Let user override test
+if test -z "$TCL_CONFIG_SH"; then
+ pgac_test_dirs="$1"
+
+ set X $pgac_test_dirs; shift
+ if test $[#] -eq 0; then
+ test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tclConfig.sh because no Tcl shell was found])
+ set X `echo 'puts $auto_path' | $TCLSH`; shift
+ fi
+
+ for pgac_dir; do
+ if test -r "$pgac_dir/tclConfig.sh"; then
+ TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
+ break
+ fi
+ done
+fi
+
+if test -z "$TCL_CONFIG_SH"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([file \`tclConfig.sh' is required for Tcl])
+else
+ AC_MSG_RESULT([$TCL_CONFIG_SH])
+fi
+
+AC_SUBST([TCL_CONFIG_SH])
+])# PGAC_PATH_TCLCONFIGSH
+
+
+# PGAC_PATH_TKCONFIGSH([SEARCH-PATH])
+# ------------------------------------
+AC_DEFUN([PGAC_PATH_TKCONFIGSH],
+[AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
+AC_MSG_CHECKING([for tkConfig.sh])
+# Let user override test
+if test -z "$TK_CONFIG_SH"; then
+ pgac_test_dirs="$1"
+
+ set X $pgac_test_dirs; shift
+ if test $[#] -eq 0; then
+ test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tkConfig.sh because no Tcl shell was found])
+ set X `echo 'puts $auto_path' | $TCLSH`; shift
+ fi
+
+ for pgac_dir; do
+ if test -r "$pgac_dir/tkConfig.sh"; then
+ TK_CONFIG_SH=$pgac_dir/tkConfig.sh
+ break
+ fi
+ done
+fi
+
+if test -z "$TK_CONFIG_SH"; then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([file \`tkConfig.sh' is required for Tk])
+else
+ AC_MSG_RESULT([$TK_CONFIG_SH])
+fi
+
+AC_SUBST([TK_CONFIG_SH])
+])# PGAC_PATH_TKCONFIGSH