summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-01-06 23:16:20 (GMT)
committernijtmans <nijtmans>2010-01-06 23:16:20 (GMT)
commit202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e (patch)
tree5c6a94fabc0b60a5ba23015151521bba53f96560
parentdf9501bba1307cd8d762718fdb94dcf66309c717 (diff)
downloadtk-202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e.zip
tk-202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e.tar.gz
tk-202013b4ffd4f5ab925eeed4d3fdcaa4a40c552e.tar.bz2
Trivial CYGWIN fixes (backported from trunk)
-rw-r--r--ChangeLog10
-rw-r--r--doc/.cvsignore1
-rw-r--r--generic/default.h4
-rw-r--r--generic/tkWindow.c4
-rw-r--r--unix/.cvsignore7
-rw-r--r--unix/Makefile.in50
-rwxr-xr-xunix/configure120
-rw-r--r--unix/tcl.m4123
8 files changed, 250 insertions, 69 deletions
diff --git a/ChangeLog b/ChangeLog
index abd9714..db34d60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-06 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * unix/tcl.m4 Sync with Tcl version
+ * unix/configure (regenerated)
+ * unix/Makefile.in
+ * unix/.cvsignore
+ * generic/default.h Trivial CYGWIN fixes
+ * generic/tkWindow.c
+ * doc/.cvsignore
+
2010-01-06 Donal K. Fellows <dkf@users.sf.net>
* unix/tkUnixWm.c (TkWmMapWindow): [Bug 1163496]: Allow windows to be
diff --git a/doc/.cvsignore b/doc/.cvsignore
new file mode 100644
index 0000000..4b45b15
--- /dev/null
+++ b/doc/.cvsignore
@@ -0,0 +1 @@
+*.macros
diff --git a/generic/default.h b/generic/default.h
index 1859369..31f674a 100644
--- a/generic/default.h
+++ b/generic/default.h
@@ -10,14 +10,14 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: default.h,v 1.5 2004/03/17 18:15:42 das Exp $
+ * RCS: @(#) $Id: default.h,v 1.5.4.1 2010/01/06 23:16:20 nijtmans Exp $
*/
#ifndef _DEFAULT
#define _DEFAULT
#if defined(__WIN32__) || defined(_WIN32) || \
- defined(__CYGWIN__) || defined(__MINGW32__)
+ defined(__MINGW32__)
# include "tkWinDefault.h"
#else
# if defined(MAC_OSX_TK)
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 6b03c4f..4e274f7 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.89.2.4 2009/10/15 17:48:50 dgp Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.89.2.5 2010/01/06 23:16:20 nijtmans Exp $
*/
#include "tkInt.h"
@@ -3310,7 +3310,7 @@ Tk_PkgInitStubsCheck(
int count = 0;
while (*p) {
- count += !isdigit(*p++);
+ count += !isdigit(UCHAR(*p++));
}
if (count == 1) {
if (0 != strncmp(version, actualVersion, strlen(version))) {
diff --git a/unix/.cvsignore b/unix/.cvsignore
new file mode 100644
index 0000000..b7d27ab
--- /dev/null
+++ b/unix/.cvsignore
@@ -0,0 +1,7 @@
+autom4te.cache
+tkConfig.sh
+Makefile
+config.status
+*.dll
+*.a
+*.exe
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 06be531..8aa2e80 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.143.2.6 2009/10/15 17:48:50 dgp Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.143.2.7 2010/01/06 23:16:20 nijtmans Exp $
# Current Tk version; used in various names.
@@ -201,7 +201,7 @@ SHELL = @SHELL@
# path. Targets that need an installed tclsh should not depend
# on this variable.
-BUILD_TCLSH = @BUILD_TCLSH@
+BUILD_TCLSH = @BUILD_TCLSH@@EXEEXT@
# TCL_EXE is the name of a tclsh executable that is available *BEFORE*
# running make for the first time. Certain build targets (make genstubs)
@@ -566,7 +566,7 @@ SHELL_ENV = \
all: binaries libraries doc
-binaries: ${LIB_FILE} ${STUB_LIB_FILE} ${TK_BUILD_EXP_FILE} wish
+binaries: ${LIB_FILE} ${STUB_LIB_FILE} ${TK_BUILD_EXP_FILE} wish@EXEEXT@
libraries:
@@ -607,9 +607,9 @@ tkLibObjs:
objs: ${OBJS}
-wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@
+wish@EXEEXT@: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@
${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \
- $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o wish
+ $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o wish@EXEEXT@
# Resetting the LIB_RUNTIME_DIR below is required so that
# the generated tktest executable gets the build directory
@@ -617,12 +617,12 @@ wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@
# picking up an already installed version of the Tcl or
# Tk shared libraries.
-tktest: $(TKTEST_OBJS) $(TK_LIB_FILE)
+tktest@EXEEXT@: $(TKTEST_OBJS) $(TK_LIB_FILE)
$(MAKE) tktest-real LIB_RUNTIME_DIR="`pwd`:$(TCL_BIN_DIR)"
tktest-real:
${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ \
- $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o tktest
+ $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o tktest@EXEEXT@
# FIXME: This xttest rule seems to be broken in a number of ways.
# It should use CC_SEARCH_FLAGS, it does not include the shared
@@ -642,41 +642,41 @@ xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
test: test-classic test-ttk
-test-classic: tktest
- $(SHELL_ENV) ./tktest $(TEST_DIR)/all.tcl -geometry +0+0 $(TESTFLAGS)
+test-classic: tktest@EXEEXT@
+ $(SHELL_ENV) ./tktest@EXEEXT@ $(TEST_DIR)/all.tcl -geometry +0+0 $(TESTFLAGS)
-test-ttk: tktest
- $(SHELL_ENV) ./tktest $(TEST_DIR)/ttk/all.tcl -geometry +0+0 \
+test-ttk: tktest@EXEEXT@
+ $(SHELL_ENV) ./tktest@EXEEXT@ $(TEST_DIR)/ttk/all.tcl -geometry +0+0 \
$(TESTFLAGS)
# Tests with different languages
-testlang: tktest
+testlang: tktest@EXEEXT@
$(SHELL_ENV) \
for lang in $(LOCALES) ; \
do \
LANG=$(lang); export LANG; \
- ./tktest $(TEST_DIR)/all.tcl -geometry +0+0 \
+ ./tktest@EXEEXT@ $(TEST_DIR)/all.tcl -geometry +0+0 \
$(TESTFLAGS); \
done
# Useful target to launch a built tktest with the proper path,...
-runtest: tktest
- $(SHELL_ENV) ./tktest
+runtest: tktest@EXEEXT@
+ $(SHELL_ENV) ./tktest@EXEEXT@
# This target can be used to run wish from the build directory
# via `make shell` or `make shell SCRIPT=/tmp/foo.tcl`
-shell: wish
- $(SHELL_ENV) ./wish $(SCRIPT)
+shell: wish@EXEEXT@
+ $(SHELL_ENV) ./wish@EXEEXT@ $(SCRIPT)
demo:
- $(SHELL_ENV) ./wish $(TOP_DIR)/library/demos/widget
+ $(SHELL_ENV) ./wish@EXEEXT@ $(TOP_DIR)/library/demos/widget
# This target can be used to run wish inside either gdb or insight
-gdb: wish
+gdb: wish@EXEEXT@
@echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run
@echo "set env TCL_LIBRARY=@TCL_SRC_DIR@/library" >> gdb.run
@echo "set env TK_LIBRARY=@TK_SRC_DIR@/library" >> gdb.run
- gdb ./wish --command=gdb.run
+ gdb ./wish@EXEEXT@ --command=gdb.run
rm gdb.run
INSTALL_TARGETS = install-binaries install-libraries install-demos install-doc @EXTRA_INSTALL@
@@ -692,7 +692,7 @@ install-strip:
# some ranlibs write to current directory, and this might not always be
# possible (e.g. if installing as root).
-install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
+install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish@EXEEXT@
@for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" \
"$(PKG_INSTALL_DIR)" "$(CONFIG_INSTALL_DIR)" ; \
do \
@@ -724,8 +724,8 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
$(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \
"$(LIB_INSTALL_DIR)"/$(TK_EXP_FILE); \
fi
- @echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"
- @$(INSTALL_PROGRAM) wish "$(BIN_INSTALL_DIR)"/wish$(VERSION)
+ @echo "Installing wish@EXEEXT@ as $(BIN_INSTALL_DIR)/wish$(VERSION)@EXEEXT@"
+ @$(INSTALL_PROGRAM) wish@EXEEXT@ "$(BIN_INSTALL_DIR)"/wish$(VERSION)@EXEEXT@
@echo "Installing tkConfig.sh to $(CONFIG_INSTALL_DIR)/"
@$(INSTALL_DATA) tkConfig.sh "$(CONFIG_INSTALL_DIR)"/tkConfig.sh
@if test "$(STUB_LIB_FILE)" != "" ; then \
@@ -873,7 +873,7 @@ Makefile: $(UNIX_DIR)/Makefile.in
clean:
rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \
- errors wish tktest lib.exp Tk *.rsrc
+ errors wish@EXEEXT@ tktest@EXEEXT@ lib.exp Tk *.rsrc
distclean: clean
rm -rf Makefile config.status config.cache config.log tkConfig.sh \
@@ -890,7 +890,7 @@ depend:
# execute concurrently with the renaming and recompiling of that same object
# file in the target below.
-tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish
+tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish@EXEEXT@
@if test -f tkAppInit.o ; then \
rm -f tkAppInit.sav; \
mv tkAppInit.o tkAppInit.sav; \
diff --git a/unix/configure b/unix/configure
index 200d652..b38b7ac 100755
--- a/unix/configure
+++ b/unix/configure
@@ -5210,6 +5210,16 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
+ CYGWIN_*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD='${CC} -shared'
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
dgux*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD='${CC} -G'
@@ -5220,6 +5230,83 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
+ Haiku*)
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-lroot"
+ echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
+echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
+if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnetwork $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* 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 inet_ntoa ();
+int
+main ()
+{
+inet_ntoa ();
+ ;
+ 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
+ ac_cv_lib_network_inet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_network_inet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
+if test $ac_cv_lib_network_inet_ntoa = yes; then
+ LIBS="$LIBS -lnetwork"
+fi
+
+ ;;
HP-UX-*.11.*)
# Use updated header definitions where possible
@@ -5820,7 +5907,7 @@ fi
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
- NetBSD-*|FreeBSD-*)
+ NetBSD-*|FreeBSD-[3-4].*)
# FreeBSD 3.* and greater have ELF.
# NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
SHLIB_CFLAGS="-fPIC"
@@ -5854,6 +5941,36 @@ fi
;;
esac
;;
+ FreeBSD-*)
+ # This configuration from FreeBSD Ports.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -shared"
+ TCL_SHLIB_LD_EXTRAS="-soname \$@"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ if test $doRpath = yes; then
+
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+fi
+
+ if test "${TCL_THREADS}" = "1"; then
+
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
+fi
+
+ # Version numbers are dot-stripped by system policy.
+ TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
@@ -7038,6 +7155,7 @@ fi
case $system in
AIX-*) ;;
BSD/OS*) ;;
+ CYGWIN_*) ;;
IRIX*) ;;
NetBSD-*|FreeBSD-*) ;;
Darwin-*) ;;
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 5d64a76..d7ca5a2 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -265,7 +265,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# Load the tclConfig.sh file
#
# Arguments:
-#
+#
# Requires the following vars to be set:
# TCL_BIN_DIR
#
@@ -351,7 +351,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
# Load the tkConfig.sh file
#
# Arguments:
-#
+#
# Requires the following vars to be set:
# TK_BIN_DIR
#
@@ -506,7 +506,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -551,7 +551,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -599,7 +599,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -742,13 +742,13 @@ AC_DEFUN([SC_ENABLE_THREADS], [
#
# 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:
@@ -816,7 +816,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Adds the following arguments to configure:
@@ -846,14 +846,14 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [
if test $tcl_cv_langinfo_h = yes; then
AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_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
@@ -1027,7 +1027,7 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [
# 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.
@@ -1280,6 +1280,16 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
+ CYGWIN_*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD='${CC} -shared'
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
dgux*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD='${CC} -G'
@@ -1290,6 +1300,16 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
+ Haiku*)
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-lroot"
+ AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
+ ;;
HP-UX-*.11.*)
# Use updated header definitions where possible
AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
@@ -1426,7 +1446,7 @@ dnl AC_CHECK_TOOL(AR, ar)
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"
@@ -1559,7 +1579,7 @@ dnl AC_CHECK_TOOL(AR, ar)
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
- NetBSD-*|FreeBSD-*)
+ NetBSD-*|FreeBSD-[[3-4]].*)
# FreeBSD 3.* and greater have ELF.
# NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
SHLIB_CFLAGS="-fPIC"
@@ -1587,6 +1607,30 @@ dnl AC_CHECK_TOOL(AR, ar)
;;
esac
;;
+ FreeBSD-*)
+ # This configuration from FreeBSD Ports.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -shared"
+ TCL_SHLIB_LD_EXTRAS="-soname \$[@]"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ AS_IF([test $doRpath = yes], [
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
+ AS_IF([test "${TCL_THREADS}" = "1"], [
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+ # Version numbers are dot-stripped by system policy.
+ TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
@@ -1691,8 +1735,8 @@ dnl AC_CHECK_TOOL(AR, ar)
eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
done])
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)
AS_IF([test "$fat_32_64" = yes], [
@@ -1702,7 +1746,7 @@ dnl AC_CHECK_TOOL(AR, ar)
LIBS=$hold_libs])
AS_IF([test $tcl_cv_lib_corefoundation = yes], [
LIBS="$LIBS -framework CoreFoundation"
- AC_DEFINE(HAVE_COREFOUNDATION, 1,
+ AC_DEFINE(HAVE_COREFOUNDATION, 1,
[Do we have access to Darwin CoreFoundation.framework?])
], [tcl_corefoundation=no])
AS_IF([test "$fat_32_64" = yes -a $tcl_corefoundation = yes],[
@@ -1711,8 +1755,8 @@ dnl AC_CHECK_TOOL(AR, ar)
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
@@ -1740,7 +1784,7 @@ dnl AC_CHECK_TOOL(AR, ar)
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
SHLIB_CFLAGS=""
@@ -2065,6 +2109,7 @@ dnl # preprocessing tests use only CPPFLAGS.
case $system in
AIX-*) ;;
BSD/OS*) ;;
+ CYGWIN_*) ;;
IRIX*) ;;
NetBSD-*|FreeBSD-*) ;;
Darwin-*) ;;
@@ -2157,7 +2202,7 @@ dnl # preprocessing tests use only CPPFLAGS.
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines only one of the following vars:
@@ -2276,7 +2321,7 @@ int main() {
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
@@ -2362,7 +2407,7 @@ closedir(d);
#
# Arguments:
# none
-#
+#
# Results:
#
# Sets the the following vars:
@@ -2440,13 +2485,13 @@ AC_DEFUN([SC_PATH_X], [
# 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:
@@ -2490,7 +2535,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Defines some of the following vars:
@@ -2561,7 +2606,7 @@ AC_DEFUN([SC_TIME_HANDLER], [
#
# Arguments:
# none
-#
+#
# Results:
#
# Might defines some of the following vars:
@@ -2611,7 +2656,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [
#
# Arguments:
# None.
-#
+#
# Results:
#
# Might append to the following vars:
@@ -2684,7 +2729,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2730,7 +2775,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2752,8 +2797,8 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
# 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)): ;
+ 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, 1, [Are wide integers to be implemented with C 'long's?])
@@ -2872,7 +2917,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -2939,7 +2984,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3011,11 +3056,11 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [
#--------------------------------------------------------------------
# SC_TCL_GETADDRINFO
#
-# Check if we have 'getaddrinfo' for hostname lookup and inet6/ipv6
+# Check if we have 'getaddrinfo'
#
# Arguments:
# None
-#
+#
# Results:
# Might define the following vars:
# HAVE_GETADDRINFO
@@ -3047,7 +3092,7 @@ AC_DEFUN([SC_TCL_GETADDRINFO], [AC_CHECK_FUNC(getaddrinfo, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3107,7 +3152,7 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3167,7 +3212,7 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars:
@@ -3227,7 +3272,7 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [
#
# Arguments:
# None
-#
+#
# Results:
#
# Might define the following vars: