summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-11-26 11:17:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-11-26 11:17:49 (GMT)
commite068f06110b9f53cbf7b2f4b2583185e64a836d0 (patch)
tree84aae2f6292287aec438b9be4c186edfc43963ce /unix/tcl.m4
parent53dbd43f21b5baf917383c6373da80babbbdc0f8 (diff)
downloadtcl-e068f06110b9f53cbf7b2f4b2583185e64a836d0.zip
tcl-e068f06110b9f53cbf7b2f4b2583185e64a836d0.tar.gz
tcl-e068f06110b9f53cbf7b2f4b2583185e64a836d0.tar.bz2
Spread the goodness of AC_CACHE_VAL a bit further. [Patch 1073524]
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m436
1 files changed, 36 insertions, 0 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 707ed63..7eadca3 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2642,6 +2642,42 @@ AC_DEFUN(SC_TCL_CFG_ENCODING, [
[What encoding should be used for embedded configuration info?])
fi])
+#--------------------------------------------------------------------
+# SC_TCL_CHECK_BROKEN_FUNC
+#
+# Declare the encoding to use for embedded configuration information.
+#
+# Arguments:
+# funcName - function to test for
+# advancedTest - the advanced test to run if the function is present
+#
+# Results:
+# Might cause compatability versions of the function to be used.
+# Might affect the following vars:
+# USE_COMPAT (implicit)
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN(SC_TCL_CHECK_BROKEN_FUNC,[
+ AC_CHECK_FUNC($1, tcl_ok=1, tcl_ok=0)
+ if test ["$tcl_ok"] = 1; then
+ AC_MSG_CHECKING([proper ]$1[ implementation])
+ AC_CACHE_VAL([tcl_cv_]$1[_unbroken],
+ AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok,
+ [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown))
+ AC_MSG_RESULT([$tcl_cv_]$1[_unbroken])
+ if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then
+ tcl_ok=1
+ else
+ tcl_ok=0
+ fi
+ fi
+ if test ["$tcl_ok"] = 1; then
+ AC_LIBOBJ($1)
+ USE_COMPAT=1
+ fi])
+
+
# Local Variables:
# mode: autoconf
# End: