summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-16 01:51:06 (GMT)
committerstanton <stanton>1999-04-16 01:51:06 (GMT)
commit03656f44f81469f459031fa3a4a7b09c8bc77712 (patch)
tree31378e81bd58f8c726fc552d6b30cbf3ca07497b /unix/configure.in
parent404fc236f34304df53b7e44bc7971d786b87d453 (diff)
downloadtk-03656f44f81469f459031fa3a4a7b09c8bc77712.zip
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.gz
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.bz2
* Merged 8.1 branch into the main trunk
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in103
1 files changed, 68 insertions, 35 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 99b37c1..4e3f667 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,12 +3,12 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tk.h)
-# RCS: @(#) $Id: configure.in,v 1.29 1999/03/22 21:32:16 redman Exp $
+# RCS: @(#) $Id: configure.in,v 1.30 1999/04/16 01:51:45 stanton Exp $
-TK_VERSION=8.0
+TK_VERSION=8.1
TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=0
-TK_PATCH_LEVEL=".5"
+TK_MINOR_VERSION=1
+TK_PATCH_LEVEL=b3
VERSION=${TK_VERSION}
if test "${prefix}" = "NONE"; then
@@ -19,6 +19,10 @@ if test "${exec_prefix}" = "NONE"; then
fi
TK_SRC_DIR=`cd $srcdir/..; pwd`
+# Most of the checks here are duplicated from Tcl's configure.in
+# and should not be redone but rather simply used from the definitions
+# found in tclConfig.sh
+
AC_PROG_RANLIB
AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available],
[tk_ok=$enableval], [tk_ok=no])
@@ -31,6 +35,25 @@ fi
AC_C_CROSS
AC_HAVE_HEADERS(unistd.h limits.h)
+# 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_DEFINE(_REENTRANT)
+
+ 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
+
# set the warning flags depending on whether or not we are using gcc
if test "${GCC}" = "yes" ; then
# leave -Wimplicit-int out, the X libs generate so many of these warnings
@@ -61,10 +84,18 @@ fi
#--------------------------------------------------------------------
# See if there was a command-line option for where Tcl is; if
# not, assume that its top-level directory is a sibling of ours.
+# Try the patch-level-specific directory first, then the general one.
#--------------------------------------------------------------------
-AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.0 binaries from DIR],
- TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../tcl8.0$TK_PATCH_LEVEL/unix; pwd`)
+
+if test -d ../../tcl8.1$TK_PATCH_LEVEL/unix; then
+ TCL_BIN_DEFAULT=../../tcl8.1$TK_PATCH_LEVEL/unix
+else
+ TCL_BIN_DEFAULT=../../tcl8.1/unix
+fi
+
+AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR],
+ TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
if test ! -d $TCL_BIN_DIR; then
AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR doesn't exist)
fi
@@ -168,6 +199,18 @@ AC_UID_T
AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME
+#-------------------------------------------
+# In OS/390 struct pwd has no pw_gecos field
+#-------------------------------------------
+
+AC_MSG_CHECKING([pw_gecos in struct pwd])
+AC_TRY_COMPILE([#include <pwd.h>],
+ [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
+AC_MSG_RESULT($tk_ok)
+if test $tk_ok = yes; then
+ AC_DEFINE(HAVE_PW_GECOS)
+fi
+
#--------------------------------------------------------------------
# Locate the X11 header files and the X11 library archive. Try
# the ac_path_x macro first, but if it doesn't find the X stuff
@@ -312,6 +355,10 @@ if test "$tk_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"
+
#--------------------------------------------------------------------
# One more check related to the X libraries. The standard releases
# of Ultrix don't support the "xauth" mechanism, so send won't work
@@ -354,13 +401,6 @@ AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
#--------------------------------------------------------------------
-# If this system doesn't have a memmove procedure, use memcpy
-# instead.
-#--------------------------------------------------------------------
-
-AC_CHECK_FUNC(memmove, , [AC_DEFINE(memmove, memcpy)])
-
-#--------------------------------------------------------------------
# Figure out whether "char" is unsigned. If so, set a
# #define for __CHAR_UNSIGNED__.
#--------------------------------------------------------------------
@@ -403,19 +443,23 @@ fi
#--------------------------------------------------------------------
AC_ARG_ENABLE(shared,
- [ --enable-shared build libtk as a shared library],
- [ok=$enableval], [ok=no])
+ [ --enable-shared build libtk as a shared library (on by default)],
+ [ok=$enableval], [ok=yes])
if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
TK_SHARED_BUILD=1
TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX}
- MAKE_LIB='\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}'
+ MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${TCL_BUILD_STUB_LIB_SPEC} \${LIBS}"
RANLIB=":"
+
+ TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
else
TK_SHARED_BUILD=0
TK_SHLIB_CFLAGS=""
TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX}
- MAKE_LIB='ar cr \${TK_LIB_FILE} \${OBJS}'
+ MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}"
+
+ TCL_STUB_FLAGS=""
fi
DBGX='${TK_DBGX}'
@@ -449,35 +493,26 @@ fi
# using tcl stub support.
#--------------------------------------------------------------------
-# Linking to the Tcl stub library is not supported until Tk is a fully
-# loadable extension.
+# For now, linking to Tcl stubs is not supported with Tk. It causes
+# too many problems with linking. When Tk is a fully loadable
+# extension, linking the the Tcl stubs will be supported.
-AC_MSG_RESULT(dynamic linking)
-TCL_BUILD_STUB_LIB_SPEC=""
-TCL_STUB_FLAGS=""
-#--------------------------------------------------------------------
-# The statements below define various symbols relating to Tcl
-# stub support.
-#--------------------------------------------------------------------
# Replace ${VERSION} with contents of ${TK_VERSION}
eval "STUB_LIB_FILE=libtkstub${TCL_UNSHARED_LIB_SUFFIX}"
-# Replace DBGX with TCL_DBGX
-eval "STUB_LIB_FILE=\"${STUB_LIB_FILE}\""
-
MAKE_STUB_LIB="ar cr \${STUB_LIB_FILE} \${STUB_LIB_OBJS}"
TK_STUB_LIB_FILE=${STUB_LIB_FILE}
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TCL_DBGX}"
+ TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TK_DBGX}"
else
- TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TCL_DBGX}"
+ TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TK_DBGX}"
fi
TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
-TL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}"
+TK_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}"
TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
TK_STUB_LIB_PATH="${exec_prefix}/lib/${TK_STUB_LIB_FILE}"
@@ -510,8 +545,8 @@ AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(SHLIB_VERSION)
AC_SUBST(TCL_BIN_DIR)
-AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
+AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_DBGX)
AC_SUBST(TCL_LIB_FLAG)
AC_SUBST(TCL_SRC_DIR)
@@ -521,8 +556,6 @@ AC_SUBST(TK_CC_SEARCH_FLAGS)
AC_SUBST(TK_LD_SEARCH_FLAGS)
AC_SUBST(TK_LIB_FILE)
AC_SUBST(TK_LIB_FLAG)
-AC_SUBST(TK_BUILD_EXP_FILE)
-AC_SUBST(TK_EXP_FILE)
AC_SUBST(TK_LIB_SPEC)
AC_SUBST(TK_MAJOR_VERSION)
AC_SUBST(TK_MINOR_VERSION)