summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-13 10:37:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-06-13 10:37:24 (GMT)
commita9417a5cc8802ec3945cbc12e39ed01724be0067 (patch)
tree83a004e66e134b8ec0416e8d69277ae94c969bb8 /unix/configure.in
parent347946d329fcc454775484c08e7764054811c92a (diff)
parentccfa40c8ce8aca2cfd03317fab6b31cdc3910895 (diff)
downloadtk-a9417a5cc8802ec3945cbc12e39ed01724be0067.zip
tk-a9417a5cc8802ec3945cbc12e39ed01724be0067.tar.gz
tk-a9417a5cc8802ec3945cbc12e39ed01724be0067.tar.bz2
Some more fixes for Cygwin32/64 in win32 GUI mode.
Now that this is fully working, eliminate all usage of WISH_BUILD_LIB_SPEC: TK_BUILD_LIB_SPEC can be used everywhere in stead. Remove some old carbon-leftovers from configure/make (see [3607215]).
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in105
1 files changed, 24 insertions, 81 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 7339983..a29600c 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -269,15 +269,18 @@ fi
# On Mac OS X, we can build either with X11 or with Aqua
#--------------------------------------------------------------------
-MACOSX_SRC_DIR=macosx
if test "`uname -s`" = "Darwin" ; then
AC_MSG_CHECKING([whether to use Aqua])
AC_ARG_ENABLE(aqua,
- AC_HELP_STRING([--enable-aqua=yes|carbon|no],
+ AC_HELP_STRING([--enable-aqua=yes|no],
[use Aqua windowingsystem on Mac OS X (default: no)]),
[tk_aqua=$enableval], [tk_aqua=no])
if test $tk_aqua = yes -o $tk_aqua = cocoa; then
tk_aqua=yes
+ 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/Cocoa.framework; then
AC_MSG_WARN([Aqua can only be used when Cocoa is available])
tk_aqua=no
@@ -286,28 +289,8 @@ if test "`uname -s`" = "Darwin" ; then
AC_MSG_WARN([Aqua requires Mac OS X 10.5 or later])
tk_aqua=no
fi
- elif test $tk_aqua = carbon; then
- 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
- else
- tk_aqua=no
- fi
- if test $tk_aqua != no -a $tcl_corefoundation = no; then
- AC_MSG_WARN([Aqua can only be used when CoreFoundation is available])
- tk_aqua=no
- fi
- if test $tk_aqua = carbon; then
- MACOSX_SRC_DIR=carbon
- AC_MSG_RESULT([yes (deprecated legacy Carbon implementation)])
- else
- AC_MSG_RESULT([$tk_aqua])
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, [
@@ -324,7 +307,7 @@ if test "`uname -s`" = "Darwin" ; then
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 $tk_aqua = carbon -o "$tcl_cv_lib_x11_64" = no; then
+ 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"`"'
@@ -383,15 +366,10 @@ else
tk_aqua=no
fi
-if test $tk_aqua != no; then
- if test $tk_aqua = yes; then
- LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
- EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c -fobjc-gc'
- else
- LIBS="$LIBS -framework Carbon -framework IOKit"
- CFLAGS="$CFLAGS -fpascal-strings"
- fi
+if test $tk_aqua = yes; then
AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
+ LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
+ EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c -fobjc-gc'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?])
@@ -703,15 +681,12 @@ 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}"'
- if test $tk_aqua = yes; then
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -unexported_symbols_list $$(f=$(TK_LIB_FILE).E && nm -gp tkMacOSX*.o 2>/dev/null | awk "/^[[0-9a-f]]+ . \.objc/ {print \$$3}" > $$f && echo $$f)'
- fi
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}/${TK_LIB_FILE}" -unexported_symbols_list $$(f=$(TK_LIB_FILE).E && nm -gp tkMacOSX*.o 2>/dev/null | awk "/^[[0-9a-f]]+ . \.objc/ {print \$$3}" > $$f && nm -gjp "$(TCL_BIN_DIR)"/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] >> $$f && echo $$f)'
echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000'
TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist'
EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist'
EXTRA_APP_CC_SWITCHES="${EXTRA_APP_CC_SWITCHES}"' -mdynamic-no-pic'
- AC_CONFIG_FILES([Tk-Info.plist:../${MACOSX_SRC_DIR}/Tk-Info.plist.in Wish-Info.plist:../${MACOSX_SRC_DIR}/Wish-Info.plist.in])
+ AC_CONFIG_FILES([Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in])
for l in ${LOCALES}; do CFBUNDLELOCALIZATIONS="${CFBUNDLELOCALIZATIONS}<string>$l</string>"; done
TK_YEAR="`date +%Y`"
fi
@@ -725,7 +700,7 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
rm -rf $f && mkdir -p $f/$v/Resources &&
ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
- if test $tk_aqua != no; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi &&
+ if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi &&
unset n f v
], VERSION=${TK_VERSION} && tk_aqua=${tk_aqua})
LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
@@ -736,7 +711,6 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
TK_LIB_FILE="Tk"
TK_LIB_FLAG="-framework Tk"
TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk"
- WISH_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk \${WISH_LIBS}"
TK_LIB_SPEC="-F${libdir} -framework Tk"
libdir="${libdir}/Tk.framework/Versions/\${VERSION}"
TK_LIBRARY="${libdir}/Resources/Scripts"
@@ -750,22 +724,14 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TkTOC.html'
EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"'
EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"'
- if test $tk_aqua != no; then
- if test $tk_aqua = yes; then
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Images to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)/Resources"; done'
- else
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${TK_RSRC_FILE} to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "${TK_RSRC_FILE}" "$(LIB_INSTALL_DIR)/Resources"'
- fi
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'/" && $(INSTALL_DATA_DIR) "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"'
- bindir="${libdir}/Resources/Wish.app/Contents/MacOS"
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/../" && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA_DIR) "$(BIN_INSTALL_DIR)/../Resources"'
- if test $tk_aqua = yes; then
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Tk.icns" "$(BIN_INSTALL_DIR)/../Resources/Wish.icns"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.sdef to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.sdef" "$(BIN_INSTALL_DIR)/../Resources"'
- else
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources" && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"'
- fi
+ if test $tk_aqua = yes; then
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Images to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)/Resources"; done'
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'/" && $(INSTALL_DATA_DIR) "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"'
+ bindir="${libdir}/Resources/Wish.app/Contents/MacOS"
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/.." && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"'
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA_DIR) "$(BIN_INSTALL_DIR)/../Resources"'
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && $(INSTALL_DATA) "macosx/Tk.icns" "$(BIN_INSTALL_DIR)/../Resources/Wish.icns"'
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.sdef to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.sdef" "$(BIN_INSTALL_DIR)/../Resources"'
fi
EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tk.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tkConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."'
# Don't use AC_DEFINE for the following as the framework version define
@@ -779,38 +745,19 @@ else
fi
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"
- if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
+ if test "${ac_cv_cygwin}" != "yes" -a "${TCL_LIB_VERSIONS_OK}" = "ok"; then
TK_LIB_FLAG="-ltk${TK_VERSION}"
else
TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
fi
- TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}"
if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then
- WISH_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk${TK_MAJOR_VERSION}${TK_MINOR_VERSION} \${TCL_LIB_SPEC}"
+ TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win -ltk${TK_MAJOR_VERSION}${TK_MINOR_VERSION} \${TCL_LIB_SPEC}"
else
- WISH_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG} \${WISH_LIBS}"
+ TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}"
fi
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
fi
-# Extra bits for legacy Aqua Carbon build (carbon sources and resource files)
-if test $tk_aqua = carbon; then
- EXTRA_AQUA_OBJS='tkMacOSXCarbonEvents.o'
- EXTRA_AQUA_SRCS='$(TOP_DIR)/carbon/tkMacOSXCarbonEvents.c'
- LIB_RSRC_FILE='${TK_RSRC_FILE}'
- APP_RSRC_FILE='${WISH_RSRC_FILE}'
- REZ=/Developer/Tools/Rez
- REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro'
- if test "$SHARED_BUILD" = 0; then
- EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"'
- TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}"
- WISH_BUILD_LIB_SPEC="$WISH_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}"
- TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}"
- else
- TK_SHLIB_LD_EXTRAS="$TK_SHLIB_LD_EXTRAS -sectcreate __TEXT __tk_rsrc \${TK_RSRC_FILE}"
- fi
-fi
-
#--------------------------------------------------------------------
# The statements below define various symbols relating to Tk
# stub support.
@@ -863,7 +810,6 @@ AC_SUBST(TK_SHARED_BUILD)
AC_SUBST(LD_LIBRARY_PATH_VAR)
AC_SUBST(TK_BUILD_LIB_SPEC)
-AC_SUBST(WISH_BUILD_LIB_SPEC)
AC_SUBST(TCL_STUB_FLAGS)
AC_SUBST(XINCLUDES)
@@ -883,11 +829,8 @@ AC_SUBST(EXTRA_INSTALL)
AC_SUBST(EXTRA_INSTALL_BINARIES)
AC_SUBST(EXTRA_BUILD_HTML)
AC_SUBST(EXTRA_WISH_LIBS)
-AC_SUBST(EXTRA_AQUA_OBJS)
-AC_SUBST(EXTRA_AQUA_SRCS)
AC_SUBST(CFBUNDLELOCALIZATIONS)
-AC_SUBST(MACOSX_SRC_DIR)
AC_SUBST(TK_RSRC_FILE)
AC_SUBST(WISH_RSRC_FILE)
AC_SUBST(LIB_RSRC_FILE)