diff options
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/unix/configure.in b/unix/configure.in index ee36dc4..e1bf054 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -2,12 +2,12 @@ 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. AC_INIT(../generic/tcl.h) -# SCCS: @(#) configure.in 1.144 97/11/20 12:39:44 +# SCCS: @(#) configure.in 1.156 98/02/23 17:51:51 -TCL_VERSION=8.0 +TCL_VERSION=8.1 TCL_MAJOR_VERSION=8 -TCL_MINOR_VERSION=0 -TCL_PATCH_LEVEL="p2" +TCL_MINOR_VERSION=1 +TCL_PATCH_LEVEL=a2 VERSION=${TCL_VERSION} if test "${prefix}" = "NONE"; then @@ -29,6 +29,24 @@ AC_SUBST(CC) fi AC_C_CROSS +# Threads support +AC_ARG_ENABLE(threads,[ --enable-threads enable Threads support],,enableval="no") + +if test "$enableval" = "yes"; then + AC_MSG_RESULT(Will compile with Threads support) + AC_DEFINE(TCL_THREADS) + + AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthread" + else + AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...") + fi +else + AC_MSG_RESULT(Will compile without Threads support (normal)) +fi + #-------------------------------------------------------------------- # Supply substitutes for missing POSIX library procedures, or # set flags so Tcl uses alternate procedures. @@ -46,6 +64,7 @@ AC_CHECK_FUNC(strerror, , AC_DEFINE(NO_STRERROR)) AC_CHECK_FUNC(getwd, , AC_DEFINE(NO_GETWD)) AC_CHECK_FUNC(wait3, , AC_DEFINE(NO_WAIT3)) AC_CHECK_FUNC(uname, , AC_DEFINE(NO_UNAME)) +AC_CHECK_FUNC(realpath, , AC_DEFINE(NO_REALPATH)) #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is @@ -120,6 +139,8 @@ fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) +# See also memmove check below for a place where NO_STRING_H can be +# set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H) fi @@ -270,9 +291,23 @@ fi #-------------------------------------------------------------------- # Some systems (e.g., IRIX 4.0.5) lack the st_blksize field -# in struct stat. +# in struct stat. But we might be able to use fstatfs instead. #-------------------------------------------------------------------- AC_STRUCT_ST_BLKSIZE +AC_CHECK_FUNC(fstatfs, , AC_DEFINE(NO_FSTATFS)) + +#-------------------------------------------------------------------- +# Some system have no memcmp or it does not work with 8 bit +# data, this checks it and add memcmp.o to LIBOBJS if needed +#-------------------------------------------------------------------- +AC_FUNC_MEMCMP + +#-------------------------------------------------------------------- +# Some system like SunOS 4 and other BSD like systems +# have no memmove (we assume they have bcopy instead). +# {The replacement define is in compat/string.h} +#-------------------------------------------------------------------- +AC_CHECK_FUNC(memmove, , AC_DEFINE(NO_MEMMOVE) AC_DEFINE(NO_STRING_H)) #-------------------------------------------------------------------- # On some systems strstr is broken: it returns a pointer even @@ -567,6 +602,10 @@ if test "$tcl_checkBoth" = 1; then fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) +# Add the threads support libraries + +LIBS="$LIBS$THREADS_LIBS" + #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # dynamic loading and shared libraries: @@ -670,7 +709,7 @@ case $system in ;; AIX-*) SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" + SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o tclLoadAix.o" |