summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
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/configure.in
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/configure.in')
-rw-r--r--unix/configure.in71
1 files changed, 15 insertions, 56 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 66340d8..9ca3315 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.122 2004/11/19 14:48:33 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.123 2004/11/26 11:18:01 dkf Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.57)
@@ -135,9 +135,7 @@ AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD, 1, [Is getcwd Posix-compliant?])])
# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
# define USEGETWD even if the posix getcwd exists. Add a test ?
-AC_REPLACE_FUNCS(opendir strstr)
-
-AC_REPLACE_FUNCS(strtol strtoll strtoull tmpnam waitpid)
+AC_REPLACE_FUNCS(opendir strtol strtoll strtoull tmpnam waitpid)
AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])])
AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])])
AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])])
@@ -216,21 +214,10 @@ AC_CHECK_FUNC(memmove, , [
# even if the original string is empty.
#--------------------------------------------------------------------
-AC_MSG_CHECKING([proper strstr implementation])
-AC_TRY_RUN([
-extern int strstr();
-int main()
-{
+SC_TCL_CHECK_BROKEN_FUNC(strstr, [
+ extern int strstr();
exit(strstr("\0test", "test") ? 1 : 0);
-}
-], tcl_ok=yes, tcl_ok=no, tcl_ok=no)
-if test $tcl_ok = yes; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT([broken, using substitute])
- AC_LIBOBJ([strstr])
- USE_COMPAT=1
-fi
+])
#--------------------------------------------------------------------
# Check for strtoul function. This is tricky because under some
@@ -238,50 +225,22 @@ fi
# pointer for the string "0".
#--------------------------------------------------------------------
-AC_CHECK_FUNC(strtoul, tcl_ok=1, tcl_ok=0)
-AC_TRY_RUN([
-extern int strtoul();
-int main()
-{
- char *string = "0";
- char *term;
- int value;
- value = strtoul(string, &term, 0);
- if ((value != 0) || (term != (string+1))) {
- exit(1);
- }
- exit(0);
-}], , tcl_ok=0, tcl_ok=0)
-if test "$tcl_ok" = 0; then
- test -n "$verbose" && echo " Adding strtoul.o."
- AC_LIBOBJ([strtoul])
- USE_COMPAT=1
-fi
+SC_TCL_CHECK_BROKEN_FUNC(strtoul, [
+ extern int strtoul();
+ char *term, *string = "0";
+ exit(strtoul(string,&term,0) != 0 || term != string+1);
+])
#--------------------------------------------------------------------
# Check for the strtod function. This is tricky because in some
# versions of Linux strtod mis-parses strings starting with "+".
#--------------------------------------------------------------------
-AC_CHECK_FUNC(strtod, tcl_ok=1, tcl_ok=0)
-AC_TRY_RUN([
-extern double strtod();
-int main()
-{
- char *string = " +69";
- char *term;
- double value;
- value = strtod(string, &term);
- if ((value != 69) || (term != (string+4))) {
- exit(1);
- }
- exit(0);
-}], , tcl_ok=0, tcl_ok=0)
-if test "$tcl_ok" = 0; then
- test -n "$verbose" && echo " Adding strtod.o."
- AC_LIBOBJ([strtod])
- USE_COMPAT=1
-fi
+SC_TCL_CHECK_BROKEN_FUNC(strtod, [
+ extern double strtod();
+ char *term, *string = " +69";
+ exit(strtod(string,&term) != 69 || term != string+4);
+])
#--------------------------------------------------------------------
# Under Solaris 2.4, strtod returns the wrong value for the