~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-security

« back to all changes in this revision

Viewing changes to config/tcl.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $PostgreSQL$
 
2
 
 
3
# Autoconf macros to check for Tcl related things
 
4
 
 
5
 
 
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])
 
10
fi
 
11
])
 
12
 
 
13
 
 
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"
 
23
 
 
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
 
29
 
 
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
 
36
fi
 
37
 
 
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])
 
43
fi
 
44
 
 
45
AC_SUBST([TCL_CONFIG_SH])
 
46
])# PGAC_PATH_TCLCONFIGSH
 
47
 
 
48
 
 
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"
 
57
 
 
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
 
63
 
 
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
 
70
fi
 
71
 
 
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])
 
77
fi
 
78
 
 
79
AC_SUBST([TK_CONFIG_SH])
 
80
])# PGAC_PATH_TKCONFIGSH
 
81
 
 
82
 
 
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.
 
88
 
 
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)])])