summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authormdejong <mdejong>2001-04-25 22:10:58 (GMT)
committermdejong <mdejong>2001-04-25 22:10:58 (GMT)
commit53026cad23ffc8d2f583211879bec4ec4de9b7b1 (patch)
tree81b324d139345e3179e32231927494c4b70e9bc3 /unix/tcl.m4
parent5ba5d121498334fb1b09f603ada829b1b5b0a7f4 (diff)
downloadtk-53026cad23ffc8d2f583211879bec4ec4de9b7b1.zip
tk-53026cad23ffc8d2f583211879bec4ec4de9b7b1.tar.gz
tk-53026cad23ffc8d2f583211879bec4ec4de9b7b1.tar.bz2
* unix/configure: Regen.
* unix/tcl.m4: Update from Tcl. * win/configure: Regen. * win/tcl.m4: Update from Tcl.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m480
1 files changed, 78 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 172652f..5925196 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -369,6 +369,7 @@ AC_DEFUN(SC_ENABLE_THREADS, [
TCL_THREADS=0
AC_MSG_RESULT([no (default)])
fi
+ AC_SUBST(TCL_THREADS)
])
#------------------------------------------------------------------------
@@ -586,7 +587,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
TCL_EXP_FILE=""
STLIB_LD="ar cr"
case $system in
- AIX-5*)
+ AIX-5.*)
if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then
# AIX requires the _r compiler when gcc isn't being used
if test "${CC}" != "cc_r" ; then
@@ -986,6 +987,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
TCL_LIB_VERSIONS_OK=nodots
;;
SunOS-5.[[0-6]]*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+
SHLIB_CFLAGS="-KPIC"
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
@@ -1000,6 +1007,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
;;
SunOS-5*)
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT)
+
SHLIB_CFLAGS="-KPIC"
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
LDFLAGS=""
@@ -1185,7 +1198,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
if test "$DL_OBJS" != "tclLoadNone.o" ; then
if test "$using_gcc" = "yes" ; then
case $system in
- AIX-[[1-4]]*)
+ AIX-*)
;;
BSD/OS*)
;;
@@ -1287,8 +1300,68 @@ main()
}
return 1;
}], tk_ok=sgtty, tk_ok=none, tk_ok=none)
+
if test $tk_ok = sgtty; then
AC_DEFINE(USE_SGTTY)
+ else
+ AC_TRY_RUN([
+#include <termios.h>
+#include <errno.h>
+
+main()
+{
+ struct termios t;
+ if (tcgetattr(0, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tk_ok=termios, tk_ok=no, tk_ok=no)
+
+ if test $tk_ok = termios; then
+ AC_DEFINE(USE_TERMIOS)
+ else
+ AC_TRY_RUN([
+#include <termio.h>
+#include <errno.h>
+
+main()
+{
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+ }], tk_ok=termio, tk_ok=no, tk_ok=no)
+
+ if test $tk_ok = termio; then
+ AC_DEFINE(USE_TERMIO)
+ else
+ AC_TRY_RUN([
+#include <sgtty.h>
+#include <errno.h>
+
+main()
+{
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tk_ok=sgtty, tk_ok=none, tk_ok=none)
+
+ if test $tk_ok = sgtty; then
+ AC_DEFINE(USE_SGTTY)
+ fi
+ fi
+ fi
fi
fi
fi
@@ -1563,6 +1636,8 @@ AC_DEFUN(SC_TIME_HANDLER, [
AC_HEADER_TIME
AC_STRUCT_TIMEZONE
+ AC_CHECK_FUNCS(gmtime_r localtime_r)
+
AC_MSG_CHECKING([tm_tzadj in struct tm])
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
[AC_DEFINE(HAVE_TM_TZADJ)
@@ -1603,6 +1678,7 @@ AC_DEFUN(SC_TIME_HANDLER, [
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
fi
+
])
#--------------------------------------------------------------------