summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in81
1 files changed, 52 insertions, 29 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 2e4902c..c09e880 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.81 2002/02/05 02:48:40 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.82 2002/02/15 14:28:50 dkf Exp $
AC_INIT(../generic/tcl.h)
@@ -65,6 +65,14 @@ fi
fi
#--------------------------------------------------------------------
+# Detect what compiler flags to set for 64-bit support.
+#--------------------------------------------------------------------
+
+SC_TCL_EARLY_FLAGS
+
+SC_TCL_64BIT_FLAGS
+
+#--------------------------------------------------------------------
# Supply substitutes for missing POSIX library procedures, or
# set flags so Tcl uses alternate procedures.
#--------------------------------------------------------------------
@@ -76,7 +84,7 @@ AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD)])
AC_REPLACE_FUNCS(opendir strstr)
-AC_REPLACE_FUNCS(strtol tmpnam waitpid)
+AC_REPLACE_FUNCS(strtol strtoll strtoull tmpnam waitpid)
AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR)])
AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD)])
AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3)])
@@ -112,16 +120,23 @@ SC_SERIAL_PORT
# special flag.
#--------------------------------------------------------------------
-AC_MSG_CHECKING([fd_set and sys/select])
-AC_TRY_COMPILE([#include <sys/types.h>],
- [fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)
-if test $tk_ok = no; then
- AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)
- if test $tk_ok = yes; then
+AC_MSG_CHECKING([for fd_set in sys/types])
+AC_CACHE_VAL(tcl_cv_type_fd_set,
+ AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;],
+ tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no))
+AC_MSG_RESULT($tcl_cv_type_fd_set)
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ AC_MSG_CHECKING([for fd_mask in sys/select])
+ AC_CACHE_VAL(tcl_cv_grep_fd_mask,
+ AC_HEADER_EGREP(fd_mask, sys/select.h,
+ tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing))
+ AC_MSG_RESULT($tcl_cv_grep_fd_mask)
+ if test $tcl_cv_grep_fd_mask = present; then
AC_DEFINE(HAVE_SYS_SELECT_H)
+ tk_ok=yes
fi
fi
-AC_MSG_RESULT($tk_ok)
if test $tk_ok = no; then
AC_DEFINE(NO_FD_SET)
fi
@@ -258,14 +273,15 @@ AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)])
#--------------------------------------------------------------------
AC_MSG_CHECKING([union wait])
-AC_TRY_LINK([#include <sys/types.h>
+AC_CACHE_VAL(tcl_cv_union_wait,
+ AC_TRY_LINK([#include <sys/types.h>
#include <sys/wait.h>], [
union wait x;
WIFEXITED(x); /* Generates compiler error if WIFEXITED
* uses an int. */
-], tcl_ok=yes, tcl_ok=no)
-AC_MSG_RESULT($tcl_ok)
-if test $tcl_ok = no; then
+ ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no))
+AC_MSG_RESULT($tcl_cv_union_wait)
+if test $tcl_cv_union_wait = no; then
AC_DEFINE(NO_UNION_WAIT)
fi
@@ -275,13 +291,14 @@ fi
#--------------------------------------------------------------------
AC_MSG_CHECKING([matherr support])
-AC_TRY_COMPILE([#include <math.h>], [
-struct exception x;
-x.type = DOMAIN;
-x.type = SING;
-], tcl_ok=yes, tcl_ok=no)
-AC_MSG_RESULT($tcl_ok)
-if test $tcl_ok = yes; then
+AC_CACHE_VAL(tcl_cv_func_matherr,
+ AC_TRY_COMPILE([#include <math.h>], [
+ struct exception x;
+ x.type = DOMAIN;
+ x.type = SING;
+ ], tcl_cv_func_matherr=yes, tcl_cv_func_matherr=no))
+AC_MSG_RESULT($tcl_cv_func_matherr)
+if test $tcl_cv_func_matherr = yes; then
AC_DEFINE(NEED_MATHERR)
fi
@@ -318,10 +335,13 @@ AC_CHECK_FUNC(BSDgettimeofday,
AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)])
])
AC_MSG_CHECKING([for gettimeofday declaration])
-AC_EGREP_HEADER(gettimeofday, sys/time.h, AC_MSG_RESULT(present), [
- AC_MSG_RESULT(missing)
+AC_CACHE_VAL(tcl_cv_grep_gettimeofday,
+ AC_EGREP_HEADER(gettimeofday, sys/time.h,
+ tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing))
+AC_MSG_RESULT($tcl_cv_grep_gettimeofday)
+if test $tcl_cv_grep_gettimeofday = missing ; then
AC_DEFINE(GETTOD_NOT_DECLARED)
-])
+fi
#--------------------------------------------------------------------
# The following code checks to see whether it is possible to get
@@ -331,12 +351,13 @@ AC_EGREP_HEADER(gettimeofday, sys/time.h, AC_MSG_RESULT(present), [
AC_C_CHAR_UNSIGNED
AC_MSG_CHECKING([signed char declarations])
-AC_TRY_COMPILE(, [
-signed char *p;
-p = 0;
-], tcl_ok=yes, tcl_ok=no)
-AC_MSG_RESULT($tcl_ok)
-if test $tcl_ok = yes; then
+AC_CACHE_VAL(tcl_cv_char_signed,
+ AC_TRY_COMPILE(, [
+ signed char *p;
+ p = 0;
+ ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no))
+AC_MSG_RESULT($tcl_cv_char_signed)
+if test $tcl_cv_char_signed = yes; then
AC_DEFINE(HAVE_SIGNED_CHAR)
fi
@@ -552,6 +573,8 @@ AC_SUBST(TCL_SHARED_LIB_SUFFIX)
AC_SUBST(TCL_SHLIB_CFLAGS)
AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
+AC_SUBST(TCL_HAS_LONGLONG)
+
AC_SUBST(MAKE_LIB)
AC_SUBST(MAKE_STUB_LIB)
AC_SUBST(BUILD_DLTEST)