From e61ef2966a0632ac4bcbee02a7de3f755d4ff9bb Mon Sep 17 00:00:00 2001 From: das Date: Sun, 29 May 2005 06:46:56 +0000 Subject: * generic/tkDecls.h: * generic/tkIntPlatDecls.h: * generic/tkPlatDecls.h: * generic/tkStubInit.c: ran missing 'make genstubs' for TIP245 changes to tk.decls * macosx/tkMacOSXXStubs.c (Tk_ResetUserInactiveTime): use symbolic constant argument in call to UpdateSystemActivity(); * macosx/Wish.pbproj/project.pbxproj: * macosx/Wish.xcode/project.pbxproj: * unix/configure.in: added/corrected linking to IOKit.framework for TIP245. * unix/configure.in: skip X11 configure checks when building tk_aqua. * unix/configure: autoconf-2.59 --- ChangeLog | 19 ++++++ generic/tkDecls.h | 22 ++++++- generic/tkIntPlatDecls.h | 22 +------ generic/tkPlatDecls.h | 22 +------ generic/tkStubInit.c | 8 +-- macosx/Wish.pbproj/project.pbxproj | 39 +++-------- macosx/Wish.xcode/project.pbxproj | 32 ++++----- macosx/tkMacOSXXStubs.c | 4 +- unix/configure | 131 ++++++++++++++++++++++++++++++------- unix/configure.in | 105 +++++++++++++++-------------- 10 files changed, 235 insertions(+), 169 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8607e6..e80ef1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2005-05-29 Daniel Steffen + + * generic/tkDecls.h: + * generic/tkIntPlatDecls.h: + * generic/tkPlatDecls.h: + * generic/tkStubInit.c: ran missing 'make genstubs' for TIP245 changes + to tk.decls + + * macosx/tkMacOSXXStubs.c (Tk_ResetUserInactiveTime): use symbolic + constant argument in call to UpdateSystemActivity(); + + * macosx/Wish.pbproj/project.pbxproj: + * macosx/Wish.xcode/project.pbxproj: + * unix/configure.in: added/corrected linking to IOKit.framework for + TIP245. + + * unix/configure.in: skip X11 configure checks when building tk_aqua. + * unix/configure: autoconf-2.59 + 2005-05-28 Donal K. Fellows TIP #245 IMPLEMENTATION from Reinhard Max diff --git a/generic/tkDecls.h b/generic/tkDecls.h index d666a44..a7cbebd 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkDecls.h,v 1.25 2003/10/13 03:41:37 hobbs Exp $ + * RCS: @(#) $Id: tkDecls.h,v 1.26 2005/05/29 06:47:04 das Exp $ */ #ifndef _TKDECLS @@ -1735,6 +1735,16 @@ EXTERN int Tk_PhotoPutZoomedBlock _ANSI_ARGS_(( EXTERN int Tk_PhotoSetSize _ANSI_ARGS_((Tcl_Interp * interp, Tk_PhotoHandle handle, int width, int height)); #endif +#ifndef Tk_GetUserInactiveTime_TCL_DECLARED +#define Tk_GetUserInactiveTime_TCL_DECLARED +/* 269 */ +EXTERN long Tk_GetUserInactiveTime _ANSI_ARGS_((Display * dpy)); +#endif +#ifndef Tk_ResetUserInactiveTime_TCL_DECLARED +#define Tk_ResetUserInactiveTime_TCL_DECLARED +/* 270 */ +EXTERN void Tk_ResetUserInactiveTime _ANSI_ARGS_((Display * dpy)); +#endif typedef struct TkStubHooks { struct TkPlatStubs *tkPlatStubs; @@ -2016,6 +2026,8 @@ typedef struct TkStubs { int (*tk_PhotoPutBlock) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int compRule)); /* 266 */ int (*tk_PhotoPutZoomedBlock) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PhotoHandle handle, Tk_PhotoImageBlock * blockPtr, int x, int y, int width, int height, int zoomX, int zoomY, int subsampleX, int subsampleY, int compRule)); /* 267 */ int (*tk_PhotoSetSize) _ANSI_ARGS_((Tcl_Interp * interp, Tk_PhotoHandle handle, int width, int height)); /* 268 */ + long (*tk_GetUserInactiveTime) _ANSI_ARGS_((Display * dpy)); /* 269 */ + void (*tk_ResetUserInactiveTime) _ANSI_ARGS_((Display * dpy)); /* 270 */ } TkStubs; #ifdef __cplusplus @@ -3102,6 +3114,14 @@ extern TkStubs *tkStubsPtr; #define Tk_PhotoSetSize \ (tkStubsPtr->tk_PhotoSetSize) /* 268 */ #endif +#ifndef Tk_GetUserInactiveTime +#define Tk_GetUserInactiveTime \ + (tkStubsPtr->tk_GetUserInactiveTime) /* 269 */ +#endif +#ifndef Tk_ResetUserInactiveTime +#define Tk_ResetUserInactiveTime \ + (tkStubsPtr->tk_ResetUserInactiveTime) /* 270 */ +#endif #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index aa27eb1..1c6cbd9 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.21 2005/01/07 15:18:02 chengyemao Exp $ + * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.22 2005/05/29 06:47:04 das Exp $ */ #ifndef _TKINTPLATDECLS @@ -230,16 +230,6 @@ EXTERN void TkWinSetHINSTANCE _ANSI_ARGS_((HINSTANCE hInstance)); /* 35 */ EXTERN int TkWinGetPlatformTheme _ANSI_ARGS_((void)); #endif -#ifndef TkWinCleanupContainerList_TCL_DECLARED -#define TkWinCleanupContainerList_TCL_DECLARED -/* 36 */ -EXTERN void TkWinCleanupContainerList _ANSI_ARGS_((void)); -#endif -#ifndef TkpWmGetState_TCL_DECLARED -#define TkpWmGetState_TCL_DECLARED -/* 37 */ -EXTERN int TkpWmGetState _ANSI_ARGS_((TkWindow * winPtr)); -#endif #endif /* __WIN32__ */ #ifdef MAC_OSX_TK #ifndef TkGenerateActivateEvents_TCL_DECLARED @@ -621,8 +611,6 @@ typedef struct TkIntPlatStubs { int (*tkWinGetPlatformId) _ANSI_ARGS_((void)); /* 33 */ void (*tkWinSetHINSTANCE) _ANSI_ARGS_((HINSTANCE hInstance)); /* 34 */ int (*tkWinGetPlatformTheme) _ANSI_ARGS_((void)); /* 35 */ - void (*tkWinCleanupContainerList) _ANSI_ARGS_((void)); /* 36 */ - int (*tkpWmGetState) _ANSI_ARGS_((TkWindow * winPtr)); /* 36 */ #endif /* __WIN32__ */ #ifdef MAC_OSX_TK void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */ @@ -853,14 +841,6 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr; #define TkWinGetPlatformTheme \ (tkIntPlatStubsPtr->tkWinGetPlatformTheme) /* 35 */ #endif -#ifndef TkWinCleanupContainerList -#define TkWinCleanupContainerList \ - (tkIntPlatStubsPtr->tkWinCleanupContainerList) /* 36 */ -#endif -#ifndef TkpWmGetState -#define TkpWmGetState \ - (tkIntPlatStubsPtr->tkpWmGetState) /* 37 */ -#endif #endif /* __WIN32__ */ #ifdef MAC_OSX_TK #ifndef TkGenerateActivateEvents diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index 419b1bc..db6719d 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPlatDecls.h,v 1.10 2004/12/28 08:44:48 chengyemao Exp $ + * RCS: @(#) $Id: tkPlatDecls.h,v 1.11 2005/05/29 06:47:04 das Exp $ */ #ifndef _TKPLATDECLS @@ -65,16 +65,6 @@ EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); #endif -#ifndef Tk_GetMenuHWND_TCL_DECLARED -#define Tk_GetMenuHWND_TCL_DECLARED -/* 6 */ -EXTERN HWND Tk_GetMenuHWND _ANSI_ARGS_((Tk_Window tkwin)); -#endif -#ifndef Tk_GetEmbeddedMenuHWND_TCL_DECLARED -#define Tk_GetEmbeddedMenuHWND_TCL_DECLARED -/* 7 */ -EXTERN HWND Tk_GetEmbeddedMenuHWND _ANSI_ARGS_((Tk_Window tkwin)); -#endif #endif /* __WIN32__ */ #ifdef MAC_OSX_TK #ifndef Tk_MacOSXSetEmbedHandler_TCL_DECLARED @@ -155,8 +145,6 @@ typedef struct TkPlatStubs { Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((HWND hwnd)); /* 3 */ void (*tk_PointerEvent) _ANSI_ARGS_((HWND hwnd, int x, int y)); /* 4 */ int (*tk_TranslateWinEvent) _ANSI_ARGS_((HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT * result)); /* 5 */ - HWND (*tk_GetMenuHWND) _ANSI_ARGS_((Tk_Window tkwin)); /* 6 */ - HWND (*tk_GetEmbeddedMenuHWND) _ANSI_ARGS_((Tk_Window tkwin)); /* 7 */ #endif /* __WIN32__ */ #ifdef MAC_OSX_TK void (*tk_MacOSXSetEmbedHandler) _ANSI_ARGS_((Tk_MacOSXEmbedRegisterWinProc * registerWinProcPtr, Tk_MacOSXEmbedGetGrafPortProc * getPortProcPtr, Tk_MacOSXEmbedMakeContainerExistProc * containerExistProcPtr, Tk_MacOSXEmbedGetClipProc * getClipProc, Tk_MacOSXEmbedGetOffsetInParentProc * getOffsetProc)); /* 0 */ @@ -212,14 +200,6 @@ extern TkPlatStubs *tkPlatStubsPtr; #define Tk_TranslateWinEvent \ (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ #endif -#ifndef Tk_GetMenuHWND -#define Tk_GetMenuHWND \ - (tkPlatStubsPtr->tk_GetMenuHWND) /* 6 */ -#endif -#ifndef Tk_GetEmbeddedMenuHWND -#define Tk_GetEmbeddedMenuHWND \ - (tkPlatStubsPtr->tk_GetEmbeddedMenuHWND) /* 7 */ -#endif #endif /* __WIN32__ */ #ifdef MAC_OSX_TK #ifndef Tk_MacOSXSetEmbedHandler diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 0b81411..bc415e5 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubInit.c,v 1.49 2005/01/07 15:18:03 chengyemao Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.50 2005/05/29 06:47:05 das Exp $ */ #include "tkInt.h" @@ -336,8 +336,6 @@ TkIntPlatStubs tkIntPlatStubs = { TkWinGetPlatformId, /* 33 */ TkWinSetHINSTANCE, /* 34 */ TkWinGetPlatformTheme, /* 35 */ - TkWinCleanupContainerList, /* 36 */ - TkpWmGetState, /* 37 */ #endif /* __WIN32__ */ #ifdef MAC_OSX_TK TkGenerateActivateEvents, /* 0 */ @@ -629,8 +627,6 @@ TkPlatStubs tkPlatStubs = { Tk_HWNDToWindow, /* 3 */ Tk_PointerEvent, /* 4 */ Tk_TranslateWinEvent, /* 5 */ - Tk_GetMenuHWND, /* 6 */ - Tk_GetEmbeddedMenuHWND, /* 7 */ #endif /* __WIN32__ */ #ifdef MAC_OSX_TK Tk_MacOSXSetEmbedHandler, /* 0 */ @@ -926,6 +922,8 @@ TkStubs tkStubs = { Tk_PhotoPutBlock, /* 266 */ Tk_PhotoPutZoomedBlock, /* 267 */ Tk_PhotoSetSize, /* 268 */ + Tk_GetUserInactiveTime, /* 269 */ + Tk_ResetUserInactiveTime, /* 270 */ }; /* !END!: Do not edit above this line. */ diff --git a/macosx/Wish.pbproj/project.pbxproj b/macosx/Wish.pbproj/project.pbxproj index 6f960ea..fb758e1 100644 --- a/macosx/Wish.pbproj/project.pbxproj +++ b/macosx/Wish.pbproj/project.pbxproj @@ -114,12 +114,6 @@ refType = 0; sourceTree = ""; }; - 95911CC8081532D8006F6BCB = { - fileRef = 95911CC7081532D8006F6BCB; - isa = PBXBuildFile; - settings = { - }; - }; 95911CC9081532D8006F6BCB = { fileRef = 95911CC7081532D8006F6BCB; isa = PBXBuildFile; @@ -144,18 +138,6 @@ refType = 0; sourceTree = ""; }; - F50D96130196176E01DC9062 = { - fileRef = F50D96120196176E01DC9062; - isa = PBXBuildFile; - settings = { - }; - }; - F50D96140196176E01DC9062 = { - fileRef = F50D96120196176E01DC9062; - isa = PBXBuildFile; - settings = { - }; - }; F51D903F018149BD01DC9062 = { buildActionMask = 2147483647; dstPath = "Versions/$(FRAMEWORK_VERSION)/Headers/X11"; @@ -2196,7 +2178,6 @@ Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Cop buildActionMask = 2147483647; files = ( F537567E016C3ADB01DC9062, - F50D96130196176E01DC9062, 95911CC9081532D8006F6BCB, ); isa = PBXFrameworksBuildPhase; @@ -3106,10 +3087,10 @@ Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Cop }; F537567C016C3ADB01DC9062 = { children = ( - 95911CC7081532D8006F6BCB, - F50D96120196176E01DC9062, F5875C7B016FEF1D01DC9062, + F50D96120196176E01DC9062, F537567D016C3ADB01DC9062, + 95911CC7081532D8006F6BCB, ); isa = PBXGroup; name = "External Frameworks"; @@ -3455,11 +3436,9 @@ Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Cop buildActionMask = 2147483647; files = ( F53756A8016C4DD401DC9062, - F5875C7D016FEF1D01DC9062, F53756A7016C4DD401DC9062, - F50D96140196176E01DC9062, F5877FB9031F9F49016F146B, - 95911CC8081532D8006F6BCB, + F979766E08499884007D2C84, ); isa = PBXFrameworksBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -3628,12 +3607,6 @@ Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Cop refType = 3; sourceTree = BUILT_PRODUCTS_DIR; }; - F5875C7D016FEF1D01DC9062 = { - fileRef = F5875C7B016FEF1D01DC9062; - isa = PBXBuildFile; - settings = { - }; - }; F5877FB7031F97ED016F146B = { buildActionMask = 8; files = ( @@ -4331,6 +4304,12 @@ Initial MacOS X Port by Jim Ingham <jingham@apple.com> & Ian Reid, Cop refType = 2; sourceTree = SOURCE_ROOT; }; + F979766E08499884007D2C84 = { + fileRef = F5875C7B016FEF1D01DC9062; + isa = PBXBuildFile; + settings = { + }; + }; F9A61D2F04C2C861006F5A0B = { buildActionMask = 8; files = ( diff --git a/macosx/Wish.xcode/project.pbxproj b/macosx/Wish.xcode/project.pbxproj index d98c650..fae189b 100644 --- a/macosx/Wish.xcode/project.pbxproj +++ b/macosx/Wish.xcode/project.pbxproj @@ -1718,9 +1718,10 @@ }; F537567C016C3ADB01DC9062 = { children = ( - F50D96120196176E01DC9062, F5875C7B016FEF1D01DC9062, + F50D96120196176E01DC9062, F537567D016C3ADB01DC9062, + F979735F08499838007D2C84, ); isa = PBXGroup; name = "External Frameworks"; @@ -2374,7 +2375,6 @@ F95787E70745BB260058B6A3, F95787E80745BB260058B6A3, F957893F0745BB270058B6A3, - F95787EA0745BB260058B6A3, F957893E0745BB270058B6A3, ); isa = PBXFrameworksBuildPhase; @@ -2392,12 +2392,6 @@ settings = { }; }; - F95787EA0745BB260058B6A3 = { - fileRef = F50D96120196176E01DC9062; - isa = PBXBuildFile; - settings = { - }; - }; F95787EC0745BB260058B6A3 = { buildActionMask = 2147483647; files = ( @@ -3705,7 +3699,7 @@ buildActionMask = 2147483647; files = ( F95788F80745BB270058B6A3, - F95788F90745BB270058B6A3, + F979736008499838007D2C84, ); isa = PBXFrameworksBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -3716,12 +3710,6 @@ settings = { }; }; - F95788F90745BB270058B6A3 = { - fileRef = F50D96120196176E01DC9062; - isa = PBXBuildFile; - settings = { - }; - }; F95788FA0745BB270058B6A3 = { buildActionMask = 2147483647; files = ( @@ -4255,6 +4243,20 @@ settings = { }; }; + F979735F08499838007D2C84 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = IOKit.framework; + path = /System/Library/Frameworks/IOKit.framework; + refType = 0; + sourceTree = ""; + }; + F979736008499838007D2C84 = { + fileRef = F979735F08499838007D2C84; + isa = PBXBuildFile; + settings = { + }; + }; F9E036AE0748877B00D55D4F = { buildSettings = { GCC_ENABLE_FIX_AND_CONTINUE = YES; diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index d79cf12..d75c52f 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.10 2005/05/27 23:14:29 dkf Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.11 2005/05/29 06:47:05 das Exp $ */ #include "tkInt.h" @@ -1060,5 +1060,5 @@ Tk_GetUserInactiveTime(Display *dpy) void Tk_ResetUserInactiveTime(Display *dpy) { - UpdateSystemActivity(0); + UpdateSystemActivity(OverallAct); } diff --git a/unix/configure b/unix/configure index ec22896..af043c8 100755 --- a/unix/configure +++ b/unix/configure @@ -8633,7 +8633,7 @@ cat >>confdefs.h <<\_ACEOF #define MAC_OSX_TK 1 _ACEOF - LIBS="$LIBS -framework Carbon" + LIBS="$LIBS -framework Carbon -framework IOKit" CFLAGS="$CFLAGS -fpascal-strings" TK_WINDOWINGSYSTEM=AQUA else @@ -9131,7 +9131,8 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking for main in -lXbsd" >&5 +if test $tk_aqua = no; then + echo "$as_me:$LINENO: checking for main in -lXbsd" >&5 echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6 if test "${ac_cv_lib_Xbsd_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -9193,6 +9194,7 @@ if test $ac_cv_lib_Xbsd_main = yes; then LIBS="$LIBS -lXbsd" fi +fi #-------------------------------------------------------------------- # One more check related to the X libraries. The standard releases @@ -9205,7 +9207,7 @@ fi # because it can't deal with the "-" in the library name. #-------------------------------------------------------------------- -if test -d /usr/include/mit ; then +if test -d /usr/include/mit -a $tk_aqua = no; then echo "$as_me:$LINENO: checking MIT X libraries" >&5 echo $ECHO_N "checking MIT X libraries... $ECHO_C" >&6 tk_oldCFlags=$CFLAGS @@ -9273,10 +9275,88 @@ rm -f conftest.err conftest.$ac_objext \ fi #-------------------------------------------------------------------- +# Check whether the header and library for the XScreenSaver +# extension are available, and set HAVE_XSS if so. +# XScreenSaver is needed for Tk_GetUserInactiveTime(). +#-------------------------------------------------------------------- + +if test $tk_aqua = no; then + echo "$as_me:$LINENO: checking for XScreenSaver support" >&5 +echo $ECHO_N "checking for XScreenSaver support... $ECHO_C" >&6 + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES" + tk_oldLibs=$LIBS + LIBS="$LIBS $XLIBSW -lXss -lXext" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + XScreenSaverAllocInfo(); + + ; + 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 + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + XLIBSW="$XLIBSW -lXss -lXext" + cat >>confdefs.h <<\_ACEOF +#define HAVE_XSS 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs +fi + +#-------------------------------------------------------------------- # Check for freetype / fontconfig / Xft support. #-------------------------------------------------------------------- -# Check whether --enable-xft or --disable-xft was given. +if test $tk_aqua = no; then + # Check whether --enable-xft or --disable-xft was given. if test "${enable_xft+set}" = set; then enableval="$enable_xft" enable_xft=$enableval @@ -9284,40 +9364,41 @@ 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 - enable_xft=yes - 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 + XFT_CFLAGS="" + XFT_LIBS="" if test "$enable_xft" = "yes" ; then - echo "$as_me:$LINENO: result: ok" >&5 + 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 + enable_xft=yes + 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 - { echo "$as_me:$LINENO: WARNING: Can't find xft configuration" >&5 + else + { echo "$as_me:$LINENO: WARNING: Can't find xft configuration" >&5 echo "$as_me: WARNING: Can't find xft configuration" >&2;} + fi fi -fi -if test $enable_xft = "yes" ; then - UNIX_FONT_OBJS=tkUnixRFont.o + if test $enable_xft = "yes" ; then + UNIX_FONT_OBJS=tkUnixRFont.o cat >>confdefs.h <<\_ACEOF #define HAVE_XFT 1 _ACEOF -else - UNIX_FONT_OBJS=tkUnixFont.o -fi + else + UNIX_FONT_OBJS=tkUnixFont.o + fi +fi #-------------------------------------------------------------------- # Figure out whether "char" is unsigned. If so, set a diff --git a/unix/configure.in b/unix/configure.in index 732b301..b94c4ce 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.105 2005/05/27 23:14:29 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.106 2005/05/29 06:47:05 das Exp $ AC_INIT([tk],[8.5]) AC_PREREQ(2.57) @@ -227,7 +227,7 @@ fi if test $tk_aqua = yes; then AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?]) - LIBS="$LIBS -framework Carbon" + LIBS="$LIBS -framework Carbon -framework IOKit" CFLAGS="$CFLAGS -fpascal-strings" TK_WINDOWINGSYSTEM=AQUA else @@ -290,7 +290,9 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- -AC_CHECK_LIB(Xbsd, main, [LIBS="$LIBS -lXbsd"]) +if test $tk_aqua = no; then + AC_CHECK_LIB(Xbsd, main, [LIBS="$LIBS -lXbsd"]) +fi #-------------------------------------------------------------------- # One more check related to the X libraries. The standard releases @@ -303,7 +305,7 @@ AC_CHECK_LIB(Xbsd, main, [LIBS="$LIBS -lXbsd"]) # because it can't deal with the "-" in the library name. #-------------------------------------------------------------------- -if test -d /usr/include/mit ; then +if test -d /usr/include/mit -a $tk_aqua = no; then AC_MSG_CHECKING([MIT X libraries]) tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" @@ -327,60 +329,65 @@ fi # extension are available, and set HAVE_XSS if so. # XScreenSaver is needed for Tk_GetUserInactiveTime(). #-------------------------------------------------------------------- -AC_MSG_CHECKING([for XScreenSaver support]) -tk_oldCFlags=$CFLAGS -CFLAGS="$CFLAGS $XINCLUDES" -tk_oldLibs=$LIBS -LIBS="$LIBS $XLIBSW -lXss -lXext" -AC_TRY_LINK([ - #include - #include -] , [ - XScreenSaverAllocInfo(); -], [ - AC_MSG_RESULT(yes) - XLIBSW="$XLIBSW -lXss -lXext" - AC_DEFINE([HAVE_XSS]) -], AC_MSG_RESULT(no)) -CFLAGS=$tk_oldCFlags -LIBS=$tk_oldLibs + +if test $tk_aqua = no; then + AC_MSG_CHECKING([for XScreenSaver support]) + tk_oldCFlags=$CFLAGS + CFLAGS="$CFLAGS $XINCLUDES" + tk_oldLibs=$LIBS + LIBS="$LIBS $XLIBSW -lXss -lXext" + AC_TRY_LINK([ + #include + #include + ] , [ + XScreenSaverAllocInfo(); + ], [ + AC_MSG_RESULT(yes) + XLIBSW="$XLIBSW -lXss -lXext" + AC_DEFINE([HAVE_XSS]) + ], AC_MSG_RESULT(no)) + CFLAGS=$tk_oldCFlags + LIBS=$tk_oldLibs +fi #-------------------------------------------------------------------- # Check for freetype / fontconfig / Xft support. #-------------------------------------------------------------------- -AC_ARG_ENABLE(xft, - [ --enable-xft Use freetype/fontconfig/xft [--disable-xft]], - [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 - enable_xft=yes - 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 $tk_aqua = no; then + AC_ARG_ENABLE(xft, + [ --enable-xft Use freetype/fontconfig/xft [--disable-xft]], + [enable_xft=$enableval], + [enable_xft="no"]) + + XFT_CFLAGS="" + XFT_LIBS="" if test "$enable_xft" = "yes" ; then - AC_MSG_RESULT([ok]) + 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 + enable_xft=yes + 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 + AC_MSG_WARN([Can't find xft configuration]) + fi + fi + if test $enable_xft = "yes" ; then + UNIX_FONT_OBJS=tkUnixRFont.o + AC_DEFINE(HAVE_XFT, 1, [Have we turned on XFT (antialiased fonts)?]) else - AC_MSG_WARN([Can't find xft configuration]) + UNIX_FONT_OBJS=tkUnixFont.o fi + + AC_SUBST(XFT_CFLAGS) + AC_SUBST(XFT_LIBS) + AC_SUBST(UNIX_FONT_OBJS) fi -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) #-------------------------------------------------------------------- # Figure out whether "char" is unsigned. If so, set a -- cgit v0.12