diff options
author | das <das> | 2005-11-27 02:36:46 (GMT) |
---|---|---|
committer | das <das> | 2005-11-27 02:36:46 (GMT) |
commit | 1b9cdb47165d048a72acb062ead0a15fa722c256 (patch) | |
tree | 7ab2d749c35dad34d628970ddcc55bf506c6aace /unix/tcl.m4 | |
parent | 10e80a6dc5f569368be5a75752fa8e6071a2777b (diff) | |
download | tk-1b9cdb47165d048a72acb062ead0a15fa722c256.zip tk-1b9cdb47165d048a72acb062ead0a15fa722c256.tar.gz tk-1b9cdb47165d048a72acb062ead0a15fa722c256.tar.bz2 |
* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to
configure (flag can't be present twice, so can't be in both CFLAGS and
LDFLAGS during configure), don't use -prebind when deploying on 10.4,
define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542).
(SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete
autoconf macros. Sync with tk/unix/tcl.m4, sync whitespace with HEAD.
* unix/configure.in: fix obsolete autoconf macros, sync gratuitous
formatting/ordering differences with tcl/unix/configure.in.
* unix/Makefile.in: add CFLAGS to wish/tktest link to make executable
linking the same as during configure (needed to avoid loosing any linker
relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS).
Avoid concurrent linking of wish and compiling of tkTestInit.o during
parallel make, fix dependencies and flags for building tkMacOSXInit.o
(checkstubs, checkexports): dependency and Darwin fixes
* macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent):
* macosx/tkMacOSXEvent.h:
* macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent):
* macosx/tkMacOSXCarbonEvents.c: install standard application event
handler, add & call functions to start and stop carbon even timer that
runs the tcl event loop periodically during a nested carbon event loop
in the toolbox (e.g. during menutracking) to ensure tcl timers etc
continue to fire, register app event handler for menu tracking and HI
command carbon events, move menu event handling to new handlers for
those carbon events, no longer register for/handle appleevent carbon
event (now dealt with by standard application event handler), event
debugging code dynamically acquires carbon event debugging functions to
allow use on Tiger where they are no longer exported from HIToolbox.
* macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText):
* macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout):
* macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents):
* macosx/tkMacOSXInit.c:
* macosx/tkMacOSXInt.h: abstract common code to dynamically acquire
address of a named symbol (from a loaded dynamic library) into new
function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol.
* macosx/tkMacOSXMenu.c (TkpNewMenu):
* macosx/tkMacOSXMenubutton.c (MenuButtonInitControl):
* macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to modern
utf8 aware menu manager API, remove obsolete code, add error handling.
* macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants
if necessary to allow compilation on OSX 10.2
* macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never
executed.
* generic/tk.h: add/correct location of version numbers in macosx files.
* generic/tkInt.h: clarify fat compile comment.
* macosx/Wish.pbproj/default.pbxuser (new file):
* macosx/Wish.pbproj/jingham.pbxuser:
* macosx/Wish.pbproj/project.pbxproj: sync with HEAD.
* macosx/buildTkConfig.tcl (removed): remove obsolete build files.
* macosx/README: clarification/cleanup, sync with HEAD, document
universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time).
* macosx/Makefile: add support for reusing configure cache, build target
fixes.
* generic/tkMenu.c:
* macosx/tkMacOSXButton.c:
* macosx/tkMacOSXDebug.c:
* macosx/tkMacOSXDebug.h:
* macosx/tkMacOSXDialog.c:
* macosx/tkMacOSXDraw.c:
* macosx/tkMacOSXEntry.c:
* macosx/tkMacOSXMenu.c:
* macosx/tkMacOSXMouseEvent.c:
* macosx/tkMacOSXXStubs.c:
* macosx/tkMacOSXSubwindows.c:
* xlib/xgc.c: declare functions and globals used only in own file as
static, #ifdef out a few Xlib and aqua functions that are never called
(sync with HEAD).
* macosx/tkMacOSXPort.h:
* generic/tkInt.decls: correct signature of TkMacOSXHandleMenuSelect,
add XSync to aqua Xlib stubs.
* generic/tkTest.c: #ifdef unix only declarations.
(TestmetricsCmd): unify win and mac implementation.
* generic/tkTextDisp.c:
* generic/tkTextBTree.c:
* macosx/tkMacOSXInit.c:
* macosx/tkMacOSXKeyEvent.c:
* macosx/tkMacOSXWindowEvent.c:
* macosx/tkMacOSXXStubs.c: fix gcc 4 warnings.
* macosx/tkMacOSXNotify.c:
* macosx/tkMacOSXTest.c: sync with HEAD.
* generic/tkIntPlatDecls.h:
* generic/tkIntXlibDecls.h:
* generic/tkStubInit.c:
* unix/configure: regen.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 142 |
1 files changed, 86 insertions, 56 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 4ab705f..e8e5dc2 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -659,22 +659,20 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [ 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_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) fi + else + AC_MSG_RESULT([$langinfo_ok]) fi - AC_MSG_RESULT([$langinfo_ok]) ]) #-------------------------------------------------------------------- @@ -703,44 +701,44 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [ # according to the user's selection. # #-------------------------------------------------------------------- -AC_DEFUN(SC_CONFIG_MANPAGES, [ - AC_MSG_CHECKING([whether to use symlinks for manpages]) - AC_ARG_ENABLE(man-symlinks, - [ --enable-man-symlinks use symlinks for the manpages], - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks", - enableval="no") - AC_MSG_RESULT([$enableval]) - - AC_MSG_CHECKING([whether to compress the manpages]) - AC_ARG_ENABLE(man-compression, - [ --enable-man-compression=PROG - compress the manpages with PROG], - test "$enableval" = "yes" && AC_MSG_ERROR([missing argument to --enable-man-compression]) - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval", - enableval="no") - AC_MSG_RESULT([$enableval]) - if test "$enableval" != "no"; then - AC_MSG_CHECKING([for compressed file suffix]) - touch TeST - $enableval TeST - Z=`ls TeST* | sed 's/^....//'` - rm -f TeST* - MAN_FLAGS="$MAN_FLAGS --extension $Z" - AC_MSG_RESULT([$Z]) - fi +AC_DEFUN(SC_CONFIG_MANPAGES, [ + AC_MSG_CHECKING([whether to use symlinks for manpages]) + AC_ARG_ENABLE(man-symlinks, + [ --enable-man-symlinks use symlinks for the manpages], + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks", + enableval="no") + AC_MSG_RESULT([$enableval]) + + AC_MSG_CHECKING([whether to compress the manpages]) + AC_ARG_ENABLE(man-compression, + [ --enable-man-compression=PROG + compress the manpages with PROG], + test "$enableval" = "yes" && AC_MSG_ERROR([missing argument to --enable-man-compression]) + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval", + enableval="no") + AC_MSG_RESULT([$enableval]) + if test "$enableval" != "no"; then + AC_MSG_CHECKING([for compressed file suffix]) + touch TeST + $enableval TeST + Z=`ls TeST* | sed 's/^....//'` + rm -f TeST* + MAN_FLAGS="$MAN_FLAGS --extension $Z" + AC_MSG_RESULT([$Z]) + fi - AC_MSG_CHECKING([whether to add a package name suffix for the manpages]) - AC_ARG_ENABLE(man-suffix, - [ --enable-man-suffix=STRING - use STRING as a suffix to manpage file names - (default: $1)], - test "$enableval" = "yes" && enableval="$1" - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval", - enableval="no") - AC_MSG_RESULT([$enableval]) - - AC_SUBST(MAN_FLAGS) + AC_MSG_CHECKING([whether to add a package name suffix for the manpages]) + AC_ARG_ENABLE(man-suffix, + [ --enable-man-suffix=STRING + use STRING as a suffix to manpage file names + (default: $1)], + test "$enableval" = "yes" && enableval="$1" + test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval", + enableval="no") + AC_MSG_RESULT([$enableval]) + + AC_SUBST(MAN_FLAGS) ]) #-------------------------------------------------------------------- @@ -956,7 +954,7 @@ dnl AC_CHECK_TOOL(AR, ar) 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" @@ -1267,6 +1265,18 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS="$CFLAGS -mieee" fi ;; + Lynx*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + CFLAGS_OPTIMIZE=-02 + SHLIB_LD="${CC} -shared " + DL_OBJS="tclLoadDl.o" + DL_LIBS="-mshared -ldl" + LD_FLAGS="-Wl,--export-dynamic" + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" @@ -1405,7 +1415,11 @@ dnl AC_CHECK_TOOL(AR, ar) 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" @@ -1418,7 +1432,12 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names" + # Don't use -prebind when building for Mac OS X 10.4 or later only: + if test -z "${MACOSX_DEPLOYMENT_TARGET}" -o \ + `echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'` -lt 4; then + LDFLAGS="$LDFLAGS -prebind" + fi + 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" @@ -1438,12 +1457,18 @@ dnl AC_CHECK_TOOL(AR, ar) AC_MSG_RESULT([$tcl_corefoundation]) if test $tcl_corefoundation = yes; then AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [ - hold_libs=$LIBS + hold_libs=$LIBS; hold_cflags=$CFLAGS + if test $do64bit_ok = no ; then + # remove -arch ppc64 from CFLAGS while testing presence + # of CF, otherwise all archs will have CF disabled. + # CF for ppc64 is disabled in tclUnixPort.h instead. + CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/'`" + fi LIBS="$LIBS -framework CoreFoundation" AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>], [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no) - LIBS=$hold_libs]) + LIBS=$hold_libs; CFLAGS=$hold_cflags]) if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" AC_DEFINE(HAVE_COREFOUNDATION) @@ -1451,14 +1476,17 @@ dnl AC_CHECK_TOOL(AR, ar) fi AC_CHECK_HEADERS(libkern/OSAtomic.h) AC_CHECK_FUNCS(OSSpinLockLock) + AC_CHECK_HEADERS(copyfile.h) + AC_CHECK_FUNCS(copyfile) AC_DEFINE(MAC_OSX_TCL) AC_DEFINE(USE_VFORK) AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8") AC_DEFINE(TCL_LOAD_FROM_MEMORY) + AC_DEFINE(TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING) # prior to Darwin 7, realpath is not threadsafe, so don't # use it when threads are enabled, c.f. bug # 711232: AC_CHECK_FUNC(realpath) - if test "$ac_cv_func_realpath" = yes -a "${TCL_THREADS}" = 1 \ + if test $ac_cv_func_realpath = yes -a "${TCL_THREADS}" = 1 \ -a `uname -r | awk -F. '{print [$]1}'` -lt 7 ; then ac_cv_func_realpath=no fi @@ -2165,9 +2193,7 @@ closedir(d); AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). - AC_HAVE_HEADERS(unistd.h sys/param.h) - ]) #-------------------------------------------------------------------- @@ -2255,6 +2281,7 @@ AC_DEFUN(SC_PATH_X, [ XLIBSW=-lX11 fi ]) + #-------------------------------------------------------------------- # SC_BLOCKING_STYLE # @@ -2371,7 +2398,7 @@ AC_DEFUN(SC_TIME_HANDLER, [ # (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; @@ -2553,6 +2580,7 @@ AC_DEFUN(SC_TCL_LINK_LIBS, [ # Might define the following vars: # _ISOC99_SOURCE # _LARGEFILE64_SOURCE +# _LARGEFILE_SOURCE64 # #-------------------------------------------------------------------- @@ -2575,6 +2603,8 @@ AC_DEFUN(SC_TCL_EARLY_FLAGS,[ [char *p = (char *)strtoll; char *q = (char *)strtoull;]) SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>], [struct stat64 buf; int i = stat64("/", &buf);]) + SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>], + [char *p = (char *)open64;]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT(none) else @@ -2652,7 +2682,7 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [ if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then - AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?]) + AC_DEFINE(HAVE_TYPE_OFF64_T) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) |