summaryrefslogtreecommitdiffstats
path: root/unix/configure
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-20 11:07:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-20 11:07:40 (GMT)
commit6644b8b7ad2134b73c7483ad6426a7acaa7bd2de (patch)
treeed0653e7854f0f5e0a64e76882b67f5a655ee580 /unix/configure
parent5fb355e21753cf794cbd95111fc35a964a89b6d3 (diff)
downloadtk-6644b8b7ad2134b73c7483ad6426a7acaa7bd2de.zip
tk-6644b8b7ad2134b73c7483ad6426a7acaa7bd2de.tar.gz
tk-6644b8b7ad2134b73c7483ad6426a7acaa7bd2de.tar.bz2
Fix [bf0f4808d7]: macOS Aqua : CFLAGS_OPTIMIZE. Builds on MacOSX will now be done with -O2 and without -std=gnu99
Diffstat (limited to 'unix/configure')
-rwxr-xr-xunix/configure175
1 files changed, 5 insertions, 170 deletions
diff --git a/unix/configure b/unix/configure
index 179e629..03ff4b9 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
@@ -5262,47 +5262,7 @@ fi
then :
case `arch` in
- ppc)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
-printf %s "checking if compiler accepts -arch ppc64 flag... " >&6; }
-if test ${tcl_cv_cc_arch_ppc64+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
-
- hold_cflags=$CFLAGS
- CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- 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_ppc64=yes
-else $as_nop
- tcl_cv_cc_arch_ppc64=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_ppc64" >&5
-printf "%s\n" "$tcl_cv_cc_arch_ppc64" >&6; }
- if test $tcl_cv_cc_arch_ppc64 = yes
-then :
-
- CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- do64bit_ok=yes
-
-fi;;
- 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,21 +5302,13 @@ then :
do64bit_ok=yes
fi;;
+ arm64e)
+ do64bit_ok=yes;;
*)
{ 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;};;
esac
-else $as_nop
-
- # Check for combined 32-bit and 64-bit fat build
- if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
- && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '
-then :
-
- fat_32_64=yes
-fi
-
fi
SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
@@ -5479,17 +5431,6 @@ then :
else $as_nop
hold_libs=$LIBS
- if test "$fat_32_64" = yes
-then :
-
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- # On Tiger there is no 64-bit CF, so remove 64-bit
- # archs from CFLAGS et al. while testing for
- # presence of CF. 64-bit CF is disabled in
- # tclUnixPort.h if necessary.
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
- done
-fi
LIBS="$LIBS -framework CoreFoundation"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5510,13 +5451,6 @@ else $as_nop
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- if test "$fat_32_64" = yes
-then :
-
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done
-fi
LIBS=$hold_libs
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_corefoundation" >&5
@@ -5532,55 +5466,6 @@ printf "%s\n" "#define HAVE_COREFOUNDATION 1" >>confdefs.h
else $as_nop
tcl_corefoundation=no
fi
- if test "$fat_32_64" = yes -a $tcl_corefoundation = yes
-then :
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit CoreFoundation" >&5
-printf %s "checking for 64-bit CoreFoundation... " >&6; }
-if test ${tcl_cv_lib_corefoundation_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
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <CoreFoundation/CoreFoundation.h>
-int
-main (void)
-{
-CFBundleRef b = CFBundleGetMainBundle();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
- tcl_cv_lib_corefoundation_64=yes
-else $as_nop
- tcl_cv_lib_corefoundation_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_corefoundation_64" >&5
-printf "%s\n" "$tcl_cv_lib_corefoundation_64" >&6; }
- if test $tcl_cv_lib_corefoundation_64 = no
-then :
-
-
-printf "%s\n" "#define NO_COREFOUNDATION_64 1" >>confdefs.h
-
- LDFLAGS="$LDFLAGS -Wl,-no_arch_warnings"
-
-fi
-
-fi
fi
;;
@@ -7454,56 +7339,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 +7485,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