diff options
author | das <das> | 2005-04-26 00:46:01 (GMT) |
---|---|---|
committer | das <das> | 2005-04-26 00:46:01 (GMT) |
commit | 24fcde64c436af06b6824359ff50920a2933af27 (patch) | |
tree | d2c829948c33b0a374795c6a0e4bc7713a578d48 /unix/tcl.m4 | |
parent | e3d20a2783044861949b7a0230410548b1c59982 (diff) | |
download | tcl-24fcde64c436af06b6824359ff50920a2933af27.zip tcl-24fcde64c436af06b6824359ff50920a2933af27.tar.gz tcl-24fcde64c436af06b6824359ff50920a2933af27.tar.bz2 |
* compat/string.h: fixed memchr() protoype for __APPLE__ so that we
build on Mac OS X 10.1 again.
* generic/tclNotify.c (TclFinalizeNotifier): fixed notifier not being
finalized in unthreaded core (was testing for notifier initialization in
current thread by checking thread id != 0 but thread id is always 0 in
untreaded core).
* unix/tclUnixNotfy.c (Tcl_WaitForEvent): sync with HEAD: only declare
and use timeout var in unthreaded core.
* unix/Makefile.in: added @PLAT_SRCS@ to SRCS and split out NOTIFY_SRCS
from UNIX_SRCS for parity with UNIX_OBJS & NOTIFY_OBJS.
* unix/configure.in: only run check for broken strstr implementation if
AC_REPLACE_FUNCS(strstr) hasn't already determined that strstr is
unavailable, otherwise compat/strstr.o will be used twice (resulting in
duplicate symbol link errors on Mac OS X 10.1)
* unix/tcl.m4 (Darwin): added configure checks for recently added linker
flags -single_module and -search_paths_first to allow building with
older tools (and on Mac OS X 10.1), use -single_module in SHLIB_LD and
not just T{CL,K}_SHLIB_LD_EXTRAS, added unexporting from Tk of symbols
from libtclstub to avoid duplicate symbol warnings, added PLAT_SRCS
definition for Mac OS X.
(SC_MISSING_POSIX_HEADERS): added caching of dirent.h check.
(SC_TCL_64BIT_FLAGS): fixed 'checking for off64_t' message output.
* unix/configure: autoconf-2.13
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index ccd9946..5eb6c72 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -887,6 +887,7 @@ dnl AC_CHECK_TOOL(AR, ar) STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" PLAT_OBJS="" + PLAT_SRCS="" case $system in AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then @@ -1357,25 +1358,42 @@ dnl AC_CHECK_TOOL(AR, ar) esac ;; Darwin-*) + CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" SHLIB_LD="cc -dynamiclib \${LDFLAGS}" - TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version \${VERSION} -install_name \${DYLIB_INSTALL_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000 -Wl,-single_module" - TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version \${VERSION} -install_name \${DYLIB_INSTALL_DIR}/\${TK_LIB_FILE} -prebind -seg1addr 0xb000000 -Wl,-single_module" + 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" - PLAT_OBJS=\$\(MAC\_OSX_OBJS\) DL_LIBS="" - LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first" + LDFLAGS="$LDFLAGS -prebind" + 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 CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" - CFLAGS_OPTIMIZE="-Os" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + PLAT_OBJS=\$\(MAC\_OSX_OBJS\) + PLAT_SRCS=\$\(MAC\_OSX_SRCS\) + TCL_SHLIB_LD_EXTRAS='-compatibility_version ${VERSION} -current_version ${VERSION} -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000' + TK_SHLIB_LD_EXTRAS=' -compatibility_version ${VERSION} -current_version ${VERSION} -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | tail +3 > $$f && echo $$f)' + LIBS="$LIBS -framework CoreFoundation" AC_DEFINE(MAC_OSX_TCL) AC_DEFINE(HAVE_CFBUNDLE) AC_DEFINE(USE_VFORK) AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8") - LIBS="$LIBS -framework CoreFoundation" ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -1837,6 +1855,7 @@ dnl esac AC_SUBST(DL_OBJS) AC_SUBST(PLAT_OBJS) + AC_SUBST(PLAT_SRCS) AC_SUBST(CFLAGS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) @@ -2016,6 +2035,7 @@ int main() { AC_DEFUN(SC_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 @@ -2035,9 +2055,9 @@ d = opendir("foobar"); 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 + if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H) fi @@ -2545,12 +2565,12 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [ fi AC_MSG_RESULT(${tcl_cv_struct_stat64}) + AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset; ], tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) - AC_CHECK_FUNCS(open64 lseek64) 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" && \ |