summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordas <das>2006-07-20 06:27:34 (GMT)
committerdas <das>2006-07-20 06:27:34 (GMT)
commit472d82cf26c06e8d849e9ff1ed4af3f0a2154ddc (patch)
tree9bccc02d5eafea499475873df3d395542f54fa85 /unix/tcl.m4
parente673c7b95612047bc886329eda3d26e3e7807c9b (diff)
downloadtk-472d82cf26c06e8d849e9ff1ed4af3f0a2154ddc.zip
tk-472d82cf26c06e8d849e9ff1ed4af3f0a2154ddc.tar.gz
tk-472d82cf26c06e8d849e9ff1ed4af3f0a2154ddc.tar.bz2
* macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support
for weakly importing symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/README: document how to enable weak-linking; cleanup. * unix/configure.in: enforce requirement of OSX 10.2 for TkAqua; move * unix/tcl.m4: Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting. * unix/configure: autoconf-2.13 * macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr. * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be * macosx/tkMacOSXMenubutton.c: overriden on command line (from default * macosx/tkMacOSXMenus.c: of current OS version). * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXWm.c:
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m483
1 files changed, 35 insertions, 48 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 57b053e..f81af6d 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -539,32 +539,32 @@ AC_DEFUN([SC_ENABLE_SHARED], [
#------------------------------------------------------------------------
AC_DEFUN([SC_ENABLE_FRAMEWORK], [
- AC_MSG_CHECKING([how to package libraries])
- AC_ARG_ENABLE(framework,
- [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]],
- [tcl_ok=$enableval], [tcl_ok=no])
-
- if test "${enable_framework+set}" = set; then
- enableval="$enable_framework"
- tcl_ok=$enableval
- else
- tcl_ok=no
- fi
-
- if test "$tcl_ok" = "yes" ; then
- AC_MSG_RESULT([framework])
- FRAMEWORK_BUILD=1
- if test "${SHARED_BUILD}" = "0" ; then
- AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes])
- FRAMEWORK_BUILD=0
+ if test "`uname -s`" = "Darwin" ; then
+ AC_MSG_CHECKING([how to package libraries])
+ AC_ARG_ENABLE(framework,
+ [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]],
+ [enable_framework=$enableval], [enable_framework=no])
+ if test $enable_framework = yes; then
+ if test $SHARED_BUILD = 0; then
+ AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes])
+ enable_framework=no
+ fi
+ if test $tcl_corefoundation = no; then
+ AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available])
+ enable_framework=no
+ fi
fi
- if test $tcl_corefoundation = no; then
- AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available])
+ if test $enable_framework = yes; then
+ AC_MSG_RESULT([framework])
+ FRAMEWORK_BUILD=1
+ else
+ if test $SHARED_BUILD = 1; then
+ AC_MSG_RESULT([shared library])
+ else
+ AC_MSG_RESULT([static library])
+ fi
FRAMEWORK_BUILD=0
fi
- else
- AC_MSG_RESULT([standard shared library])
- FRAMEWORK_BUILD=0
fi
])
@@ -1603,24 +1603,11 @@ dnl AC_CHECK_TOOL(AR, ar)
if test $tcl_cv_lib_corefoundation = yes; then
LIBS="$LIBS -framework CoreFoundation"
AC_DEFINE(HAVE_COREFOUNDATION)
- AC_CHECK_HEADERS(libkern/OSAtomic.h)
- AC_CHECK_FUNCS(OSSpinLockLock)
- AC_CHECK_FUNCS(pthread_atfork)
+ else
+ tcl_corefoundation=no
fi
fi
- 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)
- # 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 \
- -a `uname -r | awk -F. '{print [$]1}'` -lt 7 ; then
- ac_cv_func_realpath=no
- fi
;;
NEXTSTEP-*)
SHLIB_CFLAGS=""
@@ -2266,7 +2253,7 @@ int main() {
#--------------------------------------------------------------------
AC_DEFUN([SC_MISSING_POSIX_HEADERS], [
- AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h,
+ AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
AC_TRY_LINK([#include <sys/types.h>
#include <dirent.h>], [
#ifndef _POSIX_SOURCE
@@ -2286,7 +2273,7 @@ d = opendir("foobar");
entryPtr = readdir(d);
p = entryPtr->d_name;
closedir(d);
-], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no))
+], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
if test $tcl_cv_dirent_h = no; then
AC_DEFINE(NO_DIRENT_H)
@@ -2484,16 +2471,16 @@ AC_DEFUN([SC_TIME_HANDLER], [
AC_CHECK_FUNCS(gmtime_r localtime_r)
- AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj,
+ AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
- tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
+ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)])
if test $tcl_cv_member_tm_tzadj = yes ; then
AC_DEFINE(HAVE_TM_TZADJ)
fi
- AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff,
+ AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
- tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
+ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
if test $tcl_cv_member_tm_gmtoff = yes ; then
AC_DEFINE(HAVE_TM_GMTOFF)
fi
@@ -2502,24 +2489,24 @@ AC_DEFUN([SC_TIME_HANDLER], [
# Its important to include time.h in this check, as some systems
# (like convex) have timezone functions, etc.
#
- AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long,
+ AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
AC_TRY_COMPILE([#include <time.h>],
[extern long timezone;
timezone += 1;
exit (0);],
- tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
+ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
if test $tcl_cv_timezone_long = yes ; then
AC_DEFINE(HAVE_TIMEZONE_VAR)
else
#
# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
#
- AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time,
+ AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
AC_TRY_COMPILE([#include <time.h>],
[extern time_t timezone;
timezone += 1;
exit (0);],
- tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
+ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
if test $tcl_cv_timezone_time = yes ; then
AC_DEFINE(HAVE_TIMEZONE_VAR)
fi