# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_TOP_DIR_NATIVE TCL_GENERIC_DIR_NATIVE TCL_UNIX_DIR_NATIVE TCL_WIN_DIR_NATIVE TCL_BMAP_DIR_NATIVE TCL_TOOL_DIR_NATIVE TCL_PLATFORM_DIR_NATIVE TCL_INCLUDES CLEANFILES TCL_THREADS SHARED_BUILD AR TCLSH_PROG CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LD_LIBS LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_TOP_DIR_NATIVE TCL_GENERIC_DIR_NATIVE TCL_UNIX_DIR_NATIVE TCL_WIN_DIR_NATIVE TCL_BMAP_DIR_NATIVE TCL_TOOL_DIR_NATIVE TCL_PLATFORM_DIR_NATIVE TCL_INCLUDES CLEANFILES TCL_THREADS SHARED_BUILD AR CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LD_LIBS LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB TCLSH_PROG LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
# TEA extensions pass this us the version of TEA they think they
# are compatible with.
- TEA_VERSION="3.2"
+ TEA_VERSION="3.4"
echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
{ (exit 1); exit 1; }; }
fi
- if test x"3.2" = x ; then
+ if test x"3.4" = x ; then
{ { echo "$as_me:$LINENO: error:
TEA version not specified." >&5
echo "$as_me: error:
TEA version not specified." >&2;}
{ (exit 1); exit 1; }; }
- elif test "3.2" != "${TEA_VERSION}" ; then
- echo "$as_me:$LINENO: result: warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&5
-echo "${ECHO_T}warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&6
+ elif test "3.4" != "${TEA_VERSION}" ; then
+ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.4\", have \"${TEA_VERSION}\"" >&5
+echo "${ECHO_T}warning: requested TEA version \"3.4\", have \"${TEA_VERSION}\"" >&6
else
echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
# First check to see if --with-tcl was specified.
if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
else
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in \
../tcl \
+ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
../../tcl \
+ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
../../../tcl \
+ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
done
fi
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in \
${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
fi
if test $ac_cv_header_net_errno_h = yes; then
- cat >>confdefs.h <<\_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_NET_ERRNO_H 1
_ACEOF
echo "$as_me:$LINENO: checking dirent.h" >&5
echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ if test "${tcl_cv_dirent_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- tcl_ok=yes
+ tcl_cv_dirent_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-tcl_ok=no
+tcl_cv_dirent_h=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+fi
+
- if test $tcl_ok = no; then
- cat >>confdefs.h <<\_ACEOF
+ if test $tcl_cv_dirent_h = no; then
+
+cat >>confdefs.h <<\_ACEOF
#define NO_DIRENT_H 1
_ACEOF
if test $ac_cv_header_errno_h = yes; then
:
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_ERRNO_H 1
_ACEOF
if test $ac_cv_header_float_h = yes; then
:
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_FLOAT_H 1
_ACEOF
if test $ac_cv_header_values_h = yes; then
:
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_VALUES_H 1
_ACEOF
fi
if test $ac_cv_header_limits_h = yes; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_LIMITS_H 1
_ACEOF
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_LIMITS_H 1
_ACEOF
rm -f conftest*
if test $tcl_ok = 0; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_STDLIB_H 1
_ACEOF
# set and why.
if test $tcl_ok = 0; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_STRING_H 1
_ACEOF
if test $ac_cv_header_sys_wait_h = yes; then
:
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_SYS_WAIT_H 1
_ACEOF
if test $ac_cv_header_dlfcn_h = yes; then
:
else
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define NO_DLFCN_H 1
_ACEOF
echo "$as_me:$LINENO: checking for Tcl private include files" >&5
echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6
+ TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+ TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+ TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+ TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+ TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+ TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\"
+ TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\"
+ TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\"
+
if test "${TEA_PLATFORM}" = "windows"; then
- TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
- TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
- TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
- TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
- TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
- TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
- TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-
- TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
else
- TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
- TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
- TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
- TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
- TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps'
- TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools'
- TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat'
TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-
- # substitute these in "relaxed" so that TCL_INCLUDES still works
- # without requiring the other vars to be defined in the Makefile
- eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\""
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ if test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+ TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
+ TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
+ ;;
+ esac
fi
enableval="$enable_threads"
tcl_ok=$enableval
else
- tcl_ok=
+ tcl_ok=yes
fi;
+ if test "${enable_threads+set}" = set; then
+ enableval="$enable_threads"
+ tcl_ok=$enableval
+ else
+ tcl_ok=yes
+ fi
+
if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
TCL_THREADS=1
if test "${TEA_PLATFORM}" != "windows" ; then
# We are always OK on Windows, so check what this platform wants.
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_THREAD_ALLOC 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _REENTRANT 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _THREAD_SAFE 1
_ACEOF
fi
fi
- # Does the pthread-implementation provide
- # 'pthread_attr_setstacksize' ?
-
- ac_saved_libs=$LIBS
- LIBS="$LIBS $THREADS_LIBS"
-
-for ac_func in pthread_attr_setstacksize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- LIBS=$ac_saved_libs
-
-for ac_func in readdir_r
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
fi
else
TCL_THREADS=0
echo "$as_me:$LINENO: checking for building with threads" >&5
echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
if test "${TCL_THREADS}" = "1"; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define TCL_THREADS 1
_ACEOF
#LIBS="$LIBS $THREADS_LIBS"
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ echo "$as_me:$LINENO: result: yes (default)" >&5
+echo "${ECHO_T}yes (default)" >&6
else
- echo "$as_me:$LINENO: result: no (default)" >&5
-echo "${ECHO_T}no (default)" >&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
# TCL_THREADS sanity checking. See if our request for building with
# threads is the same as the way Tcl was built. If not, warn the user.
*THREADS=1*)
if test "${TCL_THREADS}" = "0"; then
{ echo "$as_me:$LINENO: WARNING:
- Building ${PACKAGE_NAME} without threads enabled, but building against a Tcl
- that IS thread-enabled." >&5
+ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+ that IS thread-enabled. It is recommended to use --enable-threads." >&5
echo "$as_me: WARNING:
- Building ${PACKAGE_NAME} without threads enabled, but building against a Tcl
- that IS thread-enabled." >&2;}
+ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+ that IS thread-enabled. It is recommended to use --enable-threads." >&2;}
fi
;;
*)
if test "${TCL_THREADS}" = "1"; then
{ echo "$as_me:$LINENO: WARNING:
- --enable-threads requested, but attempting building against a Tcl
- that is NOT thread-enabled." >&5
+ --enable-threads requested, but building against a Tcl that is NOT
+ thread-enabled. This is an OK configuration that will also run in
+ a thread-enabled core." >&5
echo "$as_me: WARNING:
- --enable-threads requested, but attempting building against a Tcl
- that is NOT thread-enabled." >&2;}
+ --enable-threads requested, but building against a Tcl that is NOT
+ thread-enabled. This is an OK configuration that will also run in
+ a thread-enabled core." >&2;}
fi
;;
esac
echo "$as_me:$LINENO: result: static" >&5
echo "${ECHO_T}static" >&6
SHARED_BUILD=0
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define STATIC_BUILD 1
_ACEOF
- # Allow the user to provide this setting in the env
- if test "x${TCLSH_PROG}" = "x" ; then
- echo "$as_me:$LINENO: checking for tclsh" >&5
-echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
-
- if test "${ac_cv_path_tclsh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- if test "${TEA_PLATFORM}" != "windows" -o \
- \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
- # Do not allow target tclsh in known cross-compile builds,
- # as we need one we can run on this system
- search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
- fi
- for dir in $search_path ; do
- for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
- `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
- if test x"$ac_cv_path_tclsh" = x ; then
- if test -f "$j" ; then
- ac_cv_path_tclsh=$j
- break
- fi
- fi
- done
- done
-
-fi
-
-
- if test -f "$ac_cv_path_tclsh" ; then
- TCLSH_PROG=$ac_cv_path_tclsh
- echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
-echo "${ECHO_T}$TCLSH_PROG" >&6
- else
- { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
-echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-
-
-
# Step 0: Enable 64 bit support?
windows)
# This is a 2-stage check to make sure we have the 64-bit SDK
# We have to know where the SDK is installed.
- if test "$do64bit" = "yes" ; then
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
if test "x${MSSDK}x" = "xx" ; then
- MSSDK="C:/Progra~1/Microsoft SDK"
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
fi
- # Ensure that this path has no spaces to work in autoconf
-
- if test "${TEA_PLATFORM}" = "windows" ; then
- # we need TCLSH_PROG defined to get Windows short pathnames
-
-
- echo "$as_me:$LINENO: checking short pathname for MSSDK (${MSSDK})" >&5
-echo $ECHO_N "checking short pathname for MSSDK (${MSSDK})... $ECHO_C" >&6
-
- shortpath=
- case "${MSSDK}" in
- *\ *)
- # Only do this if we need to.
- shortpath=`echo "puts [file attributes {${MSSDK}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
- ;;
- esac
- if test "x${shortpath}" = "x" ; then
- echo "$as_me:$LINENO: result: not changed" >&5
-echo "${ECHO_T}not changed" >&6
- else
- MSSDK=$shortpath
- echo "$as_me:$LINENO: result: ${MSSDK}" >&5
-echo "${ECHO_T}${MSSDK}" >&6
- fi
- fi
-
- if test ! -d "${MSSDK}/bin/win64" ; then
- { echo "$as_me:$LINENO: WARNING: could not find 64-bit SDK to enable 64bit mode" >&5
-echo "$as_me: WARNING: could not find 64-bit SDK to enable 64bit mode" >&2;}
+ MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
+echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
+echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
do64bit="no"
else
+ echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
+echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
do64bit_ok="yes"
fi
fi
if test "$doWince" != "no" ; then
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
{ { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
{ (exit 1); exit 1; }; }
else
no_celib=
CELIB_DIR=${ac_cv_c_celibconfig}
+ CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
echo "${ECHO_T}found $CELIB_DIR" >&6
-
- if test "${TEA_PLATFORM}" = "windows" ; then
- # we need TCLSH_PROG defined to get Windows short pathnames
-
-
- echo "$as_me:$LINENO: checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})" >&5
-echo $ECHO_N "checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})... $ECHO_C" >&6
-
- shortpath=
- case "${ac_cv_c_celibconfig}" in
- *\ *)
- # Only do this if we need to.
- shortpath=`echo "puts [file attributes {${ac_cv_c_celibconfig}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
- ;;
- esac
- if test "x${shortpath}" = "x" ; then
- echo "$as_me:$LINENO: result: not changed" >&5
-echo "${ECHO_T}not changed" >&6
- else
- CELIB_DIR=$shortpath
- echo "$as_me:$LINENO: result: ${CELIB_DIR}" >&5
-echo "${ECHO_T}${CELIB_DIR}" >&6
- fi
- fi
-
fi
fi
SDKROOT="C:/Windows CE Tools"
fi
fi
- # Ensure that this path has no spaces to work in autoconf
-
- if test "${TEA_PLATFORM}" = "windows" ; then
- # we need TCLSH_PROG defined to get Windows short pathnames
-
-
- echo "$as_me:$LINENO: checking short pathname for WCEROOT (${WCEROOT})" >&5
-echo $ECHO_N "checking short pathname for WCEROOT (${WCEROOT})... $ECHO_C" >&6
-
- shortpath=
- case "${WCEROOT}" in
- *\ *)
- # Only do this if we need to.
- shortpath=`echo "puts [file attributes {${WCEROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
- ;;
- esac
- if test "x${shortpath}" = "x" ; then
- echo "$as_me:$LINENO: result: not changed" >&5
-echo "${ECHO_T}not changed" >&6
- else
- WCEROOT=$shortpath
- echo "$as_me:$LINENO: result: ${WCEROOT}" >&5
-echo "${ECHO_T}${WCEROOT}" >&6
- fi
- fi
-
-
- if test "${TEA_PLATFORM}" = "windows" ; then
- # we need TCLSH_PROG defined to get Windows short pathnames
-
-
- echo "$as_me:$LINENO: checking short pathname for SDKROOT (${SDKROOT})" >&5
-echo $ECHO_N "checking short pathname for SDKROOT (${SDKROOT})... $ECHO_C" >&6
-
- shortpath=
- case "${SDKROOT}" in
- *\ *)
- # Only do this if we need to.
- shortpath=`echo "puts [file attributes {${SDKROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
- ;;
- esac
- if test "x${shortpath}" = "x" ; then
- echo "$as_me:$LINENO: result: not changed" >&5
-echo "${ECHO_T}not changed" >&6
- else
- SDKROOT=$shortpath
- echo "$as_me:$LINENO: result: ${SDKROOT}" >&5
-echo "${ECHO_T}${SDKROOT}" >&6
- fi
- fi
-
+ WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+ SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
-o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
{ { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
runtime=-MD
fi
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
# All this magic is necessary for the Win64 SDK RC1 - hobbs
- CC="${MSSDK}/Bin/Win64/cl.exe"
- CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
- -I${MSSDK}/Include/Win64/crt \
- -I${MSSDK}/Include"
- RC="${MSSDK}/bin/rc.exe"
- lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
- -LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
- LINKBIN="${MSSDK}/bin/win64/link.exe"
+ CC="\"${PATH64}/cl.exe\""
+ CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+ RC="\"${MSSDK}/bin/rc.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ # Avoid 'unresolved external symbol __security_cookie'
+ # errors, c.f. http://support.microsoft.com/?id=894573
+
+ vars="bufferoverflowU.lib"
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+
+
elif test "$doWince" != "no" ; then
CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
if test "${TARGETCPU}" = "X86"; then
- CC="${CEBINROOT}/cl.exe"
+ CC="\"${CEBINROOT}/cl.exe\""
else
- CC="${CEBINROOT}/cl${ARCH}.exe"
+ CC="\"${CEBINROOT}/cl${ARCH}.exe\""
fi
CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
- RC="${WCEROOT}/Common/EVC/bin/rc.exe"
+ RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
arch=`echo ${ARCH} | awk '{print tolower($0)}'`
defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
if test "${SHARED_BUILD}" = "1" ; then
defs="${defs} _DLL"
fi
for i in $defs ; do
- cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
#define $i 1
_ACEOF
done
- cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
#define _WIN32_WCE $CEVERSION
_ACEOF
- cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
#define UNDER_CE $CEVERSION
_ACEOF
CFLAGS_OPTIMIZE="-nologo -Ox"
lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
- LINKBIN="${CEBINROOT}/link.exe"
+ LINKBIN="\"${CEBINROOT}/link.exe\""
else
RC="rc"
AIX-*)
if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
# AIX requires the _r compiler when gcc isn't being used
- if test "${CC}" != "cc_r" ; then
- CC=${CC}_r
- fi
+ case "${CC}" in
+ *_r)
+ # ok ...
+ ;;
+ *)
+ CC=${CC}_r
+ ;;
+ esac
echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
echo "${ECHO_T}Using $CC for compiling with threads" >&6
fi
if test $libbsd = yes; then
MATH_LIBS="$MATH_LIBS -lbsd"
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_DELTA_FOR_TZ 1
_ACEOF
;;
HP-UX-*.11.*)
# Use updated header definitions where possible
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _XOPEN_SOURCE_EXTENDED 1
_ACEOF
DL_OBJS="tclLoadShl.o"
DL_LIBS="-ldld"
LDFLAGS="$LDFLAGS -Wl,-E"
- LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
fi
if test "$GCC" = "yes" ; then
SHLIB_LD="gcc -shared"
SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
fi
# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
esac
;;
Darwin-*)
+ CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
- SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ if test $do64bit = yes; then
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+ fi
+ SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
+ echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
+echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
+if test "${tcl_cv_ld_single_module+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_ld_single_module=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_ld_single_module=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$hold_ldflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
+echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
+ if test $tcl_cv_ld_single_module = yes; then
+ SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+ fi
SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
+ test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \
+ LDFLAGS="$LDFLAGS -prebind"
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+ echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
+echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
+if test "${tcl_cv_ld_search_paths_first+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_ld_search_paths_first=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_ld_search_paths_first=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$hold_ldflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
+echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
+ if test $tcl_cv_ld_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
LD_SEARCH_FLAGS=""
LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
- CFLAGS_OPTIMIZE="-Os"
;;
NEXTSTEP-*)
SHLIB_CFLAGS=""
LD_SEARCH_FLAGS=""
;;
OS/390-*)
- CFLAGS_OPTIMIZE="" # Optimizer is buggy
- cat >>confdefs.h <<\_ACEOF
+ CFLAGS_OPTIMIZE="" # Optimizer is buggy
+
+cat >>confdefs.h <<\_ACEOF
#define _OE_SOCKETS 1
_ACEOF
- # needed in sys/socket.h
+
;;
OSF1-1.0|OSF1-1.1|OSF1-1.2)
# OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
- SunOS-5.[0-6]*)
+ SunOS-5.[0-6])
+ # Careful to not let 5.10+ fall into this case
# Note: If _REENTRANT isn't defined, then Solaris
# won't define thread-safe library routines.
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _REENTRANT 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _POSIX_PTHREAD_SEMANTICS 1
_ACEOF
# Note: If _REENTRANT isn't defined, then Solaris
# won't define thread-safe library routines.
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _REENTRANT 1
_ACEOF
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _POSIX_PTHREAD_SEMANTICS 1
_ACEOF
CFLAGS="$CFLAGS -xarch=v9"
LDFLAGS="$LDFLAGS -xarch=v9"
fi
+ # Solaris 64 uses this as well
+ #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
fi
+ elif test "$arch" = "amd64 i386" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -xarch=amd64"
+ LDFLAGS="$LDFLAGS -xarch=amd64"
+ fi
else
- { echo "$as_me:$LINENO: WARNING: \"64bit mode only supported sparcv9 system\"" >&5
-echo "$as_me: WARNING: \"64bit mode only supported sparcv9 system\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
+echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
fi
fi
;;
esac
- if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
- { echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
-echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
+ if test "$do64bit" != "no" -a "$do64bit_ok" = "no" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
fi
# Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
echo "$as_me:$LINENO: result: $tcl_ok" >&5
echo "${ECHO_T}$tcl_ok" >&6
if test $tcl_ok = usable; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_SYS_EXEC_H 1
_ACEOF
echo "$as_me:$LINENO: result: $tcl_ok" >&5
echo "${ECHO_T}$tcl_ok" >&6
if test $tcl_ok = usable; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_A_OUT_H 1
_ACEOF
echo "$as_me:$LINENO: result: $tcl_ok" >&5
echo "${ECHO_T}$tcl_ok" >&6
if test $tcl_ok = usable; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define USE_SYS_EXEC_AOUT_H 1
_ACEOF
fi
if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _ISOC99_SOURCE 1
_ACEOF
fi
if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define _LARGEFILE64_SOURCE 1
_ACEOF
fi
if test "${tcl_cv_type_64bit}" = none ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define TCL_WIDE_INT_IS_LONG 1
_ACEOF
echo "$as_me:$LINENO: result: using long" >&5
echo "${ECHO_T}using long" >&6
- elif test "${tcl_cv_type_64bit}" = "__int64" ; then
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
# We actually want to use the default tcl.h checks in this
# case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
echo "${ECHO_T}using Tcl header defaults" >&6
else
- cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
_ACEOF
fi
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRUCT_DIRENT64 1
_ACEOF
fi
if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_STRUCT_STAT64 1
_ACEOF
fi
if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_TYPE_OFF64_T 1
_ACEOF
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
#define TCL_MEM_DEBUG 1
_ACEOF
- # Allow the user to provide this setting in the env
- if test "x${TCLSH_PROG}" = "x" ; then
- echo "$as_me:$LINENO: checking for tclsh" >&5
+ echo "$as_me:$LINENO: checking for tclsh" >&5
echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
-
- if test "${ac_cv_path_tclsh+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- if test "${TEA_PLATFORM}" != "windows" -o \
- \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
- # Do not allow target tclsh in known cross-compile builds,
- # as we need one we can run on this system
- search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
- fi
- for dir in $search_path ; do
- for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
- `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
- if test x"$ac_cv_path_tclsh" = x ; then
- if test -f "$j" ; then
- ac_cv_path_tclsh=$j
- break
- fi
- fi
- done
- done
-
-fi
-
-
- if test -f "$ac_cv_path_tclsh" ; then
- TCLSH_PROG=$ac_cv_path_tclsh
- echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
-echo "${ECHO_T}$TCLSH_PROG" >&6
- else
- { { echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
-echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
- { (exit 1); exit 1; }; }
- fi
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ # tclConfig.sh is in Tcl build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+ fi
+ else
+ # tclConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+ fi
+ list="`ls -d ${TCL_PREFIX}/bin 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${TCLSH_PROG}" ; then
+ REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
fi
+ echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
+echo "${ECHO_T}${TCLSH_PROG}" >&6
s,@TCL_THREADS@,$TCL_THREADS,;t t
s,@SHARED_BUILD@,$SHARED_BUILD,;t t
s,@AR@,$AR,;t t
-s,@TCLSH_PROG@,$TCLSH_PROG,;t t
s,@CELIB_DIR@,$CELIB_DIR,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@DL_LIBS@,$DL_LIBS,;t t
s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t
s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
s,@RANLIB_STUB@,$RANLIB_STUB,;t t
+s,@TCLSH_PROG@,$TCLSH_PROG,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
# a Tcl extension.
#
# Copyright (c) 1999-2000 Ajuba Solutions.
-# Copyright (c) 2002-2003 ActiveState Corporation.
+# Copyright (c) 2002-2005 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
AC_PREREQ(2.50)
+# Possible values for key variables defined:
+#
+# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
+# TEA_PLATFORM - windows unix
+#
+
#------------------------------------------------------------------------
# TEA_PATH_TCLCONFIG --
#
# First check to see if --with-tcl was specified.
if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
else
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in \
../tcl \
+ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
../../tcl \
+ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
../../../tcl \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
done
fi
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in \
${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
# First check to see if --with-tkconfig was specified.
if test x"${with_tkconfig}" != x ; then
+ case ${with_tkconfig} in
+ */tkConfig.sh )
+ if test -f ${with_tkconfig}; then
+ AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
+ with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ fi ;;
+ esac
if test -f "${with_tkconfig}/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
else
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in \
../tk \
+ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
../../tk \
+ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
../../../tk \
+ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
fi
done
fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tk.framework/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
# check in a few common install locations
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in \
${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
if test -f "$i/unix/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
done
fi
])
+
if test x"${ac_cv_c_tkconfig}" = x ; then
TK_BIN_DIR="# no Tk configs found"
AC_MSG_WARN("Cannot find Tk configuration definitions")
AC_MSG_RESULT([found $TK_BIN_DIR/tkConfig.sh])
fi
fi
-
])
#------------------------------------------------------------------------
TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
fi
+ # Ensure windowingsystem is defined
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ case ${TK_DEFS} in
+ *MAC_OSX_TK*)
+ AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
+ TEA_WINDOWINGSYSTEM="aqua"
+ ;;
+ *)
+ TEA_WINDOWINGSYSTEM="x11"
+ ;;
+ esac
+ elif test "${TEA_PLATFORM}" = "windows" ; then
+ TEA_WINDOWINGSYSTEM="win32"
+ fi
+
#
# eval is required to do the TK_DBGX substitution
#
else
AC_MSG_RESULT([static])
SHARED_BUILD=0
- AC_DEFINE(STATIC_BUILD)
+ AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
fi
AC_SUBST(SHARED_BUILD)
])
#------------------------------------------------------------------------
# TEA_ENABLE_THREADS --
#
-# Specify if thread support should be enabled. If "yes" is
-# specified as an arg (optional), threads are enabled by default.
+# Specify if thread support should be enabled. If "yes" is specified
+# as an arg (optional), threads are enabled by default, "no" means
+# threads are disabled. "yes" is the default.
+#
# TCL_THREADS is checked so that if you are compiling an extension
# against a threaded core, your extension must be compiled threaded
# as well.
#
+# Note that it is legal to have a thread enabled extension run in a
+# threaded or non-threaded Tcl core, but a non-threaded extension may
+# only run in a non-threaded Tcl core.
+#
# Arguments:
# none
#
AC_DEFUN(TEA_ENABLE_THREADS, [
AC_ARG_ENABLE(threads, [ --enable-threads build with threads],
- [tcl_ok=$enableval], [tcl_ok=$1])
+ [tcl_ok=$enableval], [tcl_ok=yes])
+
+ if test "${enable_threads+set}" = set; then
+ enableval="$enable_threads"
+ tcl_ok=$enableval
+ else
+ tcl_ok=yes
+ fi
if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
TCL_THREADS=1
if test "${TEA_PLATFORM}" != "windows" ; then
# We are always OK on Windows, so check what this platform wants.
- AC_DEFINE(USE_THREAD_ALLOC)
- AC_DEFINE(_REENTRANT)
- AC_DEFINE(_THREAD_SAFE)
+ AC_DEFINE(USE_THREAD_ALLOC, 1,
+ [Do we want to use the threaded memory allocator?])
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
if test "$tcl_ok" = "no"; then
# Check a little harder for __pthread_mutex_init in the
fi
fi
- # Does the pthread-implementation provide
- # 'pthread_attr_setstacksize' ?
-
- ac_saved_libs=$LIBS
- LIBS="$LIBS $THREADS_LIBS"
- AC_CHECK_FUNCS(pthread_attr_setstacksize)
- LIBS=$ac_saved_libs
- AC_CHECK_FUNCS(readdir_r)
+dnl # Not needed in TEA
+dnl # Does the pthread-implementation provide
+dnl # 'pthread_attr_setstacksize' ?
+dnl
+dnl ac_saved_libs=$LIBS
+dnl LIBS="$LIBS $THREADS_LIBS"
+dnl AC_CHECK_FUNCS(pthread_attr_setstacksize)
+dnl LIBS=$ac_saved_libs
fi
else
TCL_THREADS=0
# Do checking message here to not mess up interleaved configure output
AC_MSG_CHECKING([for building with threads])
if test "${TCL_THREADS}" = "1"; then
- AC_DEFINE(TCL_THREADS)
+ AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
#LIBS="$LIBS $THREADS_LIBS"
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes (default)])
else
- AC_MSG_RESULT([no (default)])
+ AC_MSG_RESULT([no])
fi
# TCL_THREADS sanity checking. See if our request for building with
# threads is the same as the way Tcl was built. If not, warn the user.
*THREADS=1*)
if test "${TCL_THREADS}" = "0"; then
AC_MSG_WARN([
- Building ${PACKAGE_NAME} without threads enabled, but building against a Tcl
- that IS thread-enabled.])
+ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+ that IS thread-enabled. It is recommended to use --enable-threads.])
fi
;;
*)
if test "${TCL_THREADS}" = "1"; then
AC_MSG_WARN([
- --enable-threads requested, but attempting building against a Tcl
- that is NOT thread-enabled.])
+ --enable-threads requested, but building against a Tcl that is NOT
+ thread-enabled. This is an OK configuration that will also run in
+ a thread-enabled core.])
fi
;;
esac
AC_SUBST(LDFLAGS_DEFAULT)
if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- AC_DEFINE(TCL_MEM_DEBUG)
+ AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
fi
if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
HAVE_LANGINFO=0
if test "$langinfo_ok" = "yes"; then
- if test "$langinfo_ok" = "yes"; then
- AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
- fi
+ AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
fi
AC_MSG_CHECKING([whether to use nl_langinfo])
if test "$langinfo_ok" = "yes"; then
- AC_TRY_COMPILE([#include <langinfo.h>],
- [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
- if test "$langinfo_ok" = "no"; then
- langinfo_ok="no (could not compile with nl_langinfo)";
- fi
- if test "$langinfo_ok" = "yes"; then
- AC_DEFINE(HAVE_LANGINFO)
+ AC_CACHE_VAL(tcl_cv_langinfo_h,
+ AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+ [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no]))
+ AC_MSG_RESULT($tcl_cv_langinfo_h)
+ if test $tcl_cv_langinfo_h = yes; then
+ AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
fi
+ else
+ AC_MSG_RESULT([$langinfo_ok])
fi
- AC_MSG_RESULT([$langinfo_ok])
])
#--------------------------------------------------------------------
windows)
# This is a 2-stage check to make sure we have the 64-bit SDK
# We have to know where the SDK is installed.
- if test "$do64bit" = "yes" ; then
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
if test "x${MSSDK}x" = "xx" ; then
- MSSDK="C:/Progra~1/Microsoft SDK"
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
fi
- # Ensure that this path has no spaces to work in autoconf
- TEA_PATH_NOSPACE(MSSDK, ${MSSDK})
- if test ! -d "${MSSDK}/bin/win64" ; then
- AC_MSG_WARN([could not find 64-bit SDK to enable 64bit mode])
+ MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+ AC_MSG_WARN([Ensure latest Platform SDK is installed])
do64bit="no"
else
+ AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
do64bit_ok="yes"
fi
fi
if test "$doWince" != "no" ; then
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
fi
if test "$GCC" = "yes" ; then
SDKROOT="C:/Windows CE Tools"
fi
fi
- # Ensure that this path has no spaces to work in autoconf
- TEA_PATH_NOSPACE(WCEROOT, ${WCEROOT})
- TEA_PATH_NOSPACE(SDKROOT, ${SDKROOT})
+ WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+ SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
-o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
runtime=-MD
fi
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
# All this magic is necessary for the Win64 SDK RC1 - hobbs
- CC="${MSSDK}/Bin/Win64/cl.exe"
- CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
- -I${MSSDK}/Include/Win64/crt \
- -I${MSSDK}/Include"
- RC="${MSSDK}/bin/rc.exe"
- lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
- -LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
- LINKBIN="${MSSDK}/bin/win64/link.exe"
+ CC="\"${PATH64}/cl.exe\""
+ CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+ RC="\"${MSSDK}/bin/rc.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ # Avoid 'unresolved external symbol __security_cookie'
+ # errors, c.f. http://support.microsoft.com/?id=894573
+ TEA_ADD_LIBS([bufferoverflowU.lib])
elif test "$doWince" != "no" ; then
CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
if test "${TARGETCPU}" = "X86"; then
- CC="${CEBINROOT}/cl.exe"
+ CC="\"${CEBINROOT}/cl.exe\""
else
- CC="${CEBINROOT}/cl${ARCH}.exe"
+ CC="\"${CEBINROOT}/cl${ARCH}.exe\""
fi
CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
- RC="${WCEROOT}/Common/EVC/bin/rc.exe"
+ RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
if test "${SHARED_BUILD}" = "1" ; then
defs="${defs} _DLL"
fi
for i in $defs ; do
- AC_DEFINE_UNQUOTED($i)
+ AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i)
done
- AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION)
- AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION)
+ AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
+ AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
CFLAGS_DEBUG="-nologo -Zi -Od"
CFLAGS_OPTIMIZE="-nologo -Ox"
lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
- LINKBIN="${CEBINROOT}/link.exe"
+ LINKBIN="\"${CEBINROOT}/link.exe\""
AC_SUBST(CELIB_DIR)
else
RC="rc"
AIX-*)
if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
# AIX requires the _r compiler when gcc isn't being used
- if test "${CC}" != "cc_r" ; then
- CC=${CC}_r
- fi
+ case "${CC}" in
+ *_r)
+ # ok ...
+ ;;
+ *)
+ CC=${CC}_r
+ ;;
+ esac
AC_MSG_RESULT([Using $CC for compiling with threads])
fi
LIBS="$LIBS -lc"
AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
if test $libbsd = yes; then
MATH_LIBS="$MATH_LIBS -lbsd"
- AC_DEFINE(USE_DELTA_FOR_TZ)
+ AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?])
fi
;;
BeOS*)
;;
HP-UX-*.11.*)
# Use updated header definitions where possible
- AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
SHLIB_SUFFIX=".sl"
AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
DL_OBJS="tclLoadShl.o"
DL_LIBS="-ldld"
LDFLAGS="$LDFLAGS -Wl,-E"
- LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
fi
if test "$GCC" = "yes" ; then
SHLIB_LD="gcc -shared"
SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
fi
# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
esac
;;
Darwin-*)
+ CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
- SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ if test $do64bit = yes; then
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+ fi
+ SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
+ AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+ AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
+ LDFLAGS=$hold_ldflags])
+ if test $tcl_cv_ld_single_module = yes; then
+ SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+ fi
SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
+ test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'`" -lt 4 && \
+ LDFLAGS="$LDFLAGS -prebind"
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+ AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no)
+ LDFLAGS=$hold_ldflags])
+ if test $tcl_cv_ld_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
LD_SEARCH_FLAGS=""
LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
- CFLAGS_OPTIMIZE="-Os"
;;
NEXTSTEP-*)
SHLIB_CFLAGS=""
LD_SEARCH_FLAGS=""
;;
OS/390-*)
- CFLAGS_OPTIMIZE="" # Optimizer is buggy
- AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h
+ CFLAGS_OPTIMIZE="" # Optimizer is buggy
+ AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h
+ [Should OS/390 do the right thing with sockets?])
;;
OSF1-1.0|OSF1-1.1|OSF1-1.2)
# OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
- SunOS-5.[[0-6]]*)
+ SunOS-5.[[0-6]])
+ # Careful to not let 5.10+ fall into this case
# Note: If _REENTRANT isn't defined, then Solaris
# won't define thread-safe library routines.
- AC_DEFINE(_REENTRANT)
- AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+ [Do we really want to follow the standard? Yes we do!])
SHLIB_CFLAGS="-KPIC"
# Note: If _REENTRANT isn't defined, then Solaris
# won't define thread-safe library routines.
- AC_DEFINE(_REENTRANT)
- AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+ [Do we really want to follow the standard? Yes we do!])
SHLIB_CFLAGS="-KPIC"
CFLAGS="$CFLAGS -xarch=v9"
LDFLAGS="$LDFLAGS -xarch=v9"
fi
+ # Solaris 64 uses this as well
+ #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
fi
+ elif test "$arch" = "amd64 i386" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -xarch=amd64"
+ LDFLAGS="$LDFLAGS -xarch=amd64"
+ fi
else
- AC_MSG_WARN("64bit mode only supported sparcv9 system")
+ AC_MSG_WARN([64bit mode not supported for $arch])
fi
fi
;;
esac
- if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
- AC_MSG_WARN("64bit support being disabled -- don\'t know magic for this platform")
+ if test "$do64bit" != "no" -a "$do64bit_ok" = "no" ; then
+ AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
fi
# Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
], tcl_ok=usable, tcl_ok=unusable)
AC_MSG_RESULT([$tcl_ok])
if test $tcl_ok = usable; then
- AC_DEFINE(USE_SYS_EXEC_H)
+ AC_DEFINE(USE_SYS_EXEC_H, 1,
+ [Should we use <sys/exec.h> when doing dynamic loading?])
else
AC_MSG_CHECKING([a.out.h])
AC_TRY_COMPILE([#include <a.out.h>],[
], tcl_ok=usable, tcl_ok=unusable)
AC_MSG_RESULT([$tcl_ok])
if test $tcl_ok = usable; then
- AC_DEFINE(USE_A_OUT_H)
+ AC_DEFINE(USE_A_OUT_H, 1,
+ [Should we use <a.out.h> when doing dynamic loading?])
else
AC_MSG_CHECKING([sys/exec_aout.h])
AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
], tcl_ok=usable, tcl_ok=unusable)
AC_MSG_RESULT([$tcl_ok])
if test $tcl_ok = usable; then
- AC_DEFINE(USE_SYS_EXEC_AOUT_H)
+ AC_DEFINE(USE_SYS_EXEC_AOUT_H, 1,
+ [Should we use <sys/exec_aout.h> when doing dynamic loading?])
else
DL_OBJS=""
fi
}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
fi])
case $tcl_cv_api_serial in
- termios) AC_DEFINE(USE_TERMIOS);;
- termio) AC_DEFINE(USE_TERMIO);;
- sgtty) AC_DEFINE(USE_SGTTY);;
+ termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
+ termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+ sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
esac
AC_MSG_RESULT([$tcl_cv_api_serial])
])
AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [
AC_MSG_CHECKING([dirent.h])
+ AC_CACHE_VAL(tcl_cv_dirent_h,
AC_TRY_LINK([#include <sys/types.h>
#include <dirent.h>], [
#ifndef _POSIX_SOURCE
entryPtr = readdir(d);
p = entryPtr->d_name;
closedir(d);
-], tcl_ok=yes, tcl_ok=no)
+], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no))
- if test $tcl_ok = no; then
- AC_DEFINE(NO_DIRENT_H)
+ if test $tcl_cv_dirent_h = no; then
+ AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
fi
AC_MSG_RESULT([$tcl_ok])
- AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
- AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
- AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
+ AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+ AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+ AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
AC_CHECK_HEADER(limits.h,
- [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)])
+ [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+ [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
if test $tcl_ok = 0; then
- AC_DEFINE(NO_STDLIB_H)
+ AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
fi
AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
# set and why.
if test $tcl_ok = 0; then
- AC_DEFINE(NO_STRING_H)
+ AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
fi
- AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
- AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
+ AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+ AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
# OS/390 lacks sys/param.h (and doesn't need it, by chance).
AC_HAVE_HEADERS(sys/param.h)
#--------------------------------------------------------------------
AC_DEFUN(TEA_PATH_X, [
- if test "${TEA_PLATFORM}" = "unix" ; then
- case ${TK_DEFS} in
- *MAC_OSX_TK*)
- AC_DEFINE(MAC_OSX_TK)
- TEA_WINDOWINGSYSTEM="aqua"
- ;;
- *)
- TEA_PATH_UNIX_X
- TEA_WINDOWINGSYSTEM="x11"
- ;;
- esac
- elif test "${TEA_PLATFORM}" = "windows" ; then
- TEA_WINDOWINGSYSTEM="windows"
+ if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+ TEA_PATH_UNIX_X
fi
])
# code (JO, 5/31/97).
OSF*)
- AC_DEFINE(USE_FIONBIO)
+ AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
AC_MSG_RESULT([FIONBIO])
;;
SunOS-4*)
- AC_DEFINE(USE_FIONBIO)
+ AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
AC_MSG_RESULT([FIONBIO])
;;
ULTRIX-4.*)
- AC_DEFINE(USE_FIONBIO)
+ AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
AC_MSG_RESULT([FIONBIO])
;;
*)
tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
AC_MSG_RESULT([$tcl_cv_member_tm_tzadj])
if test $tcl_cv_member_tm_tzadj = yes ; then
- AC_DEFINE(HAVE_TM_TZADJ)
+ AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
fi
AC_MSG_CHECKING([tm_gmtoff in struct tm])
tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff])
if test $tcl_cv_member_tm_gmtoff = yes ; then
- AC_DEFINE(HAVE_TM_GMTOFF)
+ AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
fi
#
# (like convex) have timezone functions, etc.
#
AC_MSG_CHECKING([long timezone variable])
- AC_CACHE_VAL(tcl_cv_var_timezone,
+ AC_CACHE_VAL(tcl_cv_timezone_long,
AC_TRY_COMPILE([#include <time.h>],
[extern long timezone;
timezone += 1;
tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
AC_MSG_RESULT([$tcl_cv_timezone_long])
if test $tcl_cv_timezone_long = yes ; then
- AC_DEFINE(HAVE_TIMEZONE_VAR)
+ AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
else
#
# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
AC_MSG_RESULT([$tcl_cv_timezone_time])
if test $tcl_cv_timezone_time = yes ; then
- AC_DEFINE(HAVE_TIMEZONE_VAR)
+ AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
fi
fi
])
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_CACHE_VAL(tcl_cv_strtod_buggy,[
AC_TRY_RUN([
extern double strtod();
int main()
exit(1);
}
exit(0);
- }], tcl_ok=1, tcl_ok=0, tcl_ok=0)
- if test "$tcl_ok" = 1; then
+ }], tcl_cv_strtod_buggy=1, tcl_cv_strtod_buggy=0, tcl_cv_strtod_buggy=0)])
+ if test "$tcl_cv_strtod_buggy" = 1; then
AC_MSG_RESULT([ok])
else
AC_MSG_RESULT([buggy])
#LIBOBJS="$LIBOBJS fixstrtod.o"
AC_LIBOBJ([fixstrtod])
USE_COMPAT=1
- AC_DEFINE(strtod, fixstrtod)
+ AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
fi
fi
])
#--------------------------------------------------------------------
AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
- AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
+ AC_CHECK_HEADER(net/errno.h, [
+ AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
#--------------------------------------------------------------------
# Check for the existence of the -lsocket and -lnsl libraries.
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
[tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
- AC_DEFINE($1)
+ AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
tcl_flags="$tcl_flags $1"
fi
])
case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
}],tcl_cv_type_64bit=${tcl_type_64bit})])
if test "${tcl_cv_type_64bit}" = none ; then
- AC_DEFINE(TCL_WIDE_INT_IS_LONG)
+ AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
AC_MSG_RESULT([using long])
- elif test "${tcl_cv_type_64bit}" = "__int64" ; then
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
# We actually want to use the default tcl.h checks in this
# case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
AC_MSG_RESULT([using Tcl header defaults])
else
- AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
+ AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
+ [What type should be used to define wide integers?])
AC_MSG_RESULT([${tcl_cv_type_64bit}])
# Now check for auxiliary declarations
#include <sys/dirent.h>],[struct dirent64 p;],
tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
- AC_DEFINE(HAVE_STRUCT_DIRENT64)
+ AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
fi
AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
],
tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
- AC_DEFINE(HAVE_STRUCT_STAT64)
+ AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
fi
AC_MSG_RESULT([${tcl_cv_struct_stat64}])
],
tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
- AC_DEFINE(HAVE_TYPE_OFF64_T)
+ AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
fi
AC_MSG_RESULT([${tcl_cv_type_off64_t}])
fi
AC_DEFUN(TEA_INIT, [
# TEA extensions pass this us the version of TEA they think they
# are compatible with.
- TEA_VERSION="3.2"
+ TEA_VERSION="3.4"
AC_MSG_CHECKING([for correct TEA configuration])
if test x"${PACKAGE_NAME}" = x ; then
AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
AC_MSG_CHECKING([for Tcl private include files])
+ TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+ TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+ TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+ TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+ TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+ TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\"
+ TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\"
+ TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\"
+
if test "${TEA_PLATFORM}" = "windows"; then
- TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\"
- TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\"
- TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\"
- TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\"
- TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\"
- TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\"
- TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\"
TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
-
- TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
else
- TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
- TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
- TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
- TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
- TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps'
- TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools'
- TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat'
TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
-
- # substitute these in "relaxed" so that TCL_INCLUDES still works
- # without requiring the other vars to be defined in the Makefile
- eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\""
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ if test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+ TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
+ TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
+ ;;
+ esac
fi
AC_SUBST(TCL_TOP_DIR_NATIVE)
AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
fi
else
+ # If Tcl was built as a framework, attempt to use
+ # the framework's Headers directory
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+ ;;
+ *)
+ list=""
+ ;;
+ esac
# Check order: pkg --prefix location, Tcl's --prefix location,
# directory of tclConfig.sh, and Tcl source directory.
# Looking in the source dir is not ideal, but OK.
eval "temp_includedir=${includedir}"
- list="`ls -d ${temp_includedir} 2>/dev/null` \
+ list="$list \
+ `ls -d ${temp_includedir} 2>/dev/null` \
`ls -d ${TCL_PREFIX}/include 2>/dev/null` \
`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
`ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
list="$list /usr/local/include /usr/include"
+ if test x"${TCL_INCLUDE_SPEC}" != x ; then
+ d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+ list="$list `ls -d ${d} 2>/dev/null`"
+ fi
fi
for i in $list ; do
if test -f "$i/tcl.h" ; then
AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [
AC_MSG_CHECKING([for Tk private include files])
+ TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+ TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+ TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+ TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+ TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+ TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
if test "${TEA_PLATFORM}" = "windows"; then
- TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\"
- TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\"
- TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\"
- TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\"
- TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\"
TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
-
- TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}"
else
- TK_TOP_DIR_NATIVE='${TK_SRC_DIR}'
- TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic'
- TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix'
- TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win'
TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
-
- # substitute these in "relaxed" so that TK_INCLUDES still works
- # without requiring the other vars to be defined in the Makefile
- eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\""
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+ if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
+ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
+ fi
+ if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx"
+ fi
+ if test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then
+ TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi
+ ;;
+ esac
fi
AC_SUBST(TK_TOP_DIR_NATIVE)
AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
fi
else
+ # If Tk was built as a framework, attempt to use
+ # the framework's Headers directory.
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
+ ;;
+ *)
+ list=""
+ ;;
+ esac
# Check order: pkg --prefix location, Tcl's --prefix location,
# directory of tclConfig.sh, and Tcl source directory.
# Looking in the source dir is not ideal, but OK.
eval "temp_includedir=${includedir}"
- list="`ls -d ${temp_includedir} 2>/dev/null` \
+ list="$list \
+ `ls -d ${temp_includedir} 2>/dev/null` \
`ls -d ${TK_PREFIX}/include 2>/dev/null` \
`ls -d ${TCL_PREFIX}/include 2>/dev/null` \
`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
AC_SUBST(TK_INCLUDES)
- if test "${TEA_PLATFORM}" = "windows" ; then
- # On Windows, we need the X compat headers
+ if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
+ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ # On Windows and Aqua, we need the X compat headers
AC_MSG_CHECKING([for X11 header files])
if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
#------------------------------------------------------------------------
# TEA_PROG_TCLSH
-# Locate a tclsh shell in the following directories:
-# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
-# ${exec_prefix}/bin ${prefix}/bin
-# ${PATH}
+# Determine the fully qualified path name of the tclsh executable
+# in the Tcl build directory or the tclsh installed in a bin
+# directory. This macro will correctly determine the name
+# of the tclsh executable even if tclsh has not yet been
+# built in the build directory. The tclsh found is always
+# associated with a tclConfig.sh file. This tclsh should be used
+# only for running extension test cases. It should never be
+# or generation of files (like pkgIndex.tcl) at build time.
#
# Arguments
# none
#------------------------------------------------------------------------
AC_DEFUN(TEA_PROG_TCLSH, [
- # Allow the user to provide this setting in the env
- if test "x${TCLSH_PROG}" = "x" ; then
- AC_MSG_CHECKING([for tclsh])
-
- AC_CACHE_VAL(ac_cv_path_tclsh, [
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- if test "${TEA_PLATFORM}" != "windows" -o \
- \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
- # Do not allow target tclsh in known cross-compile builds,
- # as we need one we can run on this system
- search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
- fi
- for dir in $search_path ; do
- for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
- `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
- if test x"$ac_cv_path_tclsh" = x ; then
- if test -f "$j" ; then
- ac_cv_path_tclsh=$j
- break
- fi
- fi
- done
- done
- ])
-
- if test -f "$ac_cv_path_tclsh" ; then
- TCLSH_PROG=$ac_cv_path_tclsh
- AC_MSG_RESULT([$TCLSH_PROG])
- else
- AC_MSG_ERROR([No tclsh found in PATH: $search_path])
- fi
- fi
+ AC_MSG_CHECKING([for tclsh])
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ # tclConfig.sh is in Tcl build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+ fi
+ else
+ # tclConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+ fi
+ list="`ls -d ${TCL_PREFIX}/bin 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${TCLSH_PROG}" ; then
+ REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
+ fi
+ AC_MSG_RESULT(${TCLSH_PROG})
AC_SUBST(TCLSH_PROG)
])
#------------------------------------------------------------------------
# TEA_PROG_WISH
-# Locate a wish shell in the following directories:
-# ${TK_BIN_DIR} ${TK_BIN_DIR}/../bin
-# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
-# ${exec_prefix}/bin ${prefix}/bin
-# ${PATH}
+# Determine the fully qualified path name of the wish executable
+# in the Tk build directory or the wish installed in a bin
+# directory. This macro will correctly determine the name
+# of the wish executable even if wish has not yet been
+# built in the build directory. The wish found is always
+# associated with a tkConfig.sh file. This wish should be used
+# only for running extension test cases. It should never be
+# or generation of files (like pkgIndex.tcl) at build time.
#
# Arguments
# none
#------------------------------------------------------------------------
AC_DEFUN(TEA_PROG_WISH, [
- # Allow the user to provide this setting in the env
- if test "x${WISH_PROG}" = "x" ; then
- AC_MSG_CHECKING([for wish])
-
- AC_CACHE_VAL(ac_cv_path_wish, [
- search_path=`echo ${PATH} | sed -e 's/:/ /g'`
- if test "${TEA_PLATFORM}" != "windows" -o \
- \( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
- # Do not allow target wish in known cross-compile builds,
- # as we need one we can run on this system
- search_path="${TK_BIN_DIR} ${TK_BIN_DIR}/../bin ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
- fi
- for dir in $search_path ; do
- for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
- `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
- if test x"$ac_cv_path_wish" = x ; then
- if test -f "$j" ; then
- ac_cv_path_wish=$j
- break
- fi
- fi
- done
- done
- ])
-
- if test -f "$ac_cv_path_wish" ; then
- WISH_PROG=$ac_cv_path_wish
- AC_MSG_RESULT([$WISH_PROG])
- else
- AC_MSG_ERROR([No wish found in PATH: $search_path])
- fi
- fi
+ AC_MSG_CHECKING([for wish])
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
+ # tkConfig.sh is in Tk build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+ else
+ WISH_PROG="${TK_BIN_DIR}/wish"
+ fi
+ else
+ # tkConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+ else
+ WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+ fi
+ list="`ls -d ${TK_PREFIX}/bin 2>/dev/null` \
+ `ls -d ${TK_BIN_DIR}/../bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${WISH_PROG}" ; then
+ REAL_TK_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}"
+ fi
+ AC_MSG_RESULT(${WISH_PROG})
AC_SUBST(WISH_PROG)
])
# First check to see if --with-$1 was specified.
if test x"${with_$1config}" != x ; then
+ case ${with_$1config} in
+ */$1Config.sh )
+ if test -f ${with_$1config}; then
+ AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
+ with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
+ fi;;
+ esac
if test -f "${with_$1config}/$1Config.sh" ; then
ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
else
if test x"${ac_cv_c_$1config}" = x ; then
for i in \
../$1 \
- `ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
../../$1 \
- `ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
../../../$1 \
- `ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
${srcdir}/../$1 \
- `ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
; do
if test -f "$i/$1Config.sh" ; then
ac_cv_c_$1config=`(cd $i; pwd)`
fi
AC_SUBST($1_VERSION)
+ AC_SUBST($1_BIN_DIR)
AC_SUBST($1_SRC_DIR)
AC_SUBST($1_LIB_FILE)
else
no_celib=
CELIB_DIR=${ac_cv_c_celibconfig}
+ CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
AC_MSG_RESULT([found $CELIB_DIR])
- TEA_PATH_NOSPACE(CELIB_DIR, ${ac_cv_c_celibconfig})
- fi
- fi
-])
-
-#------------------------------------------------------------------------
-# TEA_PATH_NOSPACE
-# Ensure that the given path has no spaces. This is necessary for
-# CC (and consitutuent vars that build it up) to work in the
-# tortured autoconf environment. Currently only for Windows use.
-#
-# Arguments
-# VAR - name of the variable to set
-# PATH - path to ensure no spaces in
-#
-# Results
-# Sets $VAR to short path of $PATH if it can be found.
-#------------------------------------------------------------------------
-
-AC_DEFUN([TEA_PATH_NOSPACE], [
- if test "${TEA_PLATFORM}" = "windows" ; then
- # we need TCLSH_PROG defined to get Windows short pathnames
- AC_REQUIRE([TEA_PROG_TCLSH])
-
- AC_MSG_CHECKING([short pathname for $1 ($2)])
-
- shortpath=
- case "$2" in
- *\ *)
- # Only do this if we need to.
- shortpath=`echo "puts [[file attributes {$2} -shortname]] ; exit" | ${TCLSH_PROG} 2>/dev/null`
- ;;
- esac
- if test "x${shortpath}" = "x" ; then
- AC_MSG_RESULT([not changed])
- else
- $1=$shortpath
- AC_MSG_RESULT([${$1}])
fi
fi
])