summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2012-09-25 14:51:04 (GMT)
committerKevin Walzer <kw@codebykevin.com>2012-09-25 14:51:04 (GMT)
commit59e0055e5372987ed7f16557ff3eeb6f75512b98 (patch)
treedea6f020e98cf06efcef68e084c7a1787f87e140 /unix
parentdbec27a4c7733b44e33ba898fef7e8636e86caa0 (diff)
parent1ccc0a498dc186888117726c326b68dde101af48 (diff)
downloadtk-59e0055e5372987ed7f16557ff3eeb6f75512b98.zip
tk-59e0055e5372987ed7f16557ff3eeb6f75512b98.tar.gz
tk-59e0055e5372987ed7f16557ff3eeb6f75512b98.tar.bz2
Merge Tk-Cocoa backport into core-8-5-branch
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in44
-rwxr-xr-xunix/configure73
-rw-r--r--unix/configure.in51
-rwxr-xr-x[-rw-r--r--]unix/install-sh0
4 files changed, 58 insertions, 110 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 6047263..6d877a8 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -284,12 +284,6 @@ LD_SEARCH_FLAGS = @LD_SEARCH_FLAGS@
# support for embedded libraries on Darwin / Mac OS X
DYLIB_INSTALL_DIR = ${LIB_RUNTIME_DIR}
-# support for building the Aqua resource file
-TK_RSRC_FILE = @TK_RSRC_FILE@
-WISH_RSRC_FILE = @WISH_RSRC_FILE@
-REZ = @REZ@
-REZ_SWITCHES = @REZ_FLAGS@ -i $(GENERIC_DIR) -i $(TCL_GENERIC_DIR)
-
# support for Xft:
XFT_CFLAGS = @XFT_CFLAGS@
XFT_LIBS = @XFT_LIBS@
@@ -396,7 +390,7 @@ AQUA_OBJS = tkMacOSXBitmap.o tkMacOSXButton.o tkMacOSXClipboard.o \
tkMacOSXMenubutton.o tkMacOSXMenus.o tkMacOSXMouseEvent.o \
tkMacOSXNotify.o tkMacOSXRegion.o tkMacOSXScrlbr.o tkMacOSXSend.o \
tkMacOSXSubwindows.o tkMacOSXWindowEvent.o \
- tkMacOSXWm.o tkMacOSXXStubs.o tkMacOSXCarbonEvents.o \
+ tkMacOSXWm.o tkMacOSXXStubs.o \
tkFileFilter.o tkMacWinMenu.o tkPointer.o tkUnix3d.o tkUnixScale.o \
xcolors.o xdraw.o xgc.o ximage.o xutil.o \
ttkMacOSXTheme.o
@@ -522,7 +516,6 @@ AQUA_SRCS = \
$(MAC_OSX_DIR)/tkMacOSXSend.c $(MAC_OSX_DIR)/tkMacOSXSubwindows.c \
$(MAC_OSX_DIR)/tkMacOSXTest.c $(MAC_OSX_DIR)/tkMacOSXWindowEvent.c \
$(MAC_OSX_DIR)/tkMacOSXWm.c $(MAC_OSX_DIR)/tkMacOSXXStubs.c \
- $(MAC_OSX_DIR)/tkMacOSXCarbonEvents.c \
$(GENERIC_DIR)/tkFileFilter.c $(GENERIC_DIR)/tkMacWinMenu.c \
$(GENERIC_DIR)/tkPointer.c $(UNIX_DIR)/tkUnix3d.c \
$(UNIX_DIR)/tkUnixScale.c $(XLIB_DIR)/xcolors.c $(XLIB_DIR)/xdraw.c \
@@ -531,12 +524,6 @@ AQUA_SRCS = \
SRCS = $(GENERIC_SRCS) $(@TK_WINDOWINGSYSTEM@_SRCS) @PLAT_SRCS@
-AQUA_RESOURCES = \
- $(MAC_OSX_DIR)/tkAboutDlg.r $(MAC_OSX_DIR)/tkMacOSXCursors.r \
- $(MAC_OSX_DIR)/tkMacOSXXCursors.r
-
-AQUA_WISH_RESOURCES = $(MAC_OSX_DIR)/tkMacOSXAETE.r
-
AQUA_HDRS = $(MAC_OSX_DIR)/tkMacOSX.h $(GENERIC_DIR)/tkIntXlibDecls.h
AQUA_XLIB_HDRS = $(XLIB_DIR)/X11/*.h $(XLIB_DIR)/xbytes.h
@@ -585,17 +572,6 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
rm -f $@
@MAKE_STUB_LIB@
-# Build Aqua resource files
-${TK_RSRC_FILE}: $(AQUA_RESOURCES)
- rm -f $@
- if test "$(REZ)" != ""; then \
- $(REZ) -o $@ $(REZ_SWITCHES) $(AQUA_RESOURCES); fi
-
-${WISH_RSRC_FILE}: $(AQUA_WISH_RESOURCES)
- rm -f $@
- if test "$(REZ)" != ""; then \
- $(REZ) -o $@ $(REZ_SWITCHES) $(AQUA_WISH_RESOURCES); fi
-
# Make target which outputs the list of the .o contained in the Tk lib
# usefull to build a single big shared library containing Tcl/Tk and other
# extensions. used for the Tcl Plugin. -- dl
@@ -1207,9 +1183,6 @@ tkMacOSXBitmap.o: $(MAC_OSX_DIR)/tkMacOSXBitmap.c
tkMacOSXButton.o: $(MAC_OSX_DIR)/tkMacOSXButton.c
$(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXButton.c
-tkMacOSXCarbonEvents.o: $(MAC_OSX_DIR)/tkMacOSXCarbonEvents.c
- $(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXCarbonEvents.c
-
tkMacOSXClipboard.o: $(MAC_OSX_DIR)/tkMacOSXClipboard.c
$(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXClipboard.c
@@ -1562,17 +1535,18 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(MAC_OSX_DIR)/configure
$(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/wish.exe.manifest.in
mkdir $(DISTDIR)/macosx
cp -p $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \
- $(MAC_OSX_DIR)/Wish.icns $(MAC_OSX_DIR)/*.[chr] \
+ $(MAC_OSX_DIR)/Tk.* $(MAC_OSX_DIR)/*.[ch] \
$(MAC_OSX_DIR)/*.in $(MAC_OSX_DIR)/*.ac \
- $(MAC_OSX_DIR)/*.xcconfig $(MAC_OSX_DIR)/configure \
- $(DISTDIR)/macosx
+ $(MAC_OSX_DIR)/*.xcconfig $(MAC_OSX_DIR)/*.sdef \
+ $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx
cp -p $(TOP_DIR)/license.terms $(DISTDIR)/macosx
- mkdir $(DISTDIR)/macosx/Wish.pbproj
- cp -p $(MAC_OSX_DIR)/Wish.pbproj/*.pbx* $(DISTDIR)/macosx/Wish.pbproj
mkdir $(DISTDIR)/macosx/Wish.xcode
- cp -p $(MAC_OSX_DIR)/Wish.xcode/*.pbx* $(DISTDIR)/macosx/Wish.xcode
+ cp -p $(MAC_OSX_DIR)/Wish.xcode/project.pbxproj \
+ $(MAC_OSX_DIR)/Wish.xcode/default.pbxuser \
+ $(DISTDIR)/macosx/Wish.xcode
mkdir $(DISTDIR)/macosx/Wish.xcodeproj
- cp -p $(MAC_OSX_DIR)/Wish.xcodeproj/*.pbx* \
+ cp -p $(MAC_OSX_DIR)/Wish.xcodeproj/project.pbxproj \
+ $(MAC_OSX_DIR)/Wish.xcodeproj/default.pbxuser \
$(DISTDIR)/macosx/Wish.xcodeproj
mkdir $(DISTDIR)/compat
cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
diff --git a/unix/configure b/unix/configure
index 3e85092..43219b8 100755
--- a/unix/configure
+++ b/unix/configure
@@ -9532,14 +9532,14 @@ fi;
echo "$as_me: WARNING: Aqua can only be used when CoreFoundation is available" >&2;}
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;}
+ if test ! -d /System/Library/Frameworks/Cocoa.framework; then
+ { echo "$as_me:$LINENO: WARNING: Aqua can only be used when Cocoa is available" >&5
+echo "$as_me: WARNING: Aqua can only be used when Cocoa is available" >&2;}
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;}
+ if test "`uname -r | awk -F. '{print $1}'`" -lt 9; then
+ { echo "$as_me:$LINENO: WARNING: Aqua requires Mac OS X 10.5 or later" >&5
+echo "$as_me: WARNING: Aqua requires Mac OS X 10.5 or later" >&2;}
tk_aqua=no
fi
fi
@@ -9613,7 +9613,7 @@ echo "${ECHO_T}$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 $tk_aqua = yes -o "$tcl_cv_lib_x11_64" = no; then
+ if test "$tcl_cv_lib_x11_64" = no; then
{ echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
for v in CFLAGS CPPFLAGS LDFLAGS; do
@@ -9990,8 +9990,8 @@ cat >>confdefs.h <<\_ACEOF
#define MAC_OSX_TK 1
_ACEOF
- LIBS="$LIBS -framework Carbon -framework IOKit"
- CFLAGS="$CFLAGS -fpascal-strings"
+ 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
@@ -11075,9 +11075,9 @@ fi
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
-echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
-echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6
-if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
+echo "$as_me:$LINENO: checking for FT_New_Face in -lXft" >&5
+echo $ECHO_N "checking for FT_New_Face in -lXft... $ECHO_C" >&6
+if test "${ac_cv_lib_Xft_FT_New_Face+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11095,11 +11095,11 @@ 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 XftFontOpen ();
+char FT_New_Face ();
int
main ()
{
-XftFontOpen ();
+FT_New_Face ();
;
return 0;
}
@@ -11126,20 +11126,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_Xft_XftFontOpen=yes
+ ac_cv_lib_Xft_FT_New_Face=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_Xft_XftFontOpen=no
+ac_cv_lib_Xft_FT_New_Face=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
-echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6
-if test $ac_cv_lib_Xft_XftFontOpen = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_FT_New_Face" >&5
+echo "${ECHO_T}$ac_cv_lib_Xft_FT_New_Face" >&6
+if test $ac_cv_lib_Xft_FT_New_Face = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBXFT 1
_ACEOF
@@ -11323,7 +11323,7 @@ echo "${ECHO_T}static library" >&6
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)}'`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}/${TK_LIB_FILE}" -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp "$(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE)" | grep ^_[^_] > $$f && echo $$f)'
+ 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'
@@ -11364,15 +11364,15 @@ _ACEOF
HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk"
EXTRA_INSTALL="install-private-headers html-tk"
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"'
+ EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(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 = yes; then
- 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"'
- 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)"'
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Images to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(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}"'" && mkdir -p "$(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" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"'
+ 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" && mkdir -p "$(BIN_INSTALL_DIR)/../Resources" && $(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"'
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
@@ -11381,6 +11381,9 @@ _ACEOF
# into CFLAGS as it should not go into tkConfig.sh
EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"'
else
+ if test $tk_aqua = yes; then
+ EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)" && mkdir -p "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done'
+ fi
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
@@ -11397,22 +11400,6 @@ else
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
fi
-# Support for building the Aqua resource files
-if test $tk_aqua = yes; then
- 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.
diff --git a/unix/configure.in b/unix/configure.in
index d700a15..b3a27d3 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -276,12 +276,12 @@ if test "`uname -s`" = "Darwin" ; 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])
+ if test ! -d /System/Library/Frameworks/Cocoa.framework; then
+ AC_MSG_WARN([Aqua can only be used when Cocoa 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])
+ if test "`uname -r | awk -F. '{print [$]1}'`" -lt 9; then
+ AC_MSG_WARN([Aqua requires Mac OS X 10.5 or later])
tk_aqua=no
fi
fi
@@ -302,7 +302,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 = yes -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"`"'
@@ -363,8 +363,8 @@ fi
if test $tk_aqua = yes; then
AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
- LIBS="$LIBS -framework Carbon -framework IOKit"
- CFLAGS="$CFLAGS -fpascal-strings"
+ 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?])
@@ -550,7 +550,7 @@ if test $tk_aqua = no; then
CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
- AC_CHECK_LIB(Xft, XftFontOpen, [], [
+ AC_CHECK_LIB(Xft, FT_New_Face, [], [
found_xft=no
])
CFLAGS=$tk_oldCFlags
@@ -620,7 +620,7 @@ 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}" -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp "$(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE)" | grep ^_[[^_]] > $$f && echo $$f)'
+ 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'
@@ -662,15 +662,15 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk"
EXTRA_INSTALL="install-private-headers html-tk"
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"'
+ EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(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 = yes; then
- 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"'
- 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)"'
+ EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Images to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(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}"'" && mkdir -p "$(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" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"'
+ 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" && mkdir -p "$(BIN_INSTALL_DIR)/../Resources" && $(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"'
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
@@ -679,6 +679,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
# into CFLAGS as it should not go into tkConfig.sh
EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"'
else
+ if test $tk_aqua = yes; then
+ EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)" && mkdir -p "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done'
+ fi
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
@@ -695,22 +698,6 @@ else
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
fi
-# Support for building the Aqua resource files
-if test $tk_aqua = yes; then
- 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.
diff --git a/unix/install-sh b/unix/install-sh
index 7c34c3f..7c34c3f 100644..100755
--- a/unix/install-sh
+++ b/unix/install-sh