summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das>2006-07-20 06:25:18 (GMT)
committerdas <das>2006-07-20 06:25:18 (GMT)
commit472701c8e65c0becd4620bce71070564d0569287 (patch)
tree908cf8a88b6a313743cec6481241735b0ff1f9d2 /unix
parent516d2a2413bfa3330b641f88c3a940a54f790a60 (diff)
downloadtk-472701c8e65c0becd4620bce71070564d0569287.zip
tk-472701c8e65c0becd4620bce71070564d0569287.tar.gz
tk-472701c8e65c0becd4620bce71070564d0569287.tar.bz2
* macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support
* unix/tkUnixSend.c (Tk_GetUserInactiveTime): 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/Wish.xcodeproj/project.pbxproj: enable weak-linking; turn on extra warnings. * macosx/README: document how to enable weak-linking; cleanup. * unix/configure.in: add check on Darwin-X11 for ld support of -weak-l * unix/tcl.m4: flag and weak-link libXss if possible as it is not available before OSX 10.4; enforce requirement of OSX 10.2 for TkAqua; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; cleanup quoting and help messages. * unix/configure: autoconf-2.59 * unix/tkConfig.h.in: autoheader-2.59 * macosx/GNUmakefile: enable xft for TkX11 build. * macosx/tkMacOSXFont.c (TkMacOSXQuarzStartDraw, TkMacOSXQuarzEndDraw): verify validity of context returned from QDBeginCGContext() before use. * 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: * macosx/tkMacOSXFont.c (TkpMeasureCharsInContext): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure906
-rw-r--r--unix/configure.in74
-rw-r--r--unix/tcl.m4103
-rw-r--r--unix/tkConfig.h.in26
-rw-r--r--unix/tkUnix.c8
-rw-r--r--unix/tkUnixSend.c4
6 files changed, 233 insertions, 888 deletions
diff --git a/unix/configure b/unix/configure
index b1afd00..a24ea16 100755
--- a/unix/configure
+++ b/unix/configure
@@ -856,13 +856,12 @@ Optional Features:
--enable-shared build and link with shared libraries (default: on)
--enable-64bit enable 64bit support (default: off)
--enable-64bit-vis enable 64bit Sparc VIS support (default: off)
- --enable-corefoundation use CoreFoundation API on MacOSX (default: yes)
- --disable-load disallow dynamic loading and "load" command
- (default: enabled)
+ --enable-corefoundation use CoreFoundation API on MacOSX (default: on)
+ --enable-load allow dynamic loading and "load" command (default:
+ on)
--enable-symbols build with debugging symbols (default: off)
- --enable-aqua enable Aqua windowingsystem on Mac OS X (default:
- off)
- --enable-xft Use freetype/fontconfig/xft (default: off)
+ --enable-aqua use Aqua windowingsystem on Mac OS X (default: off)
+ --enable-xft use freetype/fontconfig/xft (default: off)
--enable-framework package shared libraries in MacOSX frameworks
(default: off)
@@ -4162,7 +4161,8 @@ echo $ECHO_N "checking for pthread_attr_get_np declaration... $ECHO_C" >&6
if test "${tcl_cv_grep_pthread_attr_get_np+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4297,7 +4297,8 @@ echo $ECHO_N "checking for pthread_getattr_np declaration... $ECHO_C" >&6
if test "${tcl_cv_grep_pthread_getattr_np+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5695,736 +5696,20 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_COREFOUNDATION 1
_ACEOF
-
-for ac_header in libkern/OSAtomic.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 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_objext'
- { (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_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to the tk lists. ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in OSSpinLockLock
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* 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 $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- 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
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in pthread_atfork
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* 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 $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- 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
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
+ else
+ tcl_corefoundation=no
fi
fi
-for ac_header in copyfile.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 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_objext'
- { (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_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------- ##
-## Report this to the tk lists. ##
-## ----------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in copyfile
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* 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 $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- 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
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
cat >>confdefs.h <<\_ACEOF
#define MAC_OSX_TCL 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define USE_VFORK 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_DEFAULT_ENCODING "utf-8"
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
#define MODULE_SCOPE __private_extern__
_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define TCL_LOAD_FROM_MEMORY 1
-_ACEOF
-
- # prior to Darwin 7, realpath is not threadsafe, so don't
- # use it when threads are enabled, c.f. bug # 711232:
- echo "$as_me:$LINENO: checking for realpath" >&5
-echo $ECHO_N "checking for realpath... $ECHO_C" >&6
-if test "${ac_cv_func_realpath+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define realpath to an innocuous variant, in case <limits.h> declares realpath.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define realpath innocuous_realpath
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char realpath (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef realpath
-
-/* 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 realpath ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_realpath) || defined (__stub___realpath)
-choke me
-#else
-char (*f) () = realpath;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != realpath;
- ;
- 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_func_realpath=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_realpath=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_realpath" >&5
-echo "${ECHO_T}$ac_cv_func_realpath" >&6
-
- 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=""
@@ -7996,7 +7281,8 @@ echo $ECHO_N "checking for fd_set in sys/types... $ECHO_C" >&6
if test "${tcl_cv_type_fd_set+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -8051,7 +7337,8 @@ echo $ECHO_N "checking for fd_mask in sys/select... $ECHO_C" >&6
if test "${tcl_cv_grep_fd_mask+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -8744,7 +8031,8 @@ echo $ECHO_N "checking pw_gecos in struct pwd... $ECHO_C" >&6
if test "${tcl_cv_pwd_pw_gecos+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -8805,6 +8093,8 @@ fi
#--------------------------------------------------------------------
if test "`uname -s`" = "Darwin" ; then
+ echo "$as_me:$LINENO: checking whether to use Aqua" >&5
+echo $ECHO_N "checking whether to use Aqua... $ECHO_C" >&6
# Check whether --enable-aqua or --disable-aqua was given.
if test "${enable_aqua+set}" = set; then
enableval="$enable_aqua"
@@ -8813,21 +8103,90 @@ else
tk_aqua=no
fi;
if test $tk_aqua = yes; then
- if test $tcl_corefoundation = no; then
- { echo "$as_me:$LINENO: WARNING: Aqua can only be used when CoreFoundation is available" >&5
+ if test $tcl_corefoundation = no; then
+ { echo "$as_me:$LINENO: WARNING: Aqua can only be used when CoreFoundation is available" >&5
echo "$as_me: WARNING: Aqua can only be used when CoreFoundation is available" >&2;}
- tk_aqua=no
- elif test ! -d /System/Library/Frameworks/Carbon.framework; then
- { echo "$as_me:$LINENO: WARNING: Aqua can only be used when Carbon is available" >&5
+ tk_aqua=no
+ fi
+ if test ! -d /System/Library/Frameworks/Carbon.framework; then
+ { echo "$as_me:$LINENO: WARNING: Aqua can only be used when Carbon is available" >&5
echo "$as_me: WARNING: Aqua can only be used when Carbon is available" >&2;}
- tk_aqua=no
- fi
+ tk_aqua=no
+ fi
+ if test "`uname -r | awk -F. '{print $1}'`" -lt 6; then
+ { echo "$as_me:$LINENO: WARNING: Aqua requires Mac OS X 10.2 or later" >&5
+echo "$as_me: WARNING: Aqua requires Mac OS X 10.2 or later" >&2;}
+ tk_aqua=no
+ fi
fi
+ echo "$as_me:$LINENO: result: $tk_aqua" >&5
+echo "${ECHO_T}$tk_aqua" >&6
if test $do64bit_ok = no ; then
# remove -arch ppc64 from CFLAGS for fat builds as neither Aqua nor X11
# can be built for 64bit at present (no 64bit GUI libraries).
CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
fi
+ if test $tk_aqua = no; then
+ # check if weak linking whole libraries is possible.
+ echo "$as_me:$LINENO: checking if ld accepts -weak-l flag" >&5
+echo $ECHO_N "checking if ld accepts -weak-l flag... $ECHO_C" >&6
+if test "${tcl_cv_ld_weak_l+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-weak-lm"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+double f = sin(1.0);
+ ;
+ 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
+ tcl_cv_ld_weak_l=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_ld_weak_l=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$hold_ldflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_weak_l" >&5
+echo "${ECHO_T}$tcl_cv_ld_weak_l" >&6
+ fi
else
tk_aqua=no
fi
@@ -9493,7 +8852,6 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
-
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS $XINCLUDES"
tk_oldLibs=$LIBS
@@ -9786,7 +9144,13 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_Xss_XScreenSaverQueryInfo" >&5
echo "${ECHO_T}$ac_cv_lib_Xss_XScreenSaverQueryInfo" >&6
if test $ac_cv_lib_Xss_XScreenSaverQueryInfo = yes; then
- XLIBSW="$XLIBSW -lXss -lXext"
+ if test "$tcl_cv_ld_weak_l" = yes; then
+ # On Darwin, weak link libXss if possible,
+ # as it is only available on Tiger or later.
+ XLIBSW="$XLIBSW -weak-lXss -lXext"
+ else
+ XLIBSW="$XLIBSW -lXss -lXext"
+ fi
xss_lib_found=yes
fi
@@ -9813,6 +9177,8 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
+ echo "$as_me:$LINENO: checking whether to use xft" >&5
+echo $ECHO_N "checking whether to use xft... $ECHO_C" >&6
# Check whether --enable-xft or --disable-xft was given.
if test "${enable_xft+set}" = set; then
enableval="$enable_xft"
@@ -9820,12 +9186,9 @@ if test "${enable_xft+set}" = set; then
else
enable_xft="no"
fi;
-
XFT_CFLAGS=""
XFT_LIBS=""
if test "$enable_xft" = "yes" ; then
- echo "$as_me:$LINENO: checking for xft configuration" >&5
-echo $ECHO_N "checking for xft configuration... $ECHO_C" >&6
XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || enable_xft="no"
XFT_LIBS=`xft-config --libs 2>/dev/null` || enable_xft="no"
if test "$enable_xft" = "no" ; then
@@ -9833,14 +9196,13 @@ echo $ECHO_N "checking for xft configuration... $ECHO_C" >&6
XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || enable_xft="no"
XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || enable_xft="no"
fi
- if test "$enable_xft" = "yes" ; then
- echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
- else
+ if test "$enable_xft" == "no" ; then
{ echo "$as_me:$LINENO: WARNING: Can't find xft configuration" >&5
echo "$as_me: WARNING: Can't find xft configuration" >&2;}
fi
fi
+ echo "$as_me:$LINENO: result: $enable_xft" >&5
+echo "${ECHO_T}$enable_xft" >&6
if test $enable_xft = "yes" ; then
UNIX_FONT_OBJS=tkUnixRFont.o
@@ -9854,7 +9216,6 @@ _ACEOF
-
fi
#--------------------------------------------------------------------
@@ -9959,41 +9320,42 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
- echo "$as_me:$LINENO: checking how to package libraries" >&5
+ if test "`uname -s`" = "Darwin" ; then
+ echo "$as_me:$LINENO: checking how to package libraries" >&5
echo $ECHO_N "checking how to package libraries... $ECHO_C" >&6
- # Check whether --enable-framework or --disable-framework was given.
+ # Check whether --enable-framework or --disable-framework was given.
if test "${enable_framework+set}" = set; then
enableval="$enable_framework"
- tcl_ok=$enableval
+ enable_framework=$enableval
else
- tcl_ok=no
+ enable_framework=no
fi;
-
- if test "${enable_framework+set}" = set; then
- enableval="$enable_framework"
- tcl_ok=$enableval
- else
- tcl_ok=no
- fi
-
- if test "$tcl_ok" = "yes" ; then
- echo "$as_me:$LINENO: result: framework" >&5
-echo "${ECHO_T}framework" >&6
- FRAMEWORK_BUILD=1
- if test "${SHARED_BUILD}" = "0" ; then
- { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
+ if test $enable_framework = yes; then
+ if test $SHARED_BUILD = 0; then
+ { echo "$as_me:$LINENO: WARNING: Frameworks can only be built if --enable-shared is yes" >&5
echo "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;}
- FRAMEWORK_BUILD=0
- fi
- if test $tcl_corefoundation = no; then
- { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
+ enable_framework=no
+ fi
+ if test $tcl_corefoundation = no; then
+ { echo "$as_me:$LINENO: WARNING: Frameworks can only be used when CoreFoundation is available" >&5
echo "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;}
+ enable_framework=no
+ fi
+ fi
+ if test $enable_framework = yes; then
+ echo "$as_me:$LINENO: result: framework" >&5
+echo "${ECHO_T}framework" >&6
+ FRAMEWORK_BUILD=1
+ else
+ if test $SHARED_BUILD = 1; then
+ echo "$as_me:$LINENO: result: shared library" >&5
+echo "${ECHO_T}shared library" >&6
+ else
+ echo "$as_me:$LINENO: result: static library" >&5
+echo "${ECHO_T}static library" >&6
+ fi
FRAMEWORK_BUILD=0
fi
- else
- echo "$as_me:$LINENO: result: standard shared library" >&5
-echo "${ECHO_T}standard shared library" >&6
- FRAMEWORK_BUILD=0
fi
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)}'`"
diff --git a/unix/configure.in b/unix/configure.in
index a9a804c..8182d93 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.119 2006/05/04 14:11:50 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.120 2006/07/20 06:25:20 das Exp $
AC_INIT([tk],[8.5])
AC_PREREQ(2.59)
@@ -177,14 +177,14 @@ fi
# special flag.
#--------------------------------------------------------------------
-AC_CACHE_CHECK([for fd_set in sys/types], tcl_cv_type_fd_set,
+AC_CACHE_CHECK([for fd_set in sys/types], 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))
+ tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no)])
tk_ok=$tcl_cv_type_fd_set
if test $tk_ok = no; then
- AC_CACHE_CHECK([for fd_mask in sys/select], tcl_cv_grep_fd_mask,
+ AC_CACHE_CHECK([for fd_mask in sys/select], 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))
+ tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)])
if test $tcl_cv_grep_fd_mask = present; then
AC_DEFINE(HAVE_SYS_SELECT_H, 1, [Should we include <sys/select.h>?])
tk_ok=yes
@@ -224,10 +224,10 @@ AC_TYPE_UID_T
# In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------
-AC_CACHE_CHECK([pw_gecos in struct pwd], tcl_cv_pwd_pw_gecos,
+AC_CACHE_CHECK([pw_gecos in struct pwd], 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))
+ tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no)])
if test $tcl_cv_pwd_pw_gecos = yes; then
AC_DEFINE(HAVE_PW_GECOS, 1, [Does struct password have a pw_gecos field?])
fi
@@ -237,24 +237,40 @@ fi
#--------------------------------------------------------------------
if test "`uname -s`" = "Darwin" ; then
+ AC_MSG_CHECKING([whether to use Aqua])
AC_ARG_ENABLE(aqua,
- AC_HELP_STRING([--enable-aqua],
- [enable Aqua windowingsystem on Mac OS X (default: off)]),
- [tk_aqua=$enableval], [tk_aqua=no])
+ AC_HELP_STRING([--enable-aqua],
+ [use Aqua windowingsystem on Mac OS X (default: off)]),
+ [tk_aqua=$enableval], [tk_aqua=no])
if test $tk_aqua = yes; then
- if test $tcl_corefoundation = no; then
- AC_MSG_WARN([Aqua can only be used when CoreFoundation is available])
- tk_aqua=no
- elif test ! -d /System/Library/Frameworks/Carbon.framework; then
- AC_MSG_WARN([Aqua can only be used when Carbon is available])
- tk_aqua=no
- fi
+ if test $tcl_corefoundation = no; then
+ AC_MSG_WARN([Aqua can only be used when CoreFoundation is available])
+ tk_aqua=no
+ fi
+ if test ! -d /System/Library/Frameworks/Carbon.framework; then
+ AC_MSG_WARN([Aqua can only be used when Carbon is available])
+ tk_aqua=no
+ fi
+ if test "`uname -r | awk -F. '{print [$]1}'`" -lt 6; then
+ AC_MSG_WARN([Aqua requires Mac OS X 10.2 or later])
+ tk_aqua=no
+ fi
fi
+ AC_MSG_RESULT([$tk_aqua])
if test $do64bit_ok = no ; then
# remove -arch ppc64 from CFLAGS for fat builds as neither Aqua nor X11
# can be built for 64bit at present (no 64bit GUI libraries).
CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
fi
+ if test $tk_aqua = no; then
+ # check if weak linking whole libraries is possible.
+ AC_CACHE_CHECK([if ld accepts -weak-l flag], tcl_cv_ld_weak_l, [
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-weak-lm"
+ AC_TRY_LINK([#include <math.h>], [double f = sin(1.0);],
+ tcl_cv_ld_weak_l=yes, tcl_cv_ld_weak_l=no)
+ LDFLAGS=$hold_ldflags])
+ fi
else
tk_aqua=no
fi
@@ -368,7 +384,6 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
-
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS $XINCLUDES"
tk_oldLibs=$LIBS
@@ -384,7 +399,13 @@ if test $tk_aqua = no; then
xss_lib_found=yes
], [
AC_CHECK_LIB(Xss,XScreenSaverQueryInfo, [
- XLIBSW="$XLIBSW -lXss -lXext"
+ if test "$tcl_cv_ld_weak_l" = yes; then
+ # On Darwin, weak link libXss if possible,
+ # as it is only available on Tiger or later.
+ XLIBSW="$XLIBSW -weak-lXss -lXext"
+ else
+ XLIBSW="$XLIBSW -lXss -lXext"
+ fi
xss_lib_found=yes
],, -lXext)
])
@@ -401,15 +422,14 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
+ AC_MSG_CHECKING([whether to use xft])
AC_ARG_ENABLE(xft,
- AC_HELP_STRING([--enable-xft],[Use freetype/fontconfig/xft (default: off)]),
- [enable_xft=$enableval],
- [enable_xft="no"])
-
+ AC_HELP_STRING([--enable-xft],
+ [use freetype/fontconfig/xft (default: off)]),
+ [enable_xft=$enableval], [enable_xft="no"])
XFT_CFLAGS=""
XFT_LIBS=""
if test "$enable_xft" = "yes" ; then
- AC_MSG_CHECKING([for xft configuration])
XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || enable_xft="no"
XFT_LIBS=`xft-config --libs 2>/dev/null` || enable_xft="no"
if test "$enable_xft" = "no" ; then
@@ -417,19 +437,17 @@ if test $tk_aqua = no; then
XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || enable_xft="no"
XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || enable_xft="no"
fi
- if test "$enable_xft" = "yes" ; then
- AC_MSG_RESULT([ok])
- else
+ if test "$enable_xft" == "no" ; then
AC_MSG_WARN([Can't find xft configuration])
fi
fi
+ AC_MSG_RESULT([$enable_xft])
if test $enable_xft = "yes" ; then
UNIX_FONT_OBJS=tkUnixRFont.o
AC_DEFINE(HAVE_XFT, 1, [Have we turned on XFT (antialiased fonts)?])
else
UNIX_FONT_OBJS=tkUnixFont.o
fi
-
AC_SUBST(XFT_CFLAGS)
AC_SUBST(XFT_LIBS)
AC_SUBST(UNIX_FONT_OBJS)
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 3b2e228..e009b9b 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -560,33 +560,33 @@ AC_DEFUN([SC_ENABLE_SHARED], [
#------------------------------------------------------------------------
AC_DEFUN([SC_ENABLE_FRAMEWORK], [
- AC_MSG_CHECKING([how to package libraries])
- AC_ARG_ENABLE(framework,
- AC_HELP_STRING([--enable-framework],
- [package shared libraries in MacOSX frameworks (default: off)]),
- [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,
+ AC_HELP_STRING([--enable-framework],
+ [package shared libraries in MacOSX frameworks (default: off)]),
+ [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
])
@@ -683,10 +683,10 @@ AC_DEFUN([SC_ENABLE_THREADS], [
AC_DEFINE(HAVE_PTHREAD_ATTR_GET_NP, 1,
[Do we want a BSD-like thread-attribute interface?])
AC_CACHE_CHECK([for pthread_attr_get_np declaration],
- tcl_cv_grep_pthread_attr_get_np,
+ tcl_cv_grep_pthread_attr_get_np, [
AC_EGREP_HEADER(pthread_attr_get_np, pthread.h,
tcl_cv_grep_pthread_attr_get_np=present,
- tcl_cv_grep_pthread_attr_get_np=missing))
+ tcl_cv_grep_pthread_attr_get_np=missing)])
if test $tcl_cv_grep_pthread_attr_get_np = missing ; then
AC_DEFINE(ATTRGETNP_NOT_DECLARED, 1,
[Is pthread_attr_get_np() declared in <pthread.h>?])
@@ -697,10 +697,10 @@ AC_DEFUN([SC_ENABLE_THREADS], [
AC_DEFINE(HAVE_PTHREAD_GETATTR_NP, 1,
[Do we want a Linux-like thread-attribute interface?])
AC_CACHE_CHECK([for pthread_getattr_np declaration],
- tcl_cv_grep_pthread_getattr_np,
+ tcl_cv_grep_pthread_getattr_np, [
AC_EGREP_HEADER(pthread_getattr_np, pthread.h,
tcl_cv_grep_pthread_getattr_np=present,
- tcl_cv_grep_pthread_getattr_np=missing))
+ tcl_cv_grep_pthread_getattr_np=missing)])
if test $tcl_cv_grep_pthread_getattr_np = missing ; then
AC_DEFINE(GETATTRNP_NOT_DECLARED, 1,
[Is pthread_getattr_np declared in <pthread.h>?])
@@ -1596,7 +1596,7 @@ dnl AC_CHECK_TOOL(AR, ar)
AC_MSG_CHECKING([whether to use CoreFoundation])
AC_ARG_ENABLE(corefoundation,
AC_HELP_STRING([--enable-corefoundation],
- [use CoreFoundation API on MacOSX (default: yes)]),
+ [use CoreFoundation API on MacOSX (default: on)]),
[tcl_corefoundation=$enableval], [tcl_corefoundation=yes])
AC_MSG_RESULT([$tcl_corefoundation])
if test $tcl_corefoundation = yes; then
@@ -1616,29 +1616,14 @@ dnl AC_CHECK_TOOL(AR, ar)
if test $tcl_cv_lib_corefoundation = yes; then
LIBS="$LIBS -framework CoreFoundation"
AC_DEFINE(HAVE_COREFOUNDATION, 1,
- [Do we have access to Darwin CoreFoundation.framework ?])
- AC_CHECK_HEADERS(libkern/OSAtomic.h)
- AC_CHECK_FUNCS(OSSpinLockLock)
- AC_CHECK_FUNCS(pthread_atfork)
+ [Do we have access to Darwin CoreFoundation.framework?])
+ else
+ tcl_corefoundation=no
fi
fi
- AC_CHECK_HEADERS(copyfile.h)
- AC_CHECK_FUNCS(copyfile)
AC_DEFINE(MAC_OSX_TCL, 1, [Is this a Mac I see before me?])
- AC_DEFINE(USE_VFORK, 1, [Should we use vfork() instead of fork()?])
- AC_DEFINE(TCL_DEFAULT_ENCODING, "utf-8",
- [Are we to override what our default encoding is?])
AC_DEFINE(MODULE_SCOPE, __private_extern__,
[Linker support for module scope symbols])
- AC_DEFINE(TCL_LOAD_FROM_MEMORY, 1,
- [Can this platform load code 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=""
@@ -1912,8 +1897,8 @@ dnl AC_CHECK_TOOL(AR, ar)
# Step 4: disable dynamic loading if requested via a command-line switch.
AC_ARG_ENABLE(load,
- AC_HELP_STRING([--disable-load],
- [disallow dynamic loading and "load" command (default: enabled)]),
+ AC_HELP_STRING([--enable-load],
+ [allow dynamic loading and "load" command (default: on)]),
[tcl_ok=$enableval], [tcl_ok=yes])
if test "$tcl_ok" = "no"; then
DL_OBJS=""
@@ -2202,7 +2187,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
@@ -2222,7 +2207,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, 1, [Do we have <dirent.h>?])
@@ -2416,16 +2401,16 @@ AC_DEFUN([SC_TIME_HANDLER], [
AC_CHECK_FUNCS(gmtime_r localtime_r mktime)
- 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, 1, [Should we use the tm_tzadj field of struct tm?])
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, 1, [Should we use the tm_gmtoff field of struct tm?])
fi
@@ -2434,24 +2419,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, 1, [Should we use the global timezone variable?])
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, 1, [Should we use the global timezone variable?])
fi
diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in
index 8d09814..7c36c14 100644
--- a/unix/tkConfig.h.in
+++ b/unix/tkConfig.h.in
@@ -10,21 +10,12 @@
/* Is pthread_getattr_np declared in <pthread.h>? */
#undef GETATTRNP_NOT_DECLARED
-/* Define to 1 if you have the `copyfile' function. */
-#undef HAVE_COPYFILE
-
-/* Define to 1 if you have the <copyfile.h> header file. */
-#undef HAVE_COPYFILE_H
-
-/* Do we have access to Darwin CoreFoundation.framework ? */
+/* Do we have access to Darwin CoreFoundation.framework? */
#undef HAVE_COREFOUNDATION
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the <libkern/OSAtomic.h> header file. */
-#undef HAVE_LIBKERN_OSATOMIC_H
-
/* Do we have <limits.h>? */
#undef HAVE_LIMITS_H
@@ -37,12 +28,6 @@
/* Define to 1 if you have the `open64' function. */
#undef HAVE_OPEN64
-/* Define to 1 if you have the `OSSpinLockLock' function. */
-#undef HAVE_OSSPINLOCKLOCK
-
-/* Define to 1 if you have the `pthread_atfork' function. */
-#undef HAVE_PTHREAD_ATFORK
-
/* Do we want a BSD-like thread-attribute interface? */
#undef HAVE_PTHREAD_ATTR_GET_NP
@@ -154,12 +139,6 @@
/* Are bytecode statistics enabled? */
#undef TCL_COMPILE_STATS
-/* Are we to override what our default encoding is? */
-#undef TCL_DEFAULT_ENCODING
-
-/* Can this platform load code from memory? */
-#undef TCL_LOAD_FROM_MEMORY
-
/* Is memory debugging enabled? */
#undef TCL_MEM_DEBUG
@@ -190,9 +169,6 @@
/* Do we want to use the threaded memory allocator? */
#undef USE_THREAD_ALLOC
-/* Should we use vfork() instead of fork()? */
-#undef USE_VFORK
-
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
diff --git a/unix/tkUnix.c b/unix/tkUnix.c
index 2e174b7..993bc9d 100644
--- a/unix/tkUnix.c
+++ b/unix/tkUnix.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnix.c,v 1.12 2005/11/14 11:54:21 dkf Exp $
+ * RCS: @(#) $Id: tkUnix.c,v 1.13 2006/07/20 06:25:20 das Exp $
*/
#include <tkInt.h>
@@ -209,7 +209,11 @@ Tk_GetUserInactiveTime(
* on some buggy versions of XFree86.
*/
- if (XScreenSaverQueryExtension(dpy, &eventBase, &errorBase) &&
+ if (
+#ifdef __APPLE__
+ XScreenSaverQueryInfo != NULL && /* Support for weak-linked libXss. */
+#endif
+ XScreenSaverQueryExtension(dpy, &eventBase, &errorBase) &&
XScreenSaverQueryVersion(dpy, &major, &minor)) {
XScreenSaverInfo *info = XScreenSaverAllocInfo();
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index d91e2b3..29deb7e 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.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: tkUnixSend.c,v 1.14 2005/11/27 02:36:16 das Exp $
+ * RCS: @(#) $Id: tkUnixSend.c,v 1.15 2006/07/20 06:25:20 das Exp $
*/
#include "tkPort.h"
@@ -1926,7 +1926,7 @@ TkpTestsendCmd(
&bytesAfter, (unsigned char **) &property);
if ((result == Success) && (actualType != None)
&& (actualFormat == 8) && (actualType == XA_STRING)) {
- for (p = property; (p-property) < length; p++) {
+ for (p = property; (unsigned long)(p-property) < length; p++) {
if (*p == 0) {
*p = '\n';
}