summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-01-12 11:13:54 (GMT)
committerhobbs <hobbs>2000-01-12 11:13:54 (GMT)
commitada01064f7bee2a0d9103cbf33a62d95fc4f5ea0 (patch)
tree330a348f974e0dfe1c201adc2b1fe77058474ebc /unix/tcl.m4
parentf0c936b8a5365ec18f126e2c15715509d64bb440 (diff)
downloadtcl-ada01064f7bee2a0d9103cbf33a62d95fc4f5ea0.zip
tcl-ada01064f7bee2a0d9103cbf33a62d95fc4f5ea0.tar.gz
tcl-ada01064f7bee2a0d9103cbf33a62d95fc4f5ea0.tar.bz2
* tests/unixFCmd.test:
* unix/tclUnixFCmd.c: added support for symbolic permissions setting in SetPermissionsAttribute (file attr $file -perm ...) [Bug: 3970] * tests/expr.test: * unix/Makefile.in: * unix/configure.in: * unix/tcl.m4: strtod bug on Tru64 [Bug: 3378] and added tests to prevent unnecessary chmod +x in sources while installing, as well as more intelligent setsockopt/gethostbyname checks [Bug: 3366, 3389] * unix/tclUnixThrd.c: added compile time support (through use of the TCL_THREAD_STACK_MIN define) for increasing the default stack size for a thread. [Bug: 3797, 1966]
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m444
1 files changed, 33 insertions, 11 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 4c59293..91d2141 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -584,7 +584,9 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AIX-4.[[2-9]])
if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then
# AIX requires the _r compiler when gcc isn't being used
- CC=${CC}_r
+ if test "${CC}" != "cc_r" ; then
+ CC=${CC}_r
+ fi
AC_MSG_RESULT(Using $CC for compiling with threads)
fi
SHLIB_CFLAGS=""
@@ -601,7 +603,9 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AIX-*)
if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then
# AIX requires the _r compiler when gcc isn't being used
- CC=${CC}_r
+ if test "${CC}" != "cc_r" ; then
+ CC=${CC}_r
+ fi
AC_MSG_RESULT(Using $CC for compiling with threads)
fi
SHLIB_CFLAGS=""
@@ -853,6 +857,15 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
DL_LIBS=""
LDFLAGS=""
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ if test "$using_gcc" = "no" ; then
+ EXTRA_CFLAGS="-std1 -pthread"
+ LDFLAGS="-pthread"
+ else
+ THREADS_LIBS=" -lpthread -lmach -lexc -lc"
+ fi
+ fi
;;
RISCos-*)
SHLIB_CFLAGS="-G 0"
@@ -1544,6 +1557,8 @@ AC_DEFUN(SC_TIME_HANDLER, [
# terminating character under some conditions. Check for this
# and if the problem exists use a substitute procedure
# "fixstrtod" (provided by Tcl) that corrects the error.
+# Also, on Compaq's Tru64 Unix 5.0,
+# strtod(" ") returns 0.0 instead of a failure to convert.
#
# Arguments:
# none
@@ -1556,25 +1571,31 @@ AC_DEFUN(SC_TIME_HANDLER, [
#--------------------------------------------------------------------
AC_DEFUN(SC_BUGGY_STRTOD, [
- AC_CHECK_FUNC(strtod, tk_strtod=1, tk_strtod=0)
- if test "$tk_strtod" = 1; then
- AC_MSG_CHECKING([for Solaris 2.4 strtod bug])
+ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
+ if test "$tcl_strtod" = 1; then
+ AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
AC_TRY_RUN([
extern double strtod();
int main()
{
- char *string = "NaN";
+ char *string = "NaN", *spaceString = " ";
char *term;
- strtod(string, &term);
+ double value;
+ value = strtod(string, &term);
if ((term != string) && (term[-1] == 0)) {
exit(1);
}
+ value = strtod(string, &term);
+ if (term == (string+1)) {
+ exit(1);
+ }
exit(0);
- }], tk_ok=1, tk_ok=0, tk_ok=0)
- if test "$tk_ok" = 1; then
+ }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
+ if test "$tcl_ok" = 1; then
AC_MSG_RESULT(ok)
else
AC_MSG_RESULT(buggy)
+ LIBOBJS="$LIBOBJS fixstrtod.o"
AC_DEFINE(strtod, fixstrtod)
fi
fi
@@ -1664,14 +1685,15 @@ AC_DEFUN(SC_TCL_LINK_LIBS, [
tcl_checkBoth=0
AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
if test "$tcl_checkSocket" = 1; then
- AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", tcl_checkBoth=1)
+ AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
+ LIBS="$LIBS -lsocket", tcl_checkBoth=1))
fi
if test "$tcl_checkBoth" = 1; then
tk_oldLibs=$LIBS
LIBS="$LIBS -lsocket -lnsl"
AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
fi
- AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main,
+ AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
[LIBS="$LIBS -lnsl"]))
# Don't perform the eval of the libraries here because DL_LIBS