summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in127
1 files changed, 85 insertions, 42 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 87731a1..34908a7 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.
-AC_INIT([tcl],[8.5])
+AC_INIT([tcl],[8.6])
AC_PREREQ(2.59)
dnl This is only used when included from macosx/configure.ac
@@ -22,13 +22,27 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
#endif /* _TCLCONFIG */])
])
-TCL_VERSION=8.5
+TCL_VERSION=8.6
TCL_MAJOR_VERSION=8
-TCL_MINOR_VERSION=5
-TCL_PATCH_LEVEL=".9"
+TCL_MINOR_VERSION=6
+TCL_PATCH_LEVEL="b1.2"
VERSION=${TCL_VERSION}
#------------------------------------------------------------------------
+# Setup configure arguments for bundled packages
+#------------------------------------------------------------------------
+
+PKG_CFG_ARGS="$ac_configure_args ${PKG_CFG_ARGS}"
+
+if test -r "$cache_file" -a -f "$cache_file"; then
+ case $cache_file in
+ [[\\/]]* | ?:[[\\/]]* ) pkg_cache_file=$cache_file ;;
+ *) pkg_cache_file=../../$cache_file ;;
+ esac
+ PKG_CFG_ARGS="${PKG_CFG_ARGS} --cache-file=$pkg_cache_file"
+fi
+
+#------------------------------------------------------------------------
# Handle the --prefix=... option
#------------------------------------------------------------------------
@@ -72,6 +86,12 @@ AC_C_INLINE
SC_MISSING_POSIX_HEADERS
+#--------------------------------------------------------------------
+# Determines the correct executable file extension (.exe)
+#--------------------------------------------------------------------
+
+AC_EXEEXT
+
#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
@@ -112,6 +132,37 @@ LIBS="$LIBS$THREADS_LIBS"
SC_ENABLE_SHARED
#--------------------------------------------------------------------
+# Look for a native installed tclsh binary (if available)
+# If one cannot be found then use the binary we build (fails for
+# cross compiling). This is used for NATIVE_TCLSH in Makefile.
+#--------------------------------------------------------------------
+
+SC_PROG_TCLSH
+if test "$TCLSH_PROG" = ""; then
+ TCLSH_PROG='./${TCL_EXE}'
+fi
+
+#------------------------------------------------------------------------
+# Add stuff for zlib
+#------------------------------------------------------------------------
+
+zlib_ok=yes
+AC_CHECK_HEADER([zlib.h],[
+ AC_CHECK_TYPE([gz_header],[],[zlib_ok=no],[#include <zlib.h>])],[
+ zlib_ok=no])
+AS_IF([test $zlib_ok = yes], [
+ AC_SEARCH_LIBS([deflateSetHeader],[z],[],[
+ zlib_ok=no
+ ])])
+AS_IF([test $zlib_ok = no], [
+ AC_SUBST(ZLIB_DIR,[\${COMPAT_DIR}/zlib])
+ AC_SUBST(ZLIB_OBJS,[\${ZLIB_OBJS}])
+ AC_SUBST(ZLIB_SRCS,[\${ZLIB_SRCS}])
+ AC_SUBST(ZLIB_INCLUDE,[-I\${ZLIB_DIR}])
+])
+AC_DEFINE(HAVE_ZLIB, 1, [Is there an installed zlib?])
+
+#--------------------------------------------------------------------
# The statements below define a collection of compile flags. This
# macro depends on the value of SHARED_BUILD, and should be called
# after SC_ENABLE_SHARED checks the configure switches.
@@ -149,7 +200,7 @@ AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD, 1, [Is getcwd Posix-compliant?])])
# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
# define USEGETWD even if the posix getcwd exists. Add a test ?
-AC_REPLACE_FUNCS(opendir strtol waitpid)
+AC_REPLACE_FUNCS(mkstemp opendir strtol waitpid)
AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])])
AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])])
AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])])
@@ -163,7 +214,7 @@ if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
fi
AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH, 1, [Do we have realpath()])])
-SC_TCL_GETADDRINFO
+SC_TCL_IPV6
#--------------------------------------------------------------------
# Look for thread-safe variants of some library functions.
@@ -252,16 +303,16 @@ AC_CHECK_TYPES([blkcnt_t])
AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have 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
+# 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}
+# 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, , [
@@ -269,8 +320,8 @@ AC_CHECK_FUNC(memmove, , [
AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?]) ])
#--------------------------------------------------------------------
-# On some systems strstr is broken: it returns a pointer even
-# even if the original string is empty.
+# On some systems strstr is broken: it returns a pointer even even if
+# the original string is empty.
#--------------------------------------------------------------------
SC_TCL_CHECK_BROKEN_FUNC(strstr, [
@@ -486,10 +537,10 @@ fi
SC_ENABLE_LANGINFO
#--------------------------------------------------------------------
-# Check for support of chflags function
+# Check for support of chflags and mkstemps functions
#--------------------------------------------------------------------
-AC_CHECK_FUNCS(chflags)
+AC_CHECK_FUNCS(chflags mkstemps)
#--------------------------------------------------------------------
# Check for support of isnan() function or macro
@@ -571,7 +622,7 @@ else
fi
#--------------------------------------------------------------------
-# Check for support of fts functions (readdir replacement)
+# Check for support of fts functions (readdir replacement)
#--------------------------------------------------------------------
AC_CACHE_CHECK([for fts], tcl_cv_api_fts, [
@@ -589,10 +640,9 @@ if test $tcl_cv_api_fts = yes; then
fi
#--------------------------------------------------------------------
-# The statements below check for systems where POSIX-style
-# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
-# On these systems (mostly older ones), use the old BSD-style
-# FIONBIO approach instead.
+# The statements below check for systems where POSIX-style non-blocking
+# I/O (O_NONBLOCK) doesn't work or is unimplemented. On these systems
+# (mostly older ones), use the old BSD-style FIONBIO approach instead.
#--------------------------------------------------------------------
SC_BLOCKING_STYLE
@@ -698,28 +748,6 @@ fi
AC_MSG_RESULT([$tcl_ok])
#--------------------------------------------------------------------
-# Does the C stack grow upwards or downwards? Or cross-compiling?
-#--------------------------------------------------------------------
-
-AC_CACHE_CHECK([if the C stack grows upwards in memory], tcl_cv_stack_grows_up, [
- AC_TRY_RUN([
- int StackGrowsUp(int *parent) {
- int here;
- return (&here < parent);
- }
- int main (int argc, char *argv[]) {
- int foo;
- return StackGrowsUp(&foo);
- }
- ], tcl_cv_stack_grows_up=yes, tcl_cv_stack_grows_up=no,
- tcl_cv_stack_grows_up=unknown)])
-if test $tcl_cv_stack_grows_up = unknown; then
- AC_DEFINE(TCL_CROSS_COMPILE, 1, [Are we cross-compiling?])
-elif test $tcl_cv_stack_grows_up = yes; then
- AC_DEFINE(TCL_STACK_GROWS_UP, 1, [The C stack grows upwards in memory.])
-fi
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtcl as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -767,6 +795,12 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
unset n f v
], VERSION=${TCL_VERSION})
LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
+ # default install directory for bundled packages
+ if test "${libdir}" = '${exec_prefix}/lib' -o "`basename ${libdir}`" = 'Frameworks'; then
+ PACKAGE_DIR="/Library/Tcl"
+ else
+ PACKAGE_DIR="$libdir"
+ fi
if test "${libdir}" = '${exec_prefix}/lib'; then
# override libdir default
libdir="/Library/Frameworks"
@@ -793,6 +827,8 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
else
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"
+ # default install directory for bundled packages
+ PACKAGE_DIR="$libdir"
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
TCL_LIB_FLAG="-ltcl${TCL_VERSION}"
else
@@ -861,6 +897,7 @@ AC_SUBST(TCL_MAJOR_VERSION)
AC_SUBST(TCL_MINOR_VERSION)
AC_SUBST(TCL_PATCH_LEVEL)
AC_SUBST(TCL_YEAR)
+AC_SUBST(PKG_CFG_ARGS)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_FLAG)
@@ -902,6 +939,7 @@ AC_SUBST(TCL_MODULE_PATH)
AC_SUBST(TCL_LIBRARY)
AC_SUBST(PRIVATE_INCLUDE_DIR)
AC_SUBST(HTML_DIR)
+AC_SUBST(PACKAGE_DIR)
AC_SUBST(EXTRA_CC_SWITCHES)
AC_SUBST(EXTRA_APP_CC_SWITCHES)
@@ -920,5 +958,10 @@ AC_CONFIG_FILES([
Makefile:../unix/Makefile.in
dltest/Makefile:../unix/dltest/Makefile.in
tclConfig.sh:../unix/tclConfig.sh.in
+ tcl.pc:../unix/tcl.pc.in
])
AC_OUTPUT
+
+dnl Local Variables:
+dnl mode: autoconf
+dnl End: