summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-21 16:17:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-21 16:17:41 (GMT)
commite01db2e89f1006c18e17ba8abdd6b0aa6bc22ac2 (patch)
tree76b7f02c1fda41f1c195da0bfca86e2784c69353 /unix
parenteb16e1c7163c315fad01ac090bfddc22d1584586 (diff)
parent95de0ead59fc76d4809f663e514c3c2e49903cc0 (diff)
downloadtk-e01db2e89f1006c18e17ba8abdd6b0aa6bc22ac2.zip
tk-e01db2e89f1006c18e17ba8abdd6b0aa6bc22ac2.tar.gz
tk-e01db2e89f1006c18e17ba8abdd6b0aa6bc22ac2.tar.bz2
Merge 8.7. Add testcases for Num and Fn binding
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in4
-rwxr-xr-xunix/configure98
-rw-r--r--unix/configure.ac25
-rw-r--r--unix/tcl.m418
4 files changed, 60 insertions, 85 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index cf77b0f..49edfe9 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1739,10 +1739,6 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(UNIX_DIR)/tk.pc.in $(MAC
$(DISTDIR)/macosx
$(DIST_INSTALL_SCRIPT) $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx
$(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/macosx
- $(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tk.xcode
- $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tk.xcode/project.pbxproj \
- $(MAC_OSX_DIR)/Tk.xcode/default.pbxuser \
- $(DISTDIR)/macosx/Tk.xcode
$(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tk.xcodeproj
$(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tk.xcodeproj/project.pbxproj \
$(MAC_OSX_DIR)/Tk.xcodeproj/default.pbxuser \
diff --git a/unix/configure b/unix/configure
index 179e629..6b96ef4 100755
--- a/unix/configure
+++ b/unix/configure
@@ -5247,7 +5247,7 @@ fi
LDFLAGS="$LDFLAGS -pthread"
;;
Darwin-*)
- CFLAGS_OPTIMIZE="-Os"
+ CFLAGS_OPTIMIZE="-O2"
SHLIB_CFLAGS="-fno-common"
# To avoid discrepancies between what headers configure sees during
# preprocessing tests and compiling tests, move any -isysroot and
@@ -5302,7 +5302,7 @@ then :
do64bit_ok=yes
fi;;
- i386)
+ i386|x86_64)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
printf %s "checking if compiler accepts -arch x86_64 flag... " >&6; }
if test ${tcl_cv_cc_arch_x86_64+y}
@@ -5342,6 +5342,46 @@ then :
do64bit_ok=yes
fi;;
+ arm64|arm64e)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch arm64e flag" >&5
+printf %s "checking if compiler accepts -arch arm64e flag... " >&6; }
+if test ${tcl_cv_cc_arch_arm64e+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ hold_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -arch arm64e"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ tcl_cv_cc_arch_arm64e=yes
+else $as_nop
+ tcl_cv_cc_arch_arm64e=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_arm64e" >&5
+printf "%s\n" "$tcl_cv_cc_arch_arm64e" >&6; }
+ if test $tcl_cv_cc_arch_arm64e = yes
+then :
+
+ CFLAGS="$CFLAGS -arch arm64e"
+ do64bit_ok=yes
+
+fi;;
*)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
printf "%s\n" "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
@@ -5350,7 +5390,7 @@ printf "%s\n" "$as_me: WARNING: Don't know how enable 64-bit on architecture \`a
else $as_nop
# Check for combined 32-bit and 64-bit fat build
- if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+ if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64|arm64e) ' \
&& echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '
then :
@@ -7454,56 +7494,6 @@ printf "%s\n" "$as_me: WARNING: Aqua requires Mac OS X 10.5 or later" >&2;}
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tk_aqua" >&5
printf "%s\n" "$tk_aqua" >&6; }
- if test "$fat_32_64" = yes; then
- if test $tk_aqua = no; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
-printf %s "checking for 64-bit X11... " >&6; }
-if test ${tcl_cv_lib_x11_64+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
-
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
- done
- CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
- LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-int
-main (void)
-{
-XrmInitialize();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- tcl_cv_lib_x11_64=yes
-else $as_nop
- tcl_cv_lib_x11_64=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
-printf "%s\n" "$tcl_cv_lib_x11_64" >&6; }
- fi
- # remove 64-bit arch flags from CFLAGS et al. for combined 32 & 64 bit
- # fat builds if configuration does not support 64-bit.
- if test "$tcl_cv_lib_x11_64" = no; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
-printf "%s\n" "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
- done
- fi
- fi
if test $tk_aqua = no; then
# check if weak linking whole libraries is possible.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -weak-l flag" >&5
@@ -7650,7 +7640,7 @@ printf "%s\n" "#define MAC_OSX_TK 1" >>confdefs.h
if test -d /System/Library/Frameworks/UserNotifications.framework; then
LIBS="$LIBS -framework UserNotifications"
fi
- EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
+ EXTRA_CC_SWITCHES='-x objective-c'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
diff --git a/unix/configure.ac b/unix/configure.ac
index 631b3ab..cce5c29 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -230,29 +230,6 @@ if test "`uname -s`" = "Darwin" ; then
fi
fi
AC_MSG_RESULT([$tk_aqua])
- if test "$fat_32_64" = yes; then
- if test $tk_aqua = no; then
- AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
- done
- CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
- LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XrmInitialize();]])],
- [tcl_cv_lib_x11_64=yes],[tcl_cv_lib_x11_64=no])
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done])
- fi
- # remove 64-bit arch flags from CFLAGS et al. for combined 32 & 64 bit
- # fat builds if configuration does not support 64-bit.
- if test "$tcl_cv_lib_x11_64" = no; then
- AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
- done
- fi
- 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, [
@@ -311,7 +288,7 @@ if test $tk_aqua = yes; then
if test -d /System/Library/Frameworks/UserNotifications.framework; then
LIBS="$LIBS -framework UserNotifications"
fi
- EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
+ EXTRA_CC_SWITCHES='-x objective-c'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?])
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index dfbb9be..3730343 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1369,7 +1369,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
LDFLAGS="$LDFLAGS -pthread"
;;
Darwin-*)
- CFLAGS_OPTIMIZE="-Os"
+ CFLAGS_OPTIMIZE="-O2"
SHLIB_CFLAGS="-fno-common"
# To avoid discrepancies between what headers configure sees during
# preprocessing tests and compiling tests, move any -isysroot and
@@ -1394,7 +1394,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
do64bit_ok=yes
]);;
- i386)
+ i386|x86_64)
AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
tcl_cv_cc_arch_x86_64, [
hold_cflags=$CFLAGS
@@ -1406,12 +1406,24 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS="$CFLAGS -arch x86_64"
do64bit_ok=yes
]);;
+ arm64|arm64e)
+ AC_CACHE_CHECK([if compiler accepts -arch arm64e flag],
+ tcl_cv_cc_arch_arm64e, [
+ hold_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -arch arm64e"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [tcl_cv_cc_arch_arm64e=yes],[tcl_cv_cc_arch_arm64e=no])
+ CFLAGS=$hold_cflags])
+ AS_IF([test $tcl_cv_cc_arch_arm64e = yes], [
+ CFLAGS="$CFLAGS -arch arm64e"
+ do64bit_ok=yes
+ ]);;
*)
AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
esac
], [
# Check for combined 32-bit and 64-bit fat build
- AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
+ AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64|arm64e) ' \
&& echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
fat_32_64=yes])
])