Revert addition of "o" to tar options. This was intended to fix bug #4883,
[PostgreSQL.git] / config / tcl.m4
blob7160c36207d0dc6c3a6a8d312c9ced7b78cc28e1
1 # $PostgreSQL$
3 # Autoconf macros to check for Tcl related things
6 AC_DEFUN([PGAC_PATH_TCLSH],
7 [AC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83])
8 if test x"$TCLSH" = x""; then
9   AC_MSG_ERROR([Tcl shell not found])
14 # PGAC_PATH_TCLCONFIGSH([SEARCH-PATH])
15 # ------------------------------------
16 AC_DEFUN([PGAC_PATH_TCLCONFIGSH],
17 [AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
18 AC_BEFORE([$0], [PGAC_PATH_TKCONFIGSH])[]dnl
19 AC_MSG_CHECKING([for tclConfig.sh])
20 # Let user override test
21 if test -z "$TCL_CONFIG_SH"; then
22     pgac_test_dirs="$1"
24     set X $pgac_test_dirs; shift
25     if test $[#] -eq 0; then
26         test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tclConfig.sh because no Tcl shell was found])
27         set X `echo 'puts $auto_path' | $TCLSH`; shift
28     fi
30     for pgac_dir do
31         if test -r "$pgac_dir/tclConfig.sh"; then
32             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
33             break
34         fi
35     done
38 if test -z "$TCL_CONFIG_SH"; then
39     AC_MSG_RESULT(no)
40     AC_MSG_ERROR([file 'tclConfig.sh' is required for Tcl])
41 else
42     AC_MSG_RESULT([$TCL_CONFIG_SH])
45 AC_SUBST([TCL_CONFIG_SH])
46 ])# PGAC_PATH_TCLCONFIGSH
49 # PGAC_PATH_TKCONFIGSH([SEARCH-PATH])
50 # ------------------------------------
51 AC_DEFUN([PGAC_PATH_TKCONFIGSH],
52 [AC_REQUIRE([PGAC_PATH_TCLSH])[]dnl
53 AC_MSG_CHECKING([for tkConfig.sh])
54 # Let user override test
55 if test -z "$TK_CONFIG_SH"; then
56     pgac_test_dirs="$1"
58     set X $pgac_test_dirs; shift
59     if test $[#] -eq 0; then
60         test -z "$TCLSH" && AC_MSG_ERROR([unable to locate tkConfig.sh because no Tcl shell was found])
61         set X `echo 'puts $auto_path' | $TCLSH`; shift
62     fi
64     for pgac_dir do
65         if test -r "$pgac_dir/tkConfig.sh"; then
66             TK_CONFIG_SH=$pgac_dir/tkConfig.sh
67             break
68         fi
69     done
72 if test -z "$TK_CONFIG_SH"; then
73     AC_MSG_RESULT(no)
74     AC_MSG_ERROR([file 'tkConfig.sh' is required for Tk])
75 else
76     AC_MSG_RESULT([$TK_CONFIG_SH])
79 AC_SUBST([TK_CONFIG_SH])
80 ])# PGAC_PATH_TKCONFIGSH
83 # PGAC_EVAL_TCLCONFIGSH(FILE, WANTED-VARS)
84 # ----------------------------------------
85 # Assigns variables listed in WANTED-VARS by reading FILE and
86 # evaluating it according to the quoting scheme of tclConfig.sh and
87 # tkConfig.sh.  Calls AC_SUBST for each variable.
89 AC_DEFUN([PGAC_EVAL_TCLCONFIGSH],
90 [. "$1"
91 m4_foreach([pgac_item], [$2],
92 [eval pgac_item=\"[$]pgac_item\"
93 AC_SUBST(pgac_item)])])