# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-mingw* | *-*-cygwin*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
done
fi
+ # Check where 32-bit vs 64-bit libraries are stored
+ lib32="/usr/lib"
+ lib64="/usr/lib"
+ if test -d /usr/lib32 ; then
+ lib32="/usr/lib32"
+ fi
+ if test -d /usr/lib64 ; then
+ lib64="/usr/lib64"
+ fi
+ case "${CFLAGS}" in
+ *-m32*) force_32=yes ;;
+ *) force_32=no ;;
+ esac
+ case "${host}" in
+ i[[3456]]*) usrlibdir="${lib32}" ;;
+ x86_64*)
+ if test x"${force_32}" = xyes ; then
+ usrlibdir="${lib32}"
+ else
+ usrlibdir="${lib64}"
+ fi
+ ;;
+ *) usrlibdir="/usr/lib" ;;
+ esac
+
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d ${usrlibdir} 2>/dev/null` \
+ `ls -d ${usrlibdir}/tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -d ${usrlibdir}/tcl[[8-9]].[[0-9]]* 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
+ `ls -d /usr/lib/tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -d /usr/lib/tcl[[8-9]].[[0-9]]* 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i; pwd)`
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-mingw* | *-*-cygwin*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
done
fi
+ # Check where 32-bit vs 64-bit libraries are stored
+ lib32="/usr/lib"
+ lib64="/usr/lib"
+ if test -d /usr/lib32 ; then
+ lib32="/usr/lib32"
+ fi
+ if test -d /usr/lib64 ; then
+ lib64="/usr/lib64"
+ fi
+ case "${CFLAGS}" in
+ *-m32*) force_32=yes ;;
+ *) force_32=no ;;
+ esac
+ case "${host}" in
+ i[[3456]]*) usrlibdir="${lib32}" ;;
+ x86_64*)
+ if test x"${force_32}" = xyes ; then
+ usrlibdir="${lib32}"
+ else
+ usrlibdir="${lib64}"
+ fi
+ ;;
+ *) usrlibdir="/usr/lib" ;;
+ esac
+
# check in a few common install locations
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d ${usrlibdir} 2>/dev/null` \
+ `ls -d ${usrlibdir}/tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -d ${usrlibdir}/tk[[8-9]].[[0-9]]* 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
+ `ls -d /usr/lib/tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -d /usr/lib/tk[[8-9]].[[0-9]]* 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd $i; pwd)`
# Load the tclConfig.sh file
#
# Arguments:
-#
+#
# Requires the following vars to be set:
# TCL_BIN_DIR
#
AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])
if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- AC_MSG_RESULT([loading])
+ AC_MSG_RESULT([loading])
. ${TCL_BIN_DIR}/tclConfig.sh
else
- AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
+ AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
fi
# eval is required to do the TCL_DBGX substitution
# instead of TCL_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
if test -f "${TCL_BIN_DIR}/Makefile" ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
elif test "`uname -s`" = "Darwin"; then
# If Tcl was built as a framework, attempt to use the libraries
# from the framework at the given location so that linking works
# Load the tkConfig.sh file
#
# Arguments:
-#
+#
# Requires the following vars to be set:
# TK_BIN_DIR
#
AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
- AC_MSG_RESULT([loading])
+ AC_MSG_RESULT([loading])
. ${TK_BIN_DIR}/tkConfig.sh
else
- AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
+ AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
fi
# eval is required to do the TK_DBGX substitution
# instead of TK_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
if test -f "${TK_BIN_DIR}/Makefile" ; then
- TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
- TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
- TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
elif test "`uname -s`" = "Darwin"; then
# If Tk was built as a framework, attempt to use the libraries
# from the framework at the given location so that linking works
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
#
# Arguments:
# none
-#
+#
# Requires the following vars to be set in the Makefile:
# CFLAGS_DEBUG
# CFLAGS_OPTIMIZE
# LDFLAGS_DEBUG
# LDFLAGS_OPTIMIZE
-#
+#
# Results:
#
# Adds the following arguments to configure:
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
if test $tcl_cv_langinfo_h = yes; then
AC_DEFINE(HAVE_LANGINFO)
fi
- else
+ else
AC_MSG_RESULT([$langinfo_ok])
fi
])
#--------------------------------------------------------------------
# SC_CONFIG_MANPAGES
-#
+#
# Decide whether to use symlinks for linking the manpages,
# whether to compress the manpages after installation, and
# whether to add a package name suffix to the installed
# TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS
# TK_SHLIB_LD_EXTRAS for the build of Tcl and Tk, but not recorded in the
# tclConfig.sh, since they are only used for the build
-# of Tcl and Tk.
+# of Tcl and Tk.
# Examples: MacOS X records the library version and
# compatibility version in the shared library. But
# of course the Tcl version of this is only used for Tcl.
if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
if test "$GCC" = "yes" ; then
AC_MSG_WARN([64bit mode not supported with GCC on $system])
- else
+ else
do64bit_ok=yes
CFLAGS="$CFLAGS -q64"
LDFLAGS="$LDFLAGS -q64"
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)
+ MATH_LIBS="$MATH_LIBS -lbsd"
+ AC_DEFINE(USE_DELTA_FOR_TZ)
fi
;;
BeOS*)
# Check to enable 64-bit flags for compiler/linker
if test "$do64bit" = "yes" ; then
- if test "$GCC" = "yes" ; then
- AC_MSG_WARN([64bit mode not supported by gcc])
- else
- do64bit_ok=yes
- SHLIB_LD="ld -64 -shared -rdata_shared"
- CFLAGS="$CFLAGS -64"
- LDFLAGS="$LDFLAGS -64"
- fi
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported by gcc])
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS="$LDFLAGS -64"
+ fi
fi
;;
Linux*)
SHLIB_SUFFIX=".so"
CFLAGS_OPTIMIZE=-O2
- # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
+ # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
# when you inline the string and math operations. Turn this off to
# get rid of the warnings.
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
# Disable inlining only when one of the
# files in compat/*.c is being linked in.
if test x"${LIBOBJS}" != x ; then
- CFLAGS="$CFLAGS -fno-inline"
+ CFLAGS="$CFLAGS -fno-inline"
fi
# XIM peeking works under XFree86.
case `machine` in
sparc|sparc64)
SHLIB_CFLAGS="-fPIC";;
- *)
+ *)
SHLIB_CFLAGS="-fpic";;
- esac
+ esac
SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".so"
LDFLAGS=-Wl,-export-dynamic
else
LDFLAGS=""
- fi
+ fi
;;
esac
# The -pthread needs to go in the CFLAGS, not LIBS
LIBS=`echo $LIBS | sed s/-pthread//`
CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
fi
case $system in
FreeBSD-3.*)
- # FreeBSD-3 doesn't handle version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
- TCL_LIB_VERSIONS_OK=nodots
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
esac
;;
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
done; fi
LIBS="$LIBS -framework CoreFoundation"
- AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
- [CFBundleRef b = CFBundleGetMainBundle();],
+ AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
+ [CFBundleRef b = CFBundleGetMainBundle();],
tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
eval $v'="$hold_'$v'"'
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
done
- AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
- [CFBundleRef b = CFBundleGetMainBundle();],
+ AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
+ [CFBundleRef b = CFBundleGetMainBundle();],
tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no)
for v in CFLAGS CPPFLAGS LDFLAGS; do
eval $v'="$hold_'$v'"'
OS/390-*)
CFLAGS_OPTIMIZE="" # Optimizer is buggy
AC_DEFINE(_OE_SOCKETS) # 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
SHLIB_CFLAGS=""
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
SHLIB_CFLAGS="-fPIC"
if test "$SHARED_BUILD" = "1" ; then
- SHLIB_LD="ld -shared"
+ SHLIB_LD="ld -shared"
else
- SHLIB_LD="ld -non_shared"
+ SHLIB_LD="ld -non_shared"
fi
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
# Digital OSF/1
SHLIB_CFLAGS=""
if test "$SHARED_BUILD" = "1" ; then
- SHLIB_LD='ld -shared -expect_unresolved "*"'
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
else
- SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
fi
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
if test "$GCC" = "yes" ; then
CFLAGS="$CFLAGS -mieee"
- else
+ else
CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
fi
# see pthread_intro(3) for pthread support on osf1, k.furukawa
# this test works, since "uname -s" was non-standard in 3.2.4 and
# below.
if test "$GCC" = "yes" ; then
- SHLIB_CFLAGS="-fPIC -melf"
- LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
else
- SHLIB_CFLAGS="-Kpic -belf"
- LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
fi
SHLIB_LD="ld -G"
SHLIB_LD_LIBS=""
do64bit_ok=yes
if test "$do64bitVIS" = "yes" ; then
CFLAGS="$CFLAGS -xarch=v9a"
- LDFLAGS="$LDFLAGS -xarch=v9a"
+ LDFLAGS="$LDFLAGS -xarch=v9a"
else
CFLAGS="$CFLAGS -xarch=v9"
- LDFLAGS="$LDFLAGS -xarch=v9"
+ LDFLAGS="$LDFLAGS -xarch=v9"
fi
# Solaris 64 uses this as well
#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
AC_MSG_WARN([64bit mode not supported for $arch])
fi
fi
-
+
# Note: need the LIBS below, otherwise Tk won't find Tcl's
# symbols when dynamically loaded into tclsh.
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-Bexport"
AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
- LDFLAGS=$hold_ldflags])
+ LDFLAGS=$hold_ldflags])
if test $tcl_cv_ld_Bexport = yes; then
LDFLAGS="$LDFLAGS -Wl,-Bexport"
fi
# New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
# to determine which of several header files defines the a.out file
# format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we
- # support only a file format that is more or less version-7-compatible.
+ # support only a file format that is more or less version-7-compatible.
# In particular,
# - a.out files must begin with `struct exec'.
# - the N_TXTOFF on the `struct exec' must compute the seek address
fi
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
- LIB_SUFFIX=${SHARED_LIB_SUFFIX}
- MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+ LIB_SUFFIX=${SHARED_LIB_SUFFIX}
+ MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
else
- LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
+ LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
- if test "$RANLIB" = "" ; then
- MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
- else
- MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
- fi
+ if test "$RANLIB" = "" ; then
+ MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+ else
+ MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
+ fi
dnl Not at all clear what this was doing in Tcl's configure.ac
dnl or why it was needed was needed. In any event, this sort of
# Stub lib does not depend on shared/static configuration
if test "$RANLIB" = "" ; then
- MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
+ MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
+ INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
else
- MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
+ MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
+ INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
fi
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines only one of the following vars:
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
#
# Arguments:
# none
-#
+#
# Results:
#
# Sets the the following vars:
# SC_BLOCKING_STYLE
#
# The statements below check for systems where POSIX-style
-# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
+# 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.
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
#
# Arguments:
# none
-#
+#
# Results:
#
# Might defines some of the following vars:
# DL_LIBS
# LIBS
# MATH_LIBS
-#
+#
# Results:
#
# Subst's the following var:
fi
AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
[LIBS="$LIBS -lnsl"])])
-
+
# Don't perform the eval of the libraries here because DL_LIBS
# won't be set until we call SC_CONFIG_CFLAGS
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
# See if we should use long anyway Note that we substitute in the
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
- AC_TRY_COMPILE(,[switch (0) {
- case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
- }],tcl_cv_type_64bit=${tcl_type_64bit})])
+ AC_TRY_COMPILE(,[switch (0) {
+ 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_MSG_RESULT([using long])
dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
dnl functions lseek64 and open64 are defined.
if test "x${tcl_cv_type_off64_t}" = "xyes" && \
- test "x${ac_cv_func_lseek64}" = "xyes" && \
- test "x${ac_cv_func_open64}" = "xyes" ; then
+ test "x${ac_cv_func_lseek64}" = "xyes" && \
+ test "x${ac_cv_func_open64}" = "xyes" ; then
AC_DEFINE(HAVE_TYPE_OFF64_T)
AC_MSG_RESULT([yes])
else
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
# First check to see if --with-tcl was specified.
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-mingw* | *-*-cygwin*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
done
fi
+ # Check where 32-bit vs 64-bit libraries are stored
+ lib32="/usr/lib"
+ lib64="/usr/lib"
+ if test -d /usr/lib32 ; then
+ lib32="/usr/lib32"
+ fi
+ if test -d /usr/lib64 ; then
+ lib64="/usr/lib64"
+ fi
+ case "${CFLAGS}" in
+ *-m32*) force_32=yes ;;
+ *) force_32=no ;;
+ esac
+ case "${host}" in
+ i[3456]*) usrlibdir="${lib32}" ;;
+ x86_64*)
+ if test x"${force_32}" = xyes ; then
+ usrlibdir="${lib32}"
+ else
+ usrlibdir="${lib64}"
+ fi
+ ;;
+ *) usrlibdir="/usr/lib" ;;
+ esac
+
# check in a few common install locations
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d ${usrlibdir} 2>/dev/null` \
+ `ls -d ${usrlibdir}/tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -d ${usrlibdir}/tcl[8-9].[0-9]* 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
+ `ls -d /usr/lib/tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -d /usr/lib/tcl[8-9].[0-9]* 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd $i; pwd)`
# then check for a private Tk library
case "${host}" in
- *-*-cygwin*) platDir="win" ;;
+ *-*-mingw* | *-*-cygwin*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
done
fi
+ # Check where 32-bit vs 64-bit libraries are stored
+ lib32="/usr/lib"
+ lib64="/usr/lib"
+ if test -d /usr/lib32 ; then
+ lib32="/usr/lib32"
+ fi
+ if test -d /usr/lib64 ; then
+ lib64="/usr/lib64"
+ fi
+ case "${CFLAGS}" in
+ *-m32*) force_32=yes ;;
+ *) force_32=no ;;
+ esac
+ case "${host}" in
+ i[3456]*) usrlibdir="${lib32}" ;;
+ x86_64*)
+ if test x"${force_32}" = xyes ; then
+ usrlibdir="${lib32}"
+ else
+ usrlibdir="${lib64}"
+ fi
+ ;;
+ *) usrlibdir="/usr/lib" ;;
+ esac
+
# check in a few common install locations
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in `ls -d ${libdir} 2>/dev/null` \
`ls -d ${prefix}/lib 2>/dev/null` \
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d ${usrlibdir} 2>/dev/null` \
+ `ls -d ${usrlibdir}/tk[8-9].[0-9] 2>/dev/null` \
+ `ls -d ${usrlibdir}/tk[8-9].[0-9]* 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
+ `ls -d /usr/lib/tk[8-9].[0-9] 2>/dev/null` \
+ `ls -d /usr/lib/tk[8-9].[0-9]* 2>/dev/null` \
; do
if test -f "$i/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd $i; pwd)`
$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
$as_echo "loading" >&6; }
. ${TCL_BIN_DIR}/tclConfig.sh
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
fi
# instead of TCL_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
if test -f "${TCL_BIN_DIR}/Makefile" ; then
- TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
- TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
- TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
elif test "`uname -s`" = "Darwin"; then
# If Tcl was built as a framework, attempt to use the libraries
# from the framework at the given location so that linking works
$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
$as_echo "loading" >&6; }
. ${TK_BIN_DIR}/tkConfig.sh
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
fi
# instead of TK_BUILD_LIB_SPEC since it will work with both an
# installed and uninstalled version of Tcl.
if test -f "${TK_BIN_DIR}/Makefile" ; then
- TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
- TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
- TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
elif test "`uname -s`" = "Darwin"; then
# If Tk was built as a framework, attempt to use the libraries
# from the framework at the given location so that linking works