From 75d0d5da127d9d9b7fbc4b5989c6510eb950e402 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 Apr 2012 13:30:03 +0000 Subject: implement various internal win32 stub functions for cygwin --- doc/GetHWND.3 | 2 +- generic/tk.decls | 23 +++- generic/tkInt.decls | 22 ++-- generic/tkIntDecls.h | 294 -------------------------------------------- generic/tkPlatDecls.h | 52 ++++++++ generic/tkStubInit.c | 145 ++++++++-------------- generic/tkWindow.c | 25 +++- unix/Makefile.in | 5 +- unix/configure | 333 ++++++++++++++++++++++++++------------------------ unix/tcl.m4 | 21 +++- 10 files changed, 348 insertions(+), 574 deletions(-) diff --git a/doc/GetHWND.3 b/doc/GetHWND.3 index 70fb0dd..06bdf37 100644 --- a/doc/GetHWND.3 +++ b/doc/GetHWND.3 @@ -6,7 +6,7 @@ .TH HWND 3 8.0 Tk "Tk Library Procedures" .BS .SH NAME -Tk_GetHWND, Tk_AttachHWND \- manage interactione between the Windows handle and an X window +Tk_GetHWND, Tk_AttachHWND \- manage interactions between the Windows handle and an X window .SH SYNOPSIS .nf \fB#include \fR diff --git a/generic/tk.decls b/generic/tk.decls index c024cdb..2fae0b8 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -1026,7 +1026,28 @@ interface tkPlat ################################ # Unix specific functions -# (none) +# + +declare 0 unix { + Window Tk_AttachHWND(Tk_Window tkwin, void *hwnd) +} +declare 1 unix { + void *Tk_GetHINSTANCE(void) +} +declare 2 unix { + void *Tk_GetHWND(Window window) +} +declare 3 unix { + Tk_Window Tk_HWNDToWindow(void *hwnd) +} +declare 4 unix { + void Tk_PointerEvent(void *hwnd, int x, int y) +} +declare 5 unix { + int Tk_TranslateWinEvent(void *hwnd, + unsigned int message, int wParam, int lParam, int *result) +} + ################################ # Windows specific functions diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 68b8788..3453f88 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -403,26 +403,26 @@ declare 111 { declare 112 { void TkpMenuThreadInit(void) } -declare 113 {mac aqua win} { +declare 113 { void TkClipBox(TkRegion rgn, XRectangle *rect_return) } -declare 114 {mac aqua win} { +declare 114 { TkRegion TkCreateRegion(void) } -declare 115 {mac aqua win} { +declare 115 { void TkDestroyRegion(TkRegion rgn) } -declare 116 {mac aqua win} { +declare 116 { void TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return) } -declare 117 {mac aqua win} { +declare 117 { int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width, unsigned int height) } -declare 118 {mac aqua win} { +declare 118 { void TkSetRegion(Display *display, GC gc, TkRegion rgn) } -declare 119 {mac aqua win} { +declare 119 { void TkUnionRectWithRegion(XRectangle *rect, TkRegion src, TkRegion dr_return) } @@ -468,7 +468,7 @@ declare 143 { declare 144 { void TkGCCleanup(TkDisplay *dispPtr) } -declare 145 {mac win aqua} { +declare 145 { void TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return) } declare 146 { @@ -655,6 +655,9 @@ declare 33 win { declare 34 win { void TkWinSetHINSTANCE(HINSTANCE hInstance) } +declare 35 win { + int TkWinGetPlatformTheme(void) +} ################################ # Mac specific functions @@ -836,9 +839,6 @@ declare 65 mac { declare 66 mac { int TkpIsWindowFloating(WindowRef window) } -declare 35 win { - int TkWinGetPlatformTheme(void) -} ################################ # Aqua specific functions diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 3654621..23dcda4 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -362,108 +362,26 @@ EXTERN Tcl_Obj * TkpGetSystemDefault _ANSI_ARGS_((Tk_Window tkwin, CONST char *dbName, CONST char *className)); /* 112 */ EXTERN void TkpMenuThreadInit _ANSI_ARGS_((void)); -#ifdef __WIN32__ -/* 113 */ -EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn, - XRectangle *rect_return)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL -/* 113 */ -EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn, - XRectangle *rect_return)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK /* 113 */ EXTERN void TkClipBox _ANSI_ARGS_((TkRegion rgn, XRectangle *rect_return)); -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -/* 114 */ -EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL -/* 114 */ -EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK /* 114 */ EXTERN TkRegion TkCreateRegion _ANSI_ARGS_((void)); -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -/* 115 */ -EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL /* 115 */ EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -/* 115 */ -EXTERN void TkDestroyRegion _ANSI_ARGS_((TkRegion rgn)); -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -/* 116 */ -EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra, - TkRegion srcb, TkRegion dr_return)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL /* 116 */ EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -/* 116 */ -EXTERN void TkIntersectRegion _ANSI_ARGS_((TkRegion sra, - TkRegion srcb, TkRegion dr_return)); -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -/* 117 */ -EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x, - int y, unsigned int width, - unsigned int height)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL -/* 117 */ -EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x, - int y, unsigned int width, - unsigned int height)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK /* 117 */ EXTERN int TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -/* 118 */ -EXTERN void TkSetRegion _ANSI_ARGS_((Display *display, GC gc, - TkRegion rgn)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL /* 118 */ EXTERN void TkSetRegion _ANSI_ARGS_((Display *display, GC gc, TkRegion rgn)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -/* 118 */ -EXTERN void TkSetRegion _ANSI_ARGS_((Display *display, GC gc, - TkRegion rgn)); -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ /* 119 */ EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle *rect, TkRegion src, TkRegion dr_return)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL -/* 119 */ -EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle *rect, - TkRegion src, TkRegion dr_return)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -/* 119 */ -EXTERN void TkUnionRectWithRegion _ANSI_ARGS_((XRectangle *rect, - TkRegion src, TkRegion dr_return)); -#endif /* MAC_OSX_TK */ /* Slot 120 is reserved */ #ifdef MAC_TCL /* 121 */ @@ -531,21 +449,9 @@ EXTERN void TkFocusFree _ANSI_ARGS_((TkMainInfo *mainPtr)); EXTERN void TkClipCleanup _ANSI_ARGS_((TkDisplay *dispPtr)); /* 144 */ EXTERN void TkGCCleanup _ANSI_ARGS_((TkDisplay *dispPtr)); -#ifdef __WIN32__ -/* 145 */ -EXTERN void TkSubtractRegion _ANSI_ARGS_((TkRegion sra, - TkRegion srcb, TkRegion dr_return)); -#endif /* __WIN32__ */ -#ifdef MAC_TCL -/* 145 */ -EXTERN void TkSubtractRegion _ANSI_ARGS_((TkRegion sra, - TkRegion srcb, TkRegion dr_return)); -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK /* 145 */ EXTERN void TkSubtractRegion _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); -#endif /* MAC_OSX_TK */ /* 146 */ EXTERN void TkStylePkgInit _ANSI_ARGS_((TkMainInfo *mainPtr)); /* 147 */ @@ -680,90 +586,13 @@ typedef struct TkIntStubs { void (*tkpGetSubFonts) _ANSI_ARGS_((Tcl_Interp *interp, Tk_Font tkfont)); /* 110 */ Tcl_Obj * (*tkpGetSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char *dbName, CONST char *className)); /* 111 */ void (*tkpMenuThreadInit) _ANSI_ARGS_((void)); /* 112 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved113; -#endif /* UNIX */ -#ifdef __WIN32__ - void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle *rect_return)); /* 113 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle *rect_return)); /* 113 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle *rect_return)); /* 113 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved114; -#endif /* UNIX */ -#ifdef __WIN32__ TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved115; -#endif /* UNIX */ -#ifdef __WIN32__ void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved116; -#endif /* UNIX */ -#ifdef __WIN32__ void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved117; -#endif /* UNIX */ -#ifdef __WIN32__ - int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved118; -#endif /* UNIX */ -#ifdef __WIN32__ - void (*tkSetRegion) _ANSI_ARGS_((Display *display, GC gc, TkRegion rgn)); /* 118 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - void (*tkSetRegion) _ANSI_ARGS_((Display *display, GC gc, TkRegion rgn)); /* 118 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK void (*tkSetRegion) _ANSI_ARGS_((Display *display, GC gc, TkRegion rgn)); /* 118 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved119; -#endif /* UNIX */ -#ifdef __WIN32__ - void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle *rect, TkRegion src, TkRegion dr_return)); /* 119 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle *rect, TkRegion src, TkRegion dr_return)); /* 119 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle *rect, TkRegion src, TkRegion dr_return)); /* 119 */ -#endif /* MAC_OSX_TK */ VOID *reserved120; #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ VOID *reserved121; @@ -822,18 +651,7 @@ typedef struct TkIntStubs { void (*tkFocusFree) _ANSI_ARGS_((TkMainInfo *mainPtr)); /* 142 */ void (*tkClipCleanup) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 143 */ void (*tkGCCleanup) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 144 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - VOID *reserved145; -#endif /* UNIX */ -#ifdef __WIN32__ - void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */ -#endif /* MAC_OSX_TK */ void (*tkStylePkgInit) _ANSI_ARGS_((TkMainInfo *mainPtr)); /* 146 */ void (*tkStylePkgFree) _ANSI_ARGS_((TkMainInfo *mainPtr)); /* 147 */ Tk_Window (*tkToplevelWindowForCommand) _ANSI_ARGS_((Tcl_Interp *interp, CONST char *cmdName)); /* 148 */ @@ -1306,132 +1124,34 @@ extern TkIntStubs *tkIntStubsPtr; #define TkpMenuThreadInit \ (tkIntStubsPtr->tkpMenuThreadInit) /* 112 */ #endif -#ifdef __WIN32__ -#ifndef TkClipBox -#define TkClipBox \ - (tkIntStubsPtr->tkClipBox) /* 113 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL #ifndef TkClipBox #define TkClipBox \ (tkIntStubsPtr->tkClipBox) /* 113 */ #endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -#ifndef TkClipBox -#define TkClipBox \ - (tkIntStubsPtr->tkClipBox) /* 113 */ -#endif -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -#ifndef TkCreateRegion -#define TkCreateRegion \ - (tkIntStubsPtr->tkCreateRegion) /* 114 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TkCreateRegion -#define TkCreateRegion \ - (tkIntStubsPtr->tkCreateRegion) /* 114 */ -#endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK #ifndef TkCreateRegion #define TkCreateRegion \ (tkIntStubsPtr->tkCreateRegion) /* 114 */ #endif -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -#ifndef TkDestroyRegion -#define TkDestroyRegion \ - (tkIntStubsPtr->tkDestroyRegion) /* 115 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TkDestroyRegion -#define TkDestroyRegion \ - (tkIntStubsPtr->tkDestroyRegion) /* 115 */ -#endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK #ifndef TkDestroyRegion #define TkDestroyRegion \ (tkIntStubsPtr->tkDestroyRegion) /* 115 */ #endif -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -#ifndef TkIntersectRegion -#define TkIntersectRegion \ - (tkIntStubsPtr->tkIntersectRegion) /* 116 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TkIntersectRegion -#define TkIntersectRegion \ - (tkIntStubsPtr->tkIntersectRegion) /* 116 */ -#endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK #ifndef TkIntersectRegion #define TkIntersectRegion \ (tkIntStubsPtr->tkIntersectRegion) /* 116 */ #endif -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -#ifndef TkRectInRegion -#define TkRectInRegion \ - (tkIntStubsPtr->tkRectInRegion) /* 117 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TkRectInRegion -#define TkRectInRegion \ - (tkIntStubsPtr->tkRectInRegion) /* 117 */ -#endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK #ifndef TkRectInRegion #define TkRectInRegion \ (tkIntStubsPtr->tkRectInRegion) /* 117 */ #endif -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -#ifndef TkSetRegion -#define TkSetRegion \ - (tkIntStubsPtr->tkSetRegion) /* 118 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL #ifndef TkSetRegion #define TkSetRegion \ (tkIntStubsPtr->tkSetRegion) /* 118 */ #endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -#ifndef TkSetRegion -#define TkSetRegion \ - (tkIntStubsPtr->tkSetRegion) /* 118 */ -#endif -#endif /* MAC_OSX_TK */ -#ifdef __WIN32__ -#ifndef TkUnionRectWithRegion -#define TkUnionRectWithRegion \ - (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */ -#endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL #ifndef TkUnionRectWithRegion #define TkUnionRectWithRegion \ (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */ #endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -#ifndef TkUnionRectWithRegion -#define TkUnionRectWithRegion \ - (tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */ -#endif -#endif /* MAC_OSX_TK */ /* Slot 120 is reserved */ #ifdef MAC_TCL #ifndef TkpCreateNativeBitmap @@ -1520,24 +1240,10 @@ extern TkIntStubs *tkIntStubsPtr; #define TkGCCleanup \ (tkIntStubsPtr->tkGCCleanup) /* 144 */ #endif -#ifdef __WIN32__ #ifndef TkSubtractRegion #define TkSubtractRegion \ (tkIntStubsPtr->tkSubtractRegion) /* 145 */ #endif -#endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TkSubtractRegion -#define TkSubtractRegion \ - (tkIntStubsPtr->tkSubtractRegion) /* 145 */ -#endif -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK -#ifndef TkSubtractRegion -#define TkSubtractRegion \ - (tkIntStubsPtr->tkSubtractRegion) /* 145 */ -#endif -#endif /* MAC_OSX_TK */ #ifndef TkStylePkgInit #define TkStylePkgInit \ (tkIntStubsPtr->tkStylePkgInit) /* 146 */ diff --git a/generic/tkPlatDecls.h b/generic/tkPlatDecls.h index ecc5919..f9bce86 100644 --- a/generic/tkPlatDecls.h +++ b/generic/tkPlatDecls.h @@ -29,6 +29,24 @@ * Exported function declarations: */ +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +/* 0 */ +EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, + VOID *hwnd)); +/* 1 */ +EXTERN VOID * Tk_GetHINSTANCE _ANSI_ARGS_((void)); +/* 2 */ +EXTERN VOID * Tk_GetHWND _ANSI_ARGS_((Window window)); +/* 3 */ +EXTERN Tk_Window Tk_HWNDToWindow _ANSI_ARGS_((VOID *hwnd)); +/* 4 */ +EXTERN void Tk_PointerEvent _ANSI_ARGS_((VOID *hwnd, int x, + int y)); +/* 5 */ +EXTERN int Tk_TranslateWinEvent _ANSI_ARGS_((VOID *hwnd, + unsigned int message, int wParam, int lParam, + int *result)); +#endif /* UNIX */ #ifdef __WIN32__ /* 0 */ EXTERN Window Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin, @@ -117,6 +135,14 @@ typedef struct TkPlatStubs { int magic; struct TkPlatStubHooks *hooks; +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ + Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, VOID *hwnd)); /* 0 */ + VOID * (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); /* 1 */ + VOID * (*tk_GetHWND) _ANSI_ARGS_((Window window)); /* 2 */ + Tk_Window (*tk_HWNDToWindow) _ANSI_ARGS_((VOID *hwnd)); /* 3 */ + void (*tk_PointerEvent) _ANSI_ARGS_((VOID *hwnd, int x, int y)); /* 4 */ + int (*tk_TranslateWinEvent) _ANSI_ARGS_((VOID *hwnd, unsigned int message, int wParam, int lParam, int *result)); /* 5 */ +#endif /* UNIX */ #ifdef __WIN32__ Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd)); /* 0 */ HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); /* 1 */ @@ -167,6 +193,32 @@ extern TkPlatStubs *tkPlatStubsPtr; * Inline function declarations: */ +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#ifndef Tk_AttachHWND +#define Tk_AttachHWND \ + (tkPlatStubsPtr->tk_AttachHWND) /* 0 */ +#endif +#ifndef Tk_GetHINSTANCE +#define Tk_GetHINSTANCE \ + (tkPlatStubsPtr->tk_GetHINSTANCE) /* 1 */ +#endif +#ifndef Tk_GetHWND +#define Tk_GetHWND \ + (tkPlatStubsPtr->tk_GetHWND) /* 2 */ +#endif +#ifndef Tk_HWNDToWindow +#define Tk_HWNDToWindow \ + (tkPlatStubsPtr->tk_HWNDToWindow) /* 3 */ +#endif +#ifndef Tk_PointerEvent +#define Tk_PointerEvent \ + (tkPlatStubsPtr->tk_PointerEvent) /* 4 */ +#endif +#ifndef Tk_TranslateWinEvent +#define Tk_TranslateWinEvent \ + (tkPlatStubsPtr->tk_TranslateWinEvent) /* 5 */ +#endif +#endif /* UNIX */ #ifdef __WIN32__ #ifndef Tk_AttachHWND #define Tk_AttachHWND \ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index a82e044..89ae433 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -40,18 +40,59 @@ /* * Remove macros that will interfere with the definitions below. */ +#undef TkClipBox +#undef TkCreateRegion +#undef TkDestroyRegion +#undef TkIntersectRegion +#undef TkRectInRegion +#undef TkSetRegion +#undef TkUnionRectWithRegion +#undef TkSubtractRegion -#define Tk_CreateCanvasVisitor ((void (*) _ANSI_ARGS_((Tcl_Interp * interp, \ - VOID * typePtr))) NULL) -#define Tk_GetCanvasVisitor ((VOID * (*) _ANSI_ARGS_((Tcl_Interp * interp, \ - CONST char * name))) NULL) +TkIntStubs tkIntStubs; #ifndef __WIN32__ /* Make sure that extensions which call XParseColor through * the stub table, call TkParseColor in stead. See bug #3486474 */ # define XParseColor TkParseColor + +# if !defined(MAC_TCL) && !defined(MAC_OSX_TCL) +# define Tk_AttachHWND 0 +# define Tk_GetHWND 0 +# define Tk_HWNDToWindow 0 +# define Tk_PointerEvent 0 +# define Tk_TranslateWinEvent 0 +# define TkClipBox (void (*) _ANSI_ARGS_((TkRegion, XRectangle *))) XClipBox +# define TkCreateRegion (TkRegion (*) ()) XCreateRegion +# define TkDestroyRegion (void (*) _ANSI_ARGS_((TkRegion))) XDestroyRegion +# define TkIntersectRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XIntersectRegion +# define TkRectInRegion (int (*) _ANSI_ARGS_((TkRegion, int, int, unsigned int, unsigned int))) XRectInRegion +# define TkSetRegion (void (*) _ANSI_ARGS_((Display *, GC, TkRegion))) XSetRegion +# define TkUnionRectWithRegion (void (*) _ANSI_ARGS_((XRectangle *, TkRegion, TkRegion))) XUnionRectWithRegion +# define TkSubtractRegion (void (*) _ANSI_ARGS_((TkRegion, TkRegion, TkRegion))) XSubtractRegion + +#ifdef __CYGWIN__ +/* Trick, so we don't have to include here, which + * - b.t.w. - lacks this function anyway */ +#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004 +int __stdcall GetModuleHandleExW(unsigned int, const char *, void *); + +#define Tk_GetHINSTANCE TkPlatGetHINSTANCE +static void *Tk_GetHINSTANCE() +{ + void *hInstance = NULL; + GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, + (const char *)&tkIntStubs, &hInstance); + return hInstance; +} +#else +# define Tk_GetHINSTANCE 0 #endif +# endif /* !MAC_TCL && !MACC_OSX_TCL */ + +#endif /* !__WIN32__ */ + /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations @@ -176,90 +217,13 @@ TkIntStubs tkIntStubs = { TkpGetSubFonts, /* 110 */ TkpGetSystemDefault, /* 111 */ TkpMenuThreadInit, /* 112 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 113 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkClipBox, /* 113 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkClipBox, /* 113 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK TkClipBox, /* 113 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 114 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkCreateRegion, /* 114 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkCreateRegion, /* 114 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK TkCreateRegion, /* 114 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 115 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkDestroyRegion, /* 115 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkDestroyRegion, /* 115 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK TkDestroyRegion, /* 115 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 116 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkIntersectRegion, /* 116 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL TkIntersectRegion, /* 116 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - TkIntersectRegion, /* 116 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 117 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkRectInRegion, /* 117 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkRectInRegion, /* 117 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK TkRectInRegion, /* 117 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 118 */ -#endif /* UNIX */ -#ifdef __WIN32__ TkSetRegion, /* 118 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkSetRegion, /* 118 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - TkSetRegion, /* 118 */ -#endif /* MAC_OSX_TK */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 119 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkUnionRectWithRegion, /* 119 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TkUnionRectWithRegion, /* 119 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK TkUnionRectWithRegion, /* 119 */ -#endif /* MAC_OSX_TK */ NULL, /* 120 */ #if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ NULL, /* 121 */ @@ -318,18 +282,7 @@ TkIntStubs tkIntStubs = { TkFocusFree, /* 142 */ TkClipCleanup, /* 143 */ TkGCCleanup, /* 144 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - NULL, /* 145 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TkSubtractRegion, /* 145 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL TkSubtractRegion, /* 145 */ -#endif /* MAC_TCL */ -#ifdef MAC_OSX_TK - TkSubtractRegion, /* 145 */ -#endif /* MAC_OSX_TK */ TkStylePkgInit, /* 146 */ TkStylePkgFree, /* 147 */ TkToplevelWindowForCommand, /* 148 */ @@ -826,6 +779,14 @@ TkIntXlibStubs tkIntXlibStubs = { TkPlatStubs tkPlatStubs = { TCL_STUB_MAGIC, NULL, +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ + Tk_AttachHWND, /* 0 */ + Tk_GetHINSTANCE, /* 1 */ + Tk_GetHWND, /* 2 */ + Tk_HWNDToWindow, /* 3 */ + Tk_PointerEvent, /* 4 */ + Tk_TranslateWinEvent, /* 5 */ +#endif /* UNIX */ #ifdef __WIN32__ Tk_AttachHWND, /* 0 */ Tk_GetHINSTANCE, /* 1 */ diff --git a/generic/tkWindow.c b/generic/tkWindow.c index d3de72d..a04777f 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -101,6 +101,7 @@ static CONST XSetWindowAttributes defAtts= { #define ISSAFE 1 #define PASSMAINWINDOW 2 +#define WINMACONLY 4 typedef struct { CONST char *name; /* Name of command. */ @@ -135,9 +136,9 @@ static CONST TkCmd commands[] = { {"tkwait", NULL, Tk_TkwaitObjCmd, PASSMAINWINDOW|ISSAFE}, #if defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK) {"tk_chooseColor", NULL, Tk_ChooseColorObjCmd, PASSMAINWINDOW}, - {"tk_chooseDirectory", NULL, Tk_ChooseDirectoryObjCmd, PASSMAINWINDOW}, - {"tk_getOpenFile", NULL, Tk_GetOpenFileObjCmd, PASSMAINWINDOW}, - {"tk_getSaveFile", NULL, Tk_GetSaveFileObjCmd, PASSMAINWINDOW}, + {"tk_chooseDirectory", NULL, Tk_ChooseDirectoryObjCmd, WINMACONLY|PASSMAINWINDOW}, + {"tk_getOpenFile", NULL, Tk_GetOpenFileObjCmd, WINMACONLY|PASSMAINWINDOW}, + {"tk_getSaveFile", NULL, Tk_GetSaveFileObjCmd, WINMACONLY|PASSMAINWINDOW}, #endif #if defined(__WIN32__) || defined(MAC_OSX_TK) {"tk_messageBox", NULL, Tk_MessageBoxObjCmd, PASSMAINWINDOW}, @@ -851,6 +852,9 @@ TkCreateMainWindow(interp, screenName, baseName) Tk_Window tkwin; int dummy; int isSafe; +#ifdef __WIN32__ + int isWin32 = 0; +#endif Tcl_HashEntry *hPtr; register TkMainInfo *mainPtr; register TkWindow *winPtr; @@ -858,7 +862,15 @@ TkCreateMainWindow(interp, screenName, baseName) ClientData clientData; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - +#ifdef __WIN32__ + Tcl_Obj *stringObjPtr = Tcl_GetVar2Ex(interp, "::tcl_platform", "platform", 0); + + if (stringObjPtr + && !strcmp(Tcl_GetString(stringObjPtr), "windows")) { + isWin32 = 1; + } +#endif + /* * Panic if someone updated the TkWindow structure without * also updating the Tk_FakeWin structure (or vice versa). @@ -941,6 +953,11 @@ TkCreateMainWindow(interp, screenName, baseName) if ((cmdPtr->cmdProc == NULL) && (cmdPtr->objProc == NULL)) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } +#ifdef __WIN32__ + if (!isWin32 && (cmdPtr->flags & WINMACONLY)) { + continue; + } +#endif if (cmdPtr->flags & PASSMAINWINDOW) { clientData = (ClientData) tkwin; } else { diff --git a/unix/Makefile.in b/unix/Makefile.in index b43c1ef..8a3856b 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -56,6 +56,7 @@ BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir) # Directory in which to install the .a or .so binary for the Tk library: LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) +DLL_INSTALL_DIR = @DLL_INSTALL_DIR@ # Path name to use when installing library scripts. SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY) @@ -643,9 +644,9 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish echo "}";\ ) > $(PKG_INDEX); \ fi - @echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/" + @echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/" @@INSTALL_LIB@ - @chmod 555 $(LIB_INSTALL_DIR)/$(LIB_FILE) + @chmod 555 $(DLL_INSTALL_DIR)/$(LIB_FILE) @if test "$(TK_BUILD_EXP_FILE)" != ""; then \ echo "Installing $(TK_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \ $(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \ diff --git a/unix/configure b/unix/configure index 0e2a252..6a3a75b 100755 --- a/unix/configure +++ b/unix/configure @@ -2778,7 +2778,6 @@ echo "$ac_t""$tcl_cv_cc_m64" 1>&6 CFLAGS="$CFLAGS -fno-inline" fi - # XIM peeking works under XFree86. cat >> confdefs.h <<\EOF #define PEEK_XCLOSEIM 1 EOF @@ -2799,17 +2798,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2803: checking for dld.h" >&5 +echo "configure:2802: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2878,17 +2877,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2882: checking for dlfcn.h" >&5 +echo "configure:2881: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2916,13 +2915,13 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2920: checking for ELF" >&5 +echo "configure:2919: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:3005: checking for ELF" >&5 +echo "configure:3004: checking for ELF" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 case `arch` in ppc) echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6 -echo "configure:3113: checking if compiler accepts -arch ppc64 flag" >&5 +echo "configure:3112: checking if compiler accepts -arch ppc64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3117,14 +3116,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_arch_ppc64=yes else @@ -3144,7 +3143,7 @@ echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6 fi;; i386) echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6 -echo "configure:3148: checking if compiler accepts -arch x86_64 flag" >&5 +echo "configure:3147: checking if compiler accepts -arch x86_64 flag" >&5 if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3152,14 +3151,14 @@ else hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_cc_arch_x86_64=yes else @@ -3188,7 +3187,7 @@ echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6 fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 -echo "configure:3192: checking if ld accepts -single_module flag" >&5 +echo "configure:3191: checking if ld accepts -single_module flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3196,14 +3195,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_single_module=yes else @@ -3229,7 +3228,7 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 -echo "configure:3233: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:3232: checking if ld accepts -search_paths_first flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3237,14 +3236,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_search_paths_first=yes else @@ -3267,7 +3266,7 @@ echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6 PLAT_OBJS=\$\(MAC\_OSX_OBJS\) PLAT_SRCS=\$\(MAC\_OSX_SRCS\) echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6 -echo "configure:3271: checking whether to use CoreFoundation" >&5 +echo "configure:3270: checking whether to use CoreFoundation" >&5 # Check whether --enable-corefoundation or --disable-corefoundation was given. if test "${enable_corefoundation+set}" = set; then enableval="$enable_corefoundation" @@ -3279,7 +3278,7 @@ fi echo "$ac_t""$tcl_corefoundation" 1>&6 if test $tcl_corefoundation = yes; then echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6 -echo "configure:3283: checking for CoreFoundation.framework" >&5 +echo "configure:3282: checking for CoreFoundation.framework" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3293,14 +3292,14 @@ else done; fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -3327,7 +3326,7 @@ EOF fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6 -echo "configure:3331: checking for 64-bit CoreFoundation" >&5 +echo "configure:3330: checking for 64-bit CoreFoundation" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3336,14 +3335,14 @@ else eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation_64=yes else @@ -3672,7 +3671,7 @@ EOF # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 -echo "configure:3676: checking for ld accepts -Bexport flag" >&5 +echo "configure:3675: checking for ld accepts -Bexport flag" >&5 if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3680,14 +3679,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_ld_Bexport=yes else @@ -3737,13 +3736,13 @@ echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6 if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3741: checking sys/exec.h" >&5 +echo "configure:3740: checking sys/exec.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -3761,7 +3760,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexec_h=usable else @@ -3781,13 +3780,13 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3785: checking a.out.h" >&5 +echo "configure:3784: checking a.out.h" >&5 if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -3805,7 +3804,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_aout_h=usable else @@ -3825,13 +3824,13 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3829: checking sys/exec_aout.h" >&5 +echo "configure:3828: checking sys/exec_aout.h" >&5 if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -3849,7 +3848,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_sysexecaout_h=usable else @@ -3929,11 +3928,17 @@ fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + else + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + fi else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -3961,12 +3966,12 @@ fi # warning when initializing a union member. echo $ac_n "checking for cast to union support""... $ac_c" 1>&6 -echo "configure:3965: checking for cast to union support" >&5 +echo "configure:3970: checking for cast to union support" >&5 if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_cast_to_union=yes else @@ -4026,11 +4031,12 @@ EOF + echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:4034: checking for build with symbols" >&5 +echo "configure:4040: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -4095,21 +4101,21 @@ TK_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:4099: checking for required early compiler flags" >&5 +echo "configure:4105: checking for required early compiler flags" >&5 tcl_flags="" if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -4117,7 +4123,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4125,7 +4131,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -4152,14 +4158,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -4167,7 +4173,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4175,7 +4181,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:4179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=yes else @@ -4202,14 +4208,14 @@ EOF echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -4217,7 +4223,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4225,7 +4231,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4256,7 +4262,7 @@ EOF echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4260: checking for 64-bit integer type" >&5 +echo "configure:4266: checking for 64-bit integer type" >&5 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4264,14 +4270,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4285,7 +4291,7 @@ rm -f conftest* # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4319,13 +4325,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4323: checking for struct dirent64" >&5 +echo "configure:4329: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4333,7 +4339,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4354,13 +4360,13 @@ EOF fi echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4358: checking for struct stat64" >&5 +echo "configure:4364: checking for struct stat64" >&5 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4368,7 +4374,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4391,12 +4397,12 @@ EOF for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4395: checking for $ac_func" >&5 +echo "configure:4401: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4444,13 +4450,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4448: checking for off64_t" >&5 +echo "configure:4454: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4458,7 +4464,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4489,14 +4495,14 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4493: checking whether byte ordering is bigendian" >&5 +echo "configure:4499: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4507,11 +4513,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4522,7 +4528,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4542,7 +4548,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -4607,20 +4613,20 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:4611: checking for fd_set in sys/types" >&5 +echo "configure:4617: checking for fd_set in sys/types" >&5 if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:4624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -4636,13 +4642,13 @@ echo "$ac_t""$tcl_cv_type_fd_set" 1>&6 tk_ok=$tcl_cv_type_fd_set if test $tk_ok = no; then echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 -echo "configure:4640: checking for fd_mask in sys/select" >&5 +echo "configure:4646: checking for fd_mask in sys/select" >&5 if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -4682,17 +4688,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4686: checking for $ac_hdr" >&5 +echo "configure:4692: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4719,12 +4725,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4723: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4729: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4733,7 +4739,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4763,12 +4769,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4767: checking for strtod" >&5 +echo "configure:4773: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -4813,7 +4819,7 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4817: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:4823: checking for Solaris2.4/Tru64 strtod bugs" >&5 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4822,7 +4828,7 @@ else tcl_cv_strtod_buggy=buggy else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_cv_strtod_buggy=ok else @@ -4876,12 +4882,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4880: checking for ANSI C header files" >&5 +echo "configure:4886: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4889,7 +4895,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4906,7 +4912,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4924,7 +4930,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -4945,7 +4951,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4956,7 +4962,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4980,12 +4986,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4984: checking for mode_t" >&5 +echo "configure:4990: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5013,12 +5019,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5017: checking for pid_t" >&5 +echo "configure:5023: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5046,12 +5052,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5050: checking for size_t" >&5 +echo "configure:5056: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -5079,12 +5085,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5083: checking for uid_t in sys/types.h" >&5 +echo "configure:5089: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5118,20 +5124,20 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:5122: checking pw_gecos in struct pwd" >&5 +echo "configure:5128: checking pw_gecos in struct pwd" >&5 if eval "test \"`echo '$''{'tcl_cv_pwd_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:5135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_pwd_pw_gecos=yes else @@ -5157,7 +5163,7 @@ fi if test "`uname -s`" = "Darwin" ; then echo $ac_n "checking whether to use Aqua""... $ac_c" 1>&6 -echo "configure:5161: checking whether to use Aqua" >&5 +echo "configure:5167: checking whether to use Aqua" >&5 # Check whether --enable-aqua or --disable-aqua was given. if test "${enable_aqua+set}" = set; then enableval="$enable_aqua" @@ -5184,7 +5190,7 @@ fi if test "$fat_32_64" = yes; then if test $tk_aqua = no; then echo $ac_n "checking for 64-bit X11""... $ac_c" 1>&6 -echo "configure:5188: checking for 64-bit X11" >&5 +echo "configure:5194: checking for 64-bit X11" >&5 if eval "test \"`echo '$''{'tcl_cv_lib_x11_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5195,14 +5201,14 @@ else CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" cat > conftest.$ac_ext < int main() { XrmInitialize(); ; return 0; } EOF -if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_x11_64=yes else @@ -5262,7 +5268,7 @@ else # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5266: checking for X" >&5 +echo "configure:5272: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5324,12 +5330,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5398,14 +5404,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5495,12 +5501,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -5520,15 +5526,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:5524: checking for X11 header files" >&5 +echo "configure:5530: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5564,7 +5570,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:5568: checking for X11 libraries" >&5 +echo "configure:5574: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -5584,7 +5590,7 @@ echo "configure:5568: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:5588: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:5594: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5592,7 +5598,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5680,7 +5686,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\"" if test $tk_aqua = no; then echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:5684: checking for main in -lXbsd" >&5 +echo "configure:5690: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5688,14 +5694,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5719,12 +5725,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5723: checking for connect" >&5 +echo "configure:5729: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -5769,7 +5775,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:5773: checking for main in -lsocket" >&5 +echo "configure:5779: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5777,14 +5783,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5810,12 +5816,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:5814: checking for accept" >&5 +echo "configure:5820: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -5860,12 +5866,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5864: checking for gethostbyname" >&5 +echo "configure:5870: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5906,7 +5912,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:5910: checking for main in -lnsl" >&5 +echo "configure:5916: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5914,14 +5920,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5957,13 +5963,13 @@ fi if test -d /usr/include/mit -a $tk_aqua = no; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:5961: checking MIT X libraries" >&5 +echo "configure:5967: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext < @@ -5974,7 +5980,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -5998,14 +6004,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:6002: checking whether char is unsigned" >&5 +echo "configure:6008: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -6098,7 +6104,7 @@ if test "`uname -s`" = "Darwin" ; then if test "`uname -s`" = "Darwin" ; then echo $ac_n "checking how to package libraries""... $ac_c" 1>&6 -echo "configure:6102: checking how to package libraries" >&5 +echo "configure:6108: checking how to package libraries" >&5 # Check whether --enable-framework or --disable-framework was given. if test "${enable_framework+set}" = set; then enableval="$enable_framework" @@ -6494,6 +6500,7 @@ s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g s%@MAKE_LIB@%$MAKE_LIB%g s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g s%@INSTALL_LIB@%$INSTALL_LIB%g +s%@DLL_INSTALL_DIR@%$DLL_INSTALL_DIR%g s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c804072..2391a41 100755 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1168,7 +1168,7 @@ dnl AC_CHECK_TOOL(AR, ar) AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" - AC_DEFINE(USE_DELTA_FOR_TZ) + AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Use delta for TZ]) fi ;; BeOS*) @@ -1440,8 +1440,8 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS="$CFLAGS -fno-inline" fi - # XIM peeking works under XFree86. - AC_DEFINE(PEEK_XCLOSEIM) + AC_DEFINE(PEEK_XCLOSEIM, 1, + [XIM peeking works under XFree86]) ;; GNU*) @@ -1742,7 +1742,8 @@ dnl AC_CHECK_TOOL(AR, ar) done; fi; LIBS=$hold_libs]) if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" - AC_DEFINE(HAVE_COREFOUNDATION) + AC_DEFINE(HAVE_COREFOUNDATION, 1, + [Do we have access to Darwin CoreFoundation.framework?]) else tcl_corefoundation=no fi @@ -1758,7 +1759,8 @@ dnl AC_CHECK_TOOL(AR, ar) eval $v'="$hold_'$v'"' done]) if test $tcl_cv_lib_corefoundation_64 = no; then - AC_DEFINE(NO_COREFOUNDATION_64) + AC_DEFINE(NO_COREFOUNDATION_64, 1, + [Is Darwin CoreFoundation unavailable for 64-bit?]) fi fi fi @@ -2197,11 +2199,17 @@ dnl # preprocessing tests use only CPPFLAGS. if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(BIN_INSTALL_DIR)/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + else + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' + fi else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -2270,6 +2278,7 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(INSTALL_LIB) + AC_SUBST(DLL_INSTALL_DIR) AC_SUBST(INSTALL_STUB_LIB) AC_SUBST(RANLIB) ]) -- cgit v0.12