summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authordas <das>2005-11-27 02:36:46 (GMT)
committerdas <das>2005-11-27 02:36:46 (GMT)
commit1b9cdb47165d048a72acb062ead0a15fa722c256 (patch)
tree7ab2d749c35dad34d628970ddcc55bf506c6aace /unix/configure.in
parent10e80a6dc5f569368be5a75752fa8e6071a2777b (diff)
downloadtk-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/configure.in')
-rw-r--r--unix/configure.in160
1 files changed, 79 insertions, 81 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 5af3a43..1ff7d96 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.83.2.23 2005/11/16 22:07:37 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.83.2.24 2005/11/27 02:44:26 das Exp $
AC_INIT(../generic/tk.h)
AC_PREREQ(2.13)
@@ -62,7 +62,25 @@ fi
AC_PROG_CC
-AC_HAVE_HEADERS([unistd.h limits.h])
+# limits header checks must come early to prevent
+# an autoconf bug that throws errors on configure
+AC_CHECK_HEADER(limits.h,
+ [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)])
+AC_HAVE_HEADERS(unistd.h)
+
+#--------------------------------------------------------------------
+# Supply a substitute for stdlib.h if it doesn't define strtol,
+# strtoul, or strtod (which it doesn't in some versions of SunOS).
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING(stdlib.h)
+AC_EGREP_HEADER(strtol, stdlib.h, tk_ok=yes, tk_ok=no)
+AC_EGREP_HEADER(strtoul, stdlib.h, , tk_ok=no)
+AC_EGREP_HEADER(strtod, stdlib.h, , tk_ok=no)
+if test $tk_ok = no; then
+ AC_DEFINE(NO_STDLIB_H)
+fi
+AC_MSG_RESULT($tk_ok)
#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
@@ -87,6 +105,17 @@ fi
SC_ENABLE_THREADS
+#--------------------------------------------------------------------
+# On a few very rare systems, all of the libm.a stuff is
+# already in libc.a. Set compiler flags accordingly.
+# Also, Linux requires the "ieee" library for math to work
+# right (and it must appear before "-lm").
+#--------------------------------------------------------------------
+
+MATH_LIBS=""
+AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
+AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
+
# Add the threads support libraries
LIBS="$LIBS$THREADS_LIBS"
@@ -131,77 +160,60 @@ fi
if test "$TCL_PREFIX" != "$prefix"; then
AC_MSG_WARN([
- Different --prefix selected for Tk and Tcl!
- [[package require Tk]] may not work correctly in tclsh.])
+ Different --prefix selected for Tk and Tcl!
+ [[package require Tk]] may not work correctly in tclsh.])
fi
#--------------------------------------------------------------------
-# On a few very rare systems, all of the libm.a stuff is
-# already in libc.a. Set compiler flags accordingly.
-# Also, Linux requires the "ieee" library for math to work
-# right (and it must appear before "-lm").
-#--------------------------------------------------------------------
-
-MATH_LIBS=""
-AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
-AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-#--------------------------------------------------------------------
-# On AIX systems, libbsd.a has to be linked in to support
-# non-blocking file IO. This library has to be linked in after
-# the MATH_LIBS or it breaks the pow() function. The way to
-# insure proper sequencing, is to add it to the tail of MATH_LIBS.
-# This library also supplies gettimeofday.
-#--------------------------------------------------------------------
-libbsd=no
-if test "`uname -s`" = "AIX" ; then
- AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes)
- if test $libbsd = yes; then
- MATH_LIBS="$MATH_LIBS -lbsd"
+# Include sys/select.h if it exists and if it supplies things
+# that appear to be useful and aren't already in sys/types.h.
+# This appears to be true only on the RS/6000 under AIX. Some
+# systems like OSF/1 have a sys/select.h that's of no use, and
+# other systems like SCO UNIX have a sys/select.h that's
+# pernicious. If "fd_set" isn't defined anywhere then set a
+# special flag.
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING([for fd_set in sys/types])
+AC_CACHE_VAL(tcl_cv_type_fd_set,
+ AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;],
+ tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no))
+AC_MSG_RESULT($tcl_cv_type_fd_set)
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ AC_MSG_CHECKING([for fd_mask in sys/select])
+ AC_CACHE_VAL(tcl_cv_grep_fd_mask,
+ AC_EGREP_HEADER(fd_mask, sys/select.h,
+ tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing))
+ AC_MSG_RESULT($tcl_cv_grep_fd_mask)
+ if test $tcl_cv_grep_fd_mask = present; then
+ AC_DEFINE(HAVE_SYS_SELECT_H)
+ tk_ok=yes
fi
fi
-
-#--------------------------------------------------------------------
-# Supply a substitute for stdlib.h if it doesn't define strtol,
-# strtoul, or strtod (which it doesn't in some versions of SunOS).
-#--------------------------------------------------------------------
-
-AC_MSG_CHECKING(stdlib.h)
-AC_HEADER_EGREP(strtol, stdlib.h, tk_ok=yes, tk_ok=no)
-AC_HEADER_EGREP(strtoul, stdlib.h, , tk_ok=no)
-AC_HEADER_EGREP(strtod, stdlib.h, , tk_ok=no)
if test $tk_ok = no; then
- AC_DEFINE(NO_STDLIB_H)
+ AC_DEFINE(NO_FD_SET)
fi
-AC_MSG_RESULT($tk_ok)
+
+#------------------------------------------------------------------------------
+# Find out all about time handling differences.
+#------------------------------------------------------------------------------
+
+AC_CHECK_HEADERS(sys/time.h)
+AC_HEADER_TIME
#--------------------------------------------------------------------
-# Include sys/select.h if it exists and if it supplies things
-# that appear to be useful and aren't already in sys/types.h.
-# This appears to be true only on the RS/6000 under AIX. Some
-# systems like OSF/1 have a sys/select.h that's of no use, and
-# other systems like SCO UNIX have a sys/select.h that's
-# pernicious. If "fd_set" isn't defined anywhere then set a
-# special flag.
+# Under Solaris 2.4, strtod returns the wrong value for the
+# terminating character under some conditions. Check for this
+# and if the problem exists use a substitute procedure
+# "fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------
-AC_MSG_CHECKING([fd_set and sys/select])
-AC_TRY_COMPILE([#include <sys/types.h>],
- [fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)
-if test $tk_ok = no; then
- AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)
- if test $tk_ok = yes; then
- AC_DEFINE(HAVE_SYS_SELECT_H)
- fi
-fi
-AC_MSG_RESULT($tk_ok)
-if test $tk_ok = no; then
- AC_DEFINE(NO_FD_SET)
-fi
+SC_BUGGY_STRTOD
#--------------------------------------------------------------------
-# Check for various typedefs and provide substitutes if
-# they don't exist.
+# Check for various typedefs and provide substitutes if
+# they don't exist.
#--------------------------------------------------------------------
AC_TYPE_MODE_T
@@ -209,22 +221,17 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T
-#------------------------------------------------------------------------------
-# Find out about time handling differences.
-#------------------------------------------------------------------------------
-
-AC_CHECK_HEADERS(sys/time.h)
-AC_HEADER_TIME
-
#-------------------------------------------
# In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------
AC_MSG_CHECKING([pw_gecos in struct pwd])
-AC_TRY_COMPILE([#include <pwd.h>],
- [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
-AC_MSG_RESULT($tk_ok)
-if test $tk_ok = yes; then
+AC_CACHE_VAL(tcl_cv_pwd_pw_gecos,
+ AC_TRY_COMPILE([#include <pwd.h>],
+ [struct passwd pwd; pwd.pw_gecos;],
+ tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no))
+AC_MSG_RESULT($tcl_cv_pwd_pw_gecos)
+if test $tcl_cv_pwd_pw_gecos = yes; then
AC_DEFINE(HAVE_PW_GECOS)
fi
@@ -370,15 +377,6 @@ fi
AC_C_CHAR_UNSIGNED
#--------------------------------------------------------------------
-# Under Solaris 2.4, strtod returns the wrong value for the
-# terminating character under some conditions. Check for this
-# and if the problem exists use a substitute procedure
-# "fixstrtod" (provided by Tcl) that corrects the error.
-#--------------------------------------------------------------------
-
-SC_BUGGY_STRTOD
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtk as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -414,7 +412,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
SC_ENABLE_FRAMEWORK
TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -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)'
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -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) | grep ^_ > $$f && echo $$f)'
fi
if test "$FRAMEWORK_BUILD" = "1" ; then