Tk Source Code

Check-in [cbfd3027]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:implement various internal win32 stub functions for cygwin
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3508771
Files: files | file ages | folders
SHA1: cbfd302726ddaf773f6723e1c926bb4379797063
User & Date: jan.nijtmans 2012-04-25 13:30:03
Context
2012-04-26
14:32
merge trunk shorten command table, and make sure that tk.dll, when loaded in cygwin, doesn't use the win32 file dialogs check-in: e21ebc9e user: jan.nijtmans tags: bug-3508771
09:14
[Bug 3508771]: Implement TkClipBox, Tk*Region and Tk_GetHINSTANCE for Cygwin check-in: 6855a651 user: jan.nijtmans tags: core-8-4-branch
2012-04-25
13:30
implement various internal win32 stub functions for cygwin check-in: cbfd3027 user: jan.nijtmans tags: bug-3508771
2012-04-22
22:03
[Bug 3520202]: %K must not work with <MouseWheel> or effects are undefined! check-in: 09655b04 user: dkf tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/GetHWND.3.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\" 
.so man.macros
.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
.SH SYNOPSIS
.nf
\fB#include <tkPlatDecls.h>\fR
.sp
HWND
\fBTk_GetHWND\fR(\fIwindow\fR)
.sp








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'\"
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\" 
.so man.macros
.TH HWND 3 8.0 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_GetHWND, Tk_AttachHWND \- manage interactions between the Windows handle and an X window
.SH SYNOPSIS
.nf
\fB#include <tkPlatDecls.h>\fR
.sp
HWND
\fBTk_GetHWND\fR(\fIwindow\fR)
.sp

Changes to generic/tk.decls.

1022
1023
1024
1025
1026
1027
1028

1029




















1030
1031
1032
1033
1034
1035
1036
# Define the platform specific public Tk interface.  These functions are
# only available on the designated platform.

interface tkPlat

################################
# Unix specific functions

#   (none)





















################################
# Windows specific functions

declare 0 win {
    Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd)
}







>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
# Define the platform specific public Tk interface.  These functions are
# only available on the designated platform.

interface tkPlat

################################
# Unix specific functions
#

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

declare 0 win {
    Window Tk_AttachHWND(Tk_Window tkwin, HWND hwnd)
}

Changes to generic/tkInt.decls.

399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
declare 111 {
    Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin,
	    const char *dbName, const char *className)
}
declare 112 {
    void TkpMenuThreadInit(void)
}
declare 113 {mac aqua win} {
    void TkClipBox(TkRegion rgn, XRectangle *rect_return)
}
declare 114 {mac aqua win} {
    TkRegion TkCreateRegion(void)
}
declare 115 {mac aqua win} {
    void TkDestroyRegion(TkRegion rgn)
}
declare 116 {mac aqua win} {
    void TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return)
}
declare 117 {mac aqua win} {
    int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width,
	    unsigned int height)
}
declare 118 {mac aqua win} {
    void TkSetRegion(Display *display, GC gc, TkRegion rgn)
}
declare 119 {mac aqua win} {
    void TkUnionRectWithRegion(XRectangle *rect,
	    TkRegion src, TkRegion dr_return)
}
declare 121 {mac aqua} {
    Pixmap TkpCreateNativeBitmap(Display *display, const char *source) 
}
declare 122 {mac aqua} {







|


|


|


|


|



|


|







399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
declare 111 {
    Tcl_Obj *TkpGetSystemDefault(Tk_Window tkwin,
	    const char *dbName, const char *className)
}
declare 112 {
    void TkpMenuThreadInit(void)
}
declare 113 {
    void TkClipBox(TkRegion rgn, XRectangle *rect_return)
}
declare 114 {
    TkRegion TkCreateRegion(void)
}
declare 115 {
    void TkDestroyRegion(TkRegion rgn)
}
declare 116 {
    void TkIntersectRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return)
}
declare 117 {
    int TkRectInRegion(TkRegion rgn, int x, int y, unsigned int width,
	    unsigned int height)
}
declare 118 {
    void TkSetRegion(Display *display, GC gc, TkRegion rgn)
}
declare 119 {
    void TkUnionRectWithRegion(XRectangle *rect,
	    TkRegion src, TkRegion dr_return)
}
declare 121 {mac aqua} {
    Pixmap TkpCreateNativeBitmap(Display *display, const char *source) 
}
declare 122 {mac aqua} {
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
}
declare 143 {
    void TkClipCleanup(TkDisplay *dispPtr)
}
declare 144 {
    void TkGCCleanup(TkDisplay *dispPtr)
}
declare 145 {mac win aqua} {
    void TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return)
}
declare 146 {
    void TkStylePkgInit(TkMainInfo *mainPtr)
}
declare 147 {
    void TkStylePkgFree(TkMainInfo *mainPtr)







|







464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
}
declare 143 {
    void TkClipCleanup(TkDisplay *dispPtr)
}
declare 144 {
    void TkGCCleanup(TkDisplay *dispPtr)
}
declare 145 {
    void TkSubtractRegion(TkRegion sra, TkRegion srcb, TkRegion dr_return)
}
declare 146 {
    void TkStylePkgInit(TkMainInfo *mainPtr)
}
declare 147 {
    void TkStylePkgFree(TkMainInfo *mainPtr)
651
652
653
654
655
656
657



658
659
660
661
662
663
664
}

# new for 8.4.1

declare 34 win {
    void TkWinSetHINSTANCE(HINSTANCE hInstance)
}




################################
# Mac specific functions

declare 0 mac {
    void TkGenerateActivateEvents(TkWindow *winPtr, int active)
}







>
>
>







651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
}

# new for 8.4.1

declare 34 win {
    void TkWinSetHINSTANCE(HINSTANCE hInstance)
}
declare 35 win {
    int TkWinGetPlatformTheme(void)
}

################################
# Mac specific functions

declare 0 mac {
    void TkGenerateActivateEvents(TkWindow *winPtr, int active)
}
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
}
declare 65 mac {
    void TkMacPreprocessMenu(void)
}
declare 66 mac {
    int TkpIsWindowFloating(WindowRef window)
}
declare 35 win {
    int TkWinGetPlatformTheme(void)
}
################################
# Aqua specific functions

declare 0 aqua {
    void TkGenerateActivateEvents(TkWindow *winPtr, int active)
}








<
<
<







835
836
837
838
839
840
841



842
843
844
845
846
847
848
}
declare 65 mac {
    void TkMacPreprocessMenu(void)
}
declare 66 mac {
    int TkpIsWindowFloating(WindowRef window)
}



################################
# Aqua specific functions

declare 0 aqua {
    void TkGenerateActivateEvents(TkWindow *winPtr, int active)
}

Changes to generic/tkIntDecls.h.

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
EXTERN void		TkpGetSubFonts _ANSI_ARGS_((Tcl_Interp *interp,
				Tk_Font tkfont));
/* 111 */
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 */
EXTERN Pixmap		TkpCreateNativeBitmap _ANSI_ARGS_((Display *display,
				CONST char *source));
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK







<



<
<
<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<


<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<



<
<
<
<
<
<
<
<
<
<
<
<



<
<
<
<
<
<
<
<
<
<
<







358
359
360
361
362
363
364

365
366
367












368
369










370
371










372










373
374


375
376
377
378














379
380
381












382
383
384











385
386
387
388
389
390
391
EXTERN void		TkpGetSubFonts _ANSI_ARGS_((Tcl_Interp *interp,
				Tk_Font tkfont));
/* 111 */
EXTERN Tcl_Obj *	TkpGetSystemDefault _ANSI_ARGS_((Tk_Window tkwin,
				CONST char *dbName, CONST char *className));
/* 112 */
EXTERN void		TkpMenuThreadInit _ANSI_ARGS_((void));

/* 113 */
EXTERN void		TkClipBox _ANSI_ARGS_((TkRegion rgn,
				XRectangle *rect_return));












/* 114 */
EXTERN TkRegion		TkCreateRegion _ANSI_ARGS_((void));










/* 115 */
EXTERN void		TkDestroyRegion _ANSI_ARGS_((TkRegion rgn));










/* 116 */










EXTERN void		TkIntersectRegion _ANSI_ARGS_((TkRegion sra,
				TkRegion srcb, TkRegion dr_return));


/* 117 */
EXTERN int		TkRectInRegion _ANSI_ARGS_((TkRegion rgn, int x,
				int y, unsigned int width,
				unsigned int height));














/* 118 */
EXTERN void		TkSetRegion _ANSI_ARGS_((Display *display, GC gc,
				TkRegion rgn));












/* 119 */
EXTERN void		TkUnionRectWithRegion _ANSI_ARGS_((XRectangle *rect,
				TkRegion src, TkRegion dr_return));











/* Slot 120 is reserved */
#ifdef MAC_TCL
/* 121 */
EXTERN Pixmap		TkpCreateNativeBitmap _ANSI_ARGS_((Display *display,
				CONST char *source));
#endif /* MAC_TCL */
#ifdef MAC_OSX_TK
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
				TkWindow *parentPtr));
/* 142 */
EXTERN void		TkFocusFree _ANSI_ARGS_((TkMainInfo *mainPtr));
/* 143 */
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 */
EXTERN void		TkStylePkgFree _ANSI_ARGS_((TkMainInfo *mainPtr));
/* 148 */
EXTERN Tk_Window	TkToplevelWindowForCommand _ANSI_ARGS_((
				Tcl_Interp *interp, CONST char *cmdName));







<



<
<
<
<
<
<
<
<
<
<
<







445
446
447
448
449
450
451

452
453
454











455
456
457
458
459
460
461
				TkWindow *parentPtr));
/* 142 */
EXTERN void		TkFocusFree _ANSI_ARGS_((TkMainInfo *mainPtr));
/* 143 */
EXTERN void		TkClipCleanup _ANSI_ARGS_((TkDisplay *dispPtr));
/* 144 */
EXTERN void		TkGCCleanup _ANSI_ARGS_((TkDisplay *dispPtr));

/* 145 */
EXTERN void		TkSubtractRegion _ANSI_ARGS_((TkRegion sra,
				TkRegion srcb, TkRegion dr_return));











/* 146 */
EXTERN void		TkStylePkgInit _ANSI_ARGS_((TkMainInfo *mainPtr));
/* 147 */
EXTERN void		TkStylePkgFree _ANSI_ARGS_((TkMainInfo *mainPtr));
/* 148 */
EXTERN Tk_Window	TkToplevelWindowForCommand _ANSI_ARGS_((
				Tcl_Interp *interp, CONST char *cmdName));
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
    TkDisplay * (*tkGetDisplayList) _ANSI_ARGS_((void)); /* 106 */
    TkMainInfo * (*tkGetMainInfoList) _ANSI_ARGS_((void)); /* 107 */
    int (*tkGetWindowFromObj) _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr)); /* 108 */
    char * (*tkpGetString) _ANSI_ARGS_((TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr)); /* 109 */
    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;
#endif /* UNIX */
#ifdef __WIN32__
    VOID *reserved121;
#endif /* __WIN32__ */







<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<







582
583
584
585
586
587
588




589











590











591











592











593











594











595







596
597
598
599
600
601
602
    TkDisplay * (*tkGetDisplayList) _ANSI_ARGS_((void)); /* 106 */
    TkMainInfo * (*tkGetMainInfoList) _ANSI_ARGS_((void)); /* 107 */
    int (*tkGetWindowFromObj) _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr)); /* 108 */
    char * (*tkpGetString) _ANSI_ARGS_((TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr)); /* 109 */
    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 */




    void (*tkClipBox) _ANSI_ARGS_((TkRegion rgn, XRectangle *rect_return)); /* 113 */











    TkRegion (*tkCreateRegion) _ANSI_ARGS_((void)); /* 114 */











    void (*tkDestroyRegion) _ANSI_ARGS_((TkRegion rgn)); /* 115 */











    void (*tkIntersectRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 116 */











    int (*tkRectInRegion) _ANSI_ARGS_((TkRegion rgn, int x, int y, unsigned int width, unsigned int height)); /* 117 */











    void (*tkSetRegion) _ANSI_ARGS_((Display *display, GC gc, TkRegion rgn)); /* 118 */











    void (*tkUnionRectWithRegion) _ANSI_ARGS_((XRectangle *rect, TkRegion src, TkRegion dr_return)); /* 119 */







    VOID *reserved120;
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
    VOID *reserved121;
#endif /* UNIX */
#ifdef __WIN32__
    VOID *reserved121;
#endif /* __WIN32__ */
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
    KeySym (*tkpGetKeySym) _ANSI_ARGS_((TkDisplay *dispPtr, XEvent *eventPtr)); /* 138 */
    void (*tkpInitKeymapInfo) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 139 */
    TkRegion (*tkPhotoGetValidRegion) _ANSI_ARGS_((Tk_PhotoHandle handle)); /* 140 */
    TkWindow ** (*tkWmStackorderToplevel) _ANSI_ARGS_((TkWindow *parentPtr)); /* 141 */
    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 */
    CONST Tk_OptionSpec * (*tkGetOptionSpec) _ANSI_ARGS_((CONST char *name, Tk_OptionTable optionTable)); /* 149 */
    VOID *reserved150;
    VOID *reserved151;
    void (*tkpDrawFrame) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief)); /* 152 */







<
<
<
<

<
<
<
<
<
<
<







647
648
649
650
651
652
653




654







655
656
657
658
659
660
661
    KeySym (*tkpGetKeySym) _ANSI_ARGS_((TkDisplay *dispPtr, XEvent *eventPtr)); /* 138 */
    void (*tkpInitKeymapInfo) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 139 */
    TkRegion (*tkPhotoGetValidRegion) _ANSI_ARGS_((Tk_PhotoHandle handle)); /* 140 */
    TkWindow ** (*tkWmStackorderToplevel) _ANSI_ARGS_((TkWindow *parentPtr)); /* 141 */
    void (*tkFocusFree) _ANSI_ARGS_((TkMainInfo *mainPtr)); /* 142 */
    void (*tkClipCleanup) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 143 */
    void (*tkGCCleanup) _ANSI_ARGS_((TkDisplay *dispPtr)); /* 144 */




    void (*tkSubtractRegion) _ANSI_ARGS_((TkRegion sra, TkRegion srcb, TkRegion dr_return)); /* 145 */







    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 */
    CONST Tk_OptionSpec * (*tkGetOptionSpec) _ANSI_ARGS_((CONST char *name, Tk_OptionTable optionTable)); /* 149 */
    VOID *reserved150;
    VOID *reserved151;
    void (*tkpDrawFrame) _ANSI_ARGS_((Tk_Window tkwin, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief)); /* 152 */
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
#define TkpGetSystemDefault \
	(tkIntStubsPtr->tkpGetSystemDefault) /* 111 */
#endif
#ifndef TkpMenuThreadInit
#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
#define TkpCreateNativeBitmap \
	(tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */
#endif
#endif /* MAC_TCL */







<




<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<


<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<







1120
1121
1122
1123
1124
1125
1126

1127
1128
1129
1130














1131
1132
1133
1134














1135
1136
1137
1138














1139
1140






1141
1142








1143
1144
1145
1146














1147
1148
1149
1150














1151
1152
1153
1154













1155
1156
1157
1158
1159
1160
1161
#define TkpGetSystemDefault \
	(tkIntStubsPtr->tkpGetSystemDefault) /* 111 */
#endif
#ifndef TkpMenuThreadInit
#define TkpMenuThreadInit \
	(tkIntStubsPtr->tkpMenuThreadInit) /* 112 */
#endif

#ifndef TkClipBox
#define TkClipBox \
	(tkIntStubsPtr->tkClipBox) /* 113 */
#endif














#ifndef TkCreateRegion
#define TkCreateRegion \
	(tkIntStubsPtr->tkCreateRegion) /* 114 */
#endif














#ifndef TkDestroyRegion
#define TkDestroyRegion \
	(tkIntStubsPtr->tkDestroyRegion) /* 115 */
#endif














#ifndef TkIntersectRegion
#define TkIntersectRegion \






	(tkIntStubsPtr->tkIntersectRegion) /* 116 */
#endif








#ifndef TkRectInRegion
#define TkRectInRegion \
	(tkIntStubsPtr->tkRectInRegion) /* 117 */
#endif














#ifndef TkSetRegion
#define TkSetRegion \
	(tkIntStubsPtr->tkSetRegion) /* 118 */
#endif














#ifndef TkUnionRectWithRegion
#define TkUnionRectWithRegion \
	(tkIntStubsPtr->tkUnionRectWithRegion) /* 119 */
#endif













/* Slot 120 is reserved */
#ifdef MAC_TCL
#ifndef TkpCreateNativeBitmap
#define TkpCreateNativeBitmap \
	(tkIntStubsPtr->tkpCreateNativeBitmap) /* 121 */
#endif
#endif /* MAC_TCL */
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
#define TkClipCleanup \
	(tkIntStubsPtr->tkClipCleanup) /* 143 */
#endif
#ifndef TkGCCleanup
#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 */
#endif
#ifndef TkStylePkgFree
#define TkStylePkgFree \
	(tkIntStubsPtr->tkStylePkgFree) /* 147 */







<




<
<
<
<
<
<
<
<
<
<
<
<
<







1236
1237
1238
1239
1240
1241
1242

1243
1244
1245
1246













1247
1248
1249
1250
1251
1252
1253
#define TkClipCleanup \
	(tkIntStubsPtr->tkClipCleanup) /* 143 */
#endif
#ifndef TkGCCleanup
#define TkGCCleanup \
	(tkIntStubsPtr->tkGCCleanup) /* 144 */
#endif

#ifndef TkSubtractRegion
#define TkSubtractRegion \
	(tkIntStubsPtr->tkSubtractRegion) /* 145 */
#endif













#ifndef TkStylePkgInit
#define TkStylePkgInit \
	(tkIntStubsPtr->tkStylePkgInit) /* 146 */
#endif
#ifndef TkStylePkgFree
#define TkStylePkgFree \
	(tkIntStubsPtr->tkStylePkgFree) /* 147 */

Changes to generic/tkPlatDecls.h.

25
26
27
28
29
30
31


















32
33
34
35
36
37
38

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */



















#ifdef __WIN32__
/* 0 */
EXTERN Window		Tk_AttachHWND _ANSI_ARGS_((Tk_Window tkwin,
				HWND hwnd));
/* 1 */
EXTERN HINSTANCE	Tk_GetHINSTANCE _ANSI_ARGS_((void));
/* 2 */







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

/* !BEGIN!: Do not edit below this line. */

/*
 * 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,
				HWND hwnd));
/* 1 */
EXTERN HINSTANCE	Tk_GetHINSTANCE _ANSI_ARGS_((void));
/* 2 */
113
114
115
116
117
118
119








120
121
122
123
124
125
126
EXTERN int		Tk_MacOSXIsAppInFront _ANSI_ARGS_((void));
#endif /* MAC_OSX_TK */

typedef struct TkPlatStubs {
    int magic;
    struct TkPlatStubHooks *hooks;









#ifdef __WIN32__
    Window (*tk_AttachHWND) _ANSI_ARGS_((Tk_Window tkwin, HWND hwnd)); /* 0 */
    HINSTANCE (*tk_GetHINSTANCE) _ANSI_ARGS_((void)); /* 1 */
    HWND (*tk_GetHWND) _ANSI_ARGS_((Window window)); /* 2 */
    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 */







>
>
>
>
>
>
>
>







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
EXTERN int		Tk_MacOSXIsAppInFront _ANSI_ARGS_((void));
#endif /* MAC_OSX_TK */

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 */
    HWND (*tk_GetHWND) _ANSI_ARGS_((Window window)); /* 2 */
    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 */
163
164
165
166
167
168
169


























170
171
172
173
174
175
176

#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)

/*
 * Inline function declarations:
 */



























#ifdef __WIN32__
#ifndef Tk_AttachHWND
#define Tk_AttachHWND \
	(tkPlatStubsPtr->tk_AttachHWND) /* 0 */
#endif
#ifndef Tk_GetHINSTANCE
#define Tk_GetHINSTANCE \







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

#if defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS)

/*
 * 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 \
	(tkPlatStubsPtr->tk_AttachHWND) /* 0 */
#endif
#ifndef Tk_GetHINSTANCE
#define Tk_GetHINSTANCE \

Changes to generic/tkStubInit.c.

36
37
38
39
40
41
42








43
44
45
46
47

48
49
50
51
52
































53




54
55
56
57
58
59
60
#include "tkIntDecls.h"
#include "tkIntPlatDecls.h"
#include "tkIntXlibDecls.h"

/*
 * Remove macros that will interfere with the definitions below.
 */









#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)


#ifndef __WIN32__
/* Make sure that extensions which call XParseColor through
 * the stub table, call TkParseColor in stead. See bug #3486474 */
#   define XParseColor TkParseColor
































#endif





/*
 * WARNING: The contents of this file is automatically generated by the
 * tools/genStubs.tcl script. Any modifications to the function declarations
 * below should be made in the generic/tk.decls script.
 */








>
>
>
>
>
>
>
>

<
<
<
<
>





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51




52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include "tkIntDecls.h"
#include "tkIntPlatDecls.h"
#include "tkIntXlibDecls.h"

/*
 * 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





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 <windows.h> 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
 * below should be made in the generic/tk.decls script.
 */

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
    TkGetDisplayList, /* 106 */
    TkGetMainInfoList, /* 107 */
    TkGetWindowFromObj, /* 108 */
    TkpGetString, /* 109 */
    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 */
#endif /* UNIX */
#ifdef __WIN32__
    NULL, /* 121 */
#endif /* __WIN32__ */







<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<







213
214
215
216
217
218
219




220











221











222











223











224











225











226







227
228
229
230
231
232
233
    TkGetDisplayList, /* 106 */
    TkGetMainInfoList, /* 107 */
    TkGetWindowFromObj, /* 108 */
    TkpGetString, /* 109 */
    TkpGetSubFonts, /* 110 */
    TkpGetSystemDefault, /* 111 */
    TkpMenuThreadInit, /* 112 */




    TkClipBox, /* 113 */











    TkCreateRegion, /* 114 */











    TkDestroyRegion, /* 115 */











    TkIntersectRegion, /* 116 */











    TkRectInRegion, /* 117 */











    TkSetRegion, /* 118 */











    TkUnionRectWithRegion, /* 119 */







    NULL, /* 120 */
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
    NULL, /* 121 */
#endif /* UNIX */
#ifdef __WIN32__
    NULL, /* 121 */
#endif /* __WIN32__ */
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
    TkpGetKeySym, /* 138 */
    TkpInitKeymapInfo, /* 139 */
    TkPhotoGetValidRegion, /* 140 */
    TkWmStackorderToplevel, /* 141 */
    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 */
    TkGetOptionSpec, /* 149 */
    NULL, /* 150 */
    NULL, /* 151 */
    TkpDrawFrame, /* 152 */







<
<
<
<

<
<
<
<
<
<
<







278
279
280
281
282
283
284




285







286
287
288
289
290
291
292
    TkpGetKeySym, /* 138 */
    TkpInitKeymapInfo, /* 139 */
    TkPhotoGetValidRegion, /* 140 */
    TkWmStackorderToplevel, /* 141 */
    TkFocusFree, /* 142 */
    TkClipCleanup, /* 143 */
    TkGCCleanup, /* 144 */




    TkSubtractRegion, /* 145 */







    TkStylePkgInit, /* 146 */
    TkStylePkgFree, /* 147 */
    TkToplevelWindowForCommand, /* 148 */
    TkGetOptionSpec, /* 149 */
    NULL, /* 150 */
    NULL, /* 151 */
    TkpDrawFrame, /* 152 */
822
823
824
825
826
827
828








829
830
831
832
833
834
835
    XSync, /* 91 */
#endif /* MAC_OSX_TK */
};

TkPlatStubs tkPlatStubs = {
    TCL_STUB_MAGIC,
    NULL,








#ifdef __WIN32__
    Tk_AttachHWND, /* 0 */
    Tk_GetHINSTANCE, /* 1 */
    Tk_GetHWND, /* 2 */
    Tk_HWNDToWindow, /* 3 */
    Tk_PointerEvent, /* 4 */
    Tk_TranslateWinEvent, /* 5 */







>
>
>
>
>
>
>
>







775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
    XSync, /* 91 */
#endif /* MAC_OSX_TK */
};

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 */
    Tk_GetHWND, /* 2 */
    Tk_HWNDToWindow, /* 3 */
    Tk_PointerEvent, /* 4 */
    Tk_TranslateWinEvent, /* 5 */

Changes to generic/tkWindow.c.

97
98
99
100
101
102
103

104
105
106
107
108
109
110
/*
 * The following structure defines all of the commands supported by
 * Tk, and the C procedures that execute them.
 */

#define ISSAFE 1
#define PASSMAINWINDOW 2


typedef struct {
    CONST char *name;			/* Name of command. */
    Tcl_CmdProc *cmdProc;	/* Command's string-based procedure. */
    Tcl_ObjCmdProc *objProc;	/* Command's object-based procedure. */
    int flags;
} TkCmd;







>







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
 * The following structure defines all of the commands supported by
 * Tk, and the C procedures that execute them.
 */

#define ISSAFE 1
#define PASSMAINWINDOW 2
#define WINMACONLY 4

typedef struct {
    CONST char *name;			/* Name of command. */
    Tcl_CmdProc *cmdProc;	/* Command's string-based procedure. */
    Tcl_ObjCmdProc *objProc;	/* Command's object-based procedure. */
    int flags;
} TkCmd;
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
    {"place",		NULL,			Tk_PlaceObjCmd,		ISSAFE},
    {"raise",		NULL,			Tk_RaiseObjCmd,		PASSMAINWINDOW|ISSAFE},
    {"selection",	NULL,			Tk_SelectionObjCmd,	PASSMAINWINDOW},
    {"tk",		NULL,			Tk_TkObjCmd,		PASSMAINWINDOW|ISSAFE},
    {"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},
#endif
#if defined(__WIN32__) || defined(MAC_OSX_TK)
    {"tk_messageBox",   NULL,			Tk_MessageBoxObjCmd,	PASSMAINWINDOW},
#endif
    {"update",		NULL,			Tk_UpdateObjCmd,	PASSMAINWINDOW|ISSAFE},
    {"winfo",		NULL,			Tk_WinfoObjCmd,		PASSMAINWINDOW|ISSAFE},
    {"wm",		NULL,			Tk_WmObjCmd,		PASSMAINWINDOW},







|
|
|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
    {"place",		NULL,			Tk_PlaceObjCmd,		ISSAFE},
    {"raise",		NULL,			Tk_RaiseObjCmd,		PASSMAINWINDOW|ISSAFE},
    {"selection",	NULL,			Tk_SelectionObjCmd,	PASSMAINWINDOW},
    {"tk",		NULL,			Tk_TkObjCmd,		PASSMAINWINDOW|ISSAFE},
    {"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, 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},
#endif
    {"update",		NULL,			Tk_UpdateObjCmd,	PASSMAINWINDOW|ISSAFE},
    {"winfo",		NULL,			Tk_WinfoObjCmd,		PASSMAINWINDOW|ISSAFE},
    {"wm",		NULL,			Tk_WmObjCmd,		PASSMAINWINDOW},
847
848
849
850
851
852
853



854
855
856
857
858
859
860


861






862
863
864
865
866
867
868
				 * use DISPLAY environment variable. */
    char *baseName;		/* Base name for application;  usually of the
				 * form "prog instance". */
{
    Tk_Window tkwin;
    int dummy;
    int isSafe;



    Tcl_HashEntry *hPtr;
    register TkMainInfo *mainPtr;
    register TkWindow *winPtr;
    register CONST TkCmd *cmdPtr;
    ClientData clientData;
    ThreadSpecificData *tsdPtr = (ThreadSpecificData *) 
            Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));


    






    /*
     * Panic if someone updated the TkWindow structure without
     * also updating the Tk_FakeWin structure (or vice versa).
     */

    if (sizeof(TkWindow) != sizeof(Tk_FakeWin)) {
	panic("TkWindow and Tk_FakeWin are not the same size");







>
>
>







>
>
|
>
>
>
>
>
>







848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
				 * use DISPLAY environment variable. */
    char *baseName;		/* Base name for application;  usually of the
				 * form "prog instance". */
{
    Tk_Window tkwin;
    int dummy;
    int isSafe;
#ifdef __WIN32__
    int isWin32 = 0;
#endif
    Tcl_HashEntry *hPtr;
    register TkMainInfo *mainPtr;
    register TkWindow *winPtr;
    register CONST TkCmd *cmdPtr;
    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).
     */

    if (sizeof(TkWindow) != sizeof(Tk_FakeWin)) {
	panic("TkWindow and Tk_FakeWin are not the same size");
937
938
939
940
941
942
943





944
945
946
947
948
949
950
     */

    isSafe = Tcl_IsSafe(interp);
    for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) {
	if ((cmdPtr->cmdProc == NULL) && (cmdPtr->objProc == NULL)) {
	    Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs");
	}





	if (cmdPtr->flags & PASSMAINWINDOW) {
	    clientData = (ClientData) tkwin;
	} else {
	    clientData = (ClientData) NULL;
	}
	if (cmdPtr->cmdProc != NULL) {
	    Tcl_CreateCommand(interp, cmdPtr->name, cmdPtr->cmdProc,







>
>
>
>
>







949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
     */

    isSafe = Tcl_IsSafe(interp);
    for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) {
	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 {
	    clientData = (ClientData) NULL;
	}
	if (cmdPtr->cmdProc != NULL) {
	    Tcl_CreateCommand(interp, cmdPtr->name, cmdPtr->cmdProc,

Changes to unix/Makefile.in.

52
53
54
55
56
57
58

59
60
61
62
63
64
65
LIB_RUNTIME_DIR		= $(libdir)

# Directory in which to install the program wish:
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)


# Path name to use when installing library scripts.
SCRIPT_INSTALL_DIR	= $(INSTALL_ROOT)$(TK_LIBRARY)

# Directory in which to install the include file tk.h:
INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)








>







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
LIB_RUNTIME_DIR		= $(libdir)

# Directory in which to install the program wish:
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)

# Directory in which to install the include file tk.h:
INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)

639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
	    echo "	package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\
	    echo "    }";\
	    echo "} else {";\
	    echo "    package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
	    echo "}";\
	    ) > $(PKG_INDEX); \
	    fi
	@echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/"
	@@INSTALL_LIB@
	@chmod 555 $(LIB_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) \
			$(LIB_INSTALL_DIR)/$(TK_EXP_FILE); \
	    fi
	@echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"
	@$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)







|

|







640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
	    echo "	package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\
	    echo "    }";\
	    echo "} else {";\
	    echo "    package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
	    echo "}";\
	    ) > $(PKG_INDEX); \
	    fi
	@echo "Installing $(LIB_FILE) to $(DLL_INSTALL_DIR)/"
	@@INSTALL_LIB@
	@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) \
			$(LIB_INSTALL_DIR)/$(TK_EXP_FILE); \
	    fi
	@echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"
	@$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)

Changes to unix/configure.

2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
	    # is kind of overkill but it works.
	    # Disable inlining only when one of the
	    # files in compat/*.c is being linked in.
	    if test x"${LIBOBJS}" != x ; then
	        CFLAGS="$CFLAGS -fno-inline"
	    fi

	    # XIM peeking works under XFree86.
	    cat >> confdefs.h <<\EOF
#define PEEK_XCLOSEIM 1
EOF


	    ;;
	GNU*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    if test "$have_dl" = yes; then
		SHLIB_LD='${CC} -shared'
		DL_OBJS=""
		DL_LIBS="-ldl"
		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
		CC_SEARCH_FLAGS=""
		LD_SEARCH_FLAGS=""
	    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
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
#line 2808 "configure"
#include "confdefs.h"
#include <dld.h>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5







<




















|




|




|







2774
2775
2776
2777
2778
2779
2780

2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
	    # is kind of overkill but it works.
	    # Disable inlining only when one of the
	    # files in compat/*.c is being linked in.
	    if test x"${LIBOBJS}" != x ; then
	        CFLAGS="$CFLAGS -fno-inline"
	    fi


	    cat >> confdefs.h <<\EOF
#define PEEK_XCLOSEIM 1
EOF


	    ;;
	GNU*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    if test "$have_dl" = yes; then
		SHLIB_LD='${CC} -shared'
		DL_OBJS=""
		DL_LIBS="-ldl"
		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
		CC_SEARCH_FLAGS=""
		LD_SEARCH_FLAGS=""
	    else
		ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
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
#line 2807 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
	NetBSD-1.*|FreeBSD-[1-2].*)
	    # 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
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
#line 2887 "configure"
#include "confdefs.h"
#include <dlfcn.h>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5







|




|




|







2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    ;;
	NetBSD-1.*|FreeBSD-[1-2].*)
	    # 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: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
#line 2886 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
		DL_OBJS="tclLoadDl.o"
		DL_LIBS=""
		if test $doRpath = yes ; then
		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		    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
if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		    cat > conftest.$ac_ext <<EOF
#line 2926 "configure"
#include "confdefs.h"

#ifdef __ELF__
	yes
#endif
		    
EOF







|





|







2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
		DL_OBJS="tclLoadDl.o"
		DL_LIBS=""
		if test $doRpath = yes ; then
		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
		fi
		echo $ac_n "checking for ELF""... $ac_c" 1>&6
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 <<EOF
#line 2925 "configure"
#include "confdefs.h"

#ifdef __ELF__
	yes
#endif
		    
EOF
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
		DL_LIBS=""
		if test $doRpath = yes ; then
		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		fi
		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
		echo $ac_n "checking for ELF""... $ac_c" 1>&6
echo "configure:3005: 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 <<EOF
#line 3011 "configure"
#include "confdefs.h"

#ifdef __ELF__
	yes
#endif
		    
EOF







|





|







2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
		DL_LIBS=""
		if test $doRpath = yes ; then
		    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
		fi
		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
		echo $ac_n "checking for ELF""... $ac_c" 1>&6
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 <<EOF
#line 3010 "configure"
#include "confdefs.h"

#ifdef __ELF__
	yes
#endif
		    
EOF
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
	    CFLAGS="`echo " ${CFLAGS}" | \
		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
	    if test $do64bit = yes; then
		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
if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
			    hold_cflags=$CFLAGS
			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
			    cat > conftest.$ac_ext <<EOF
#line 3121 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:3128: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_cc_arch_ppc64=no
fi
rm -f conftest*
			    CFLAGS=$hold_cflags
fi

echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
			if test $tcl_cv_cc_arch_ppc64 = yes; then
			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
			    do64bit_ok=yes
			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
if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
			    hold_cflags=$CFLAGS
			    CFLAGS="$CFLAGS -arch x86_64"
			    cat > conftest.$ac_ext <<EOF
#line 3156 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:3163: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_cc_arch_x86_64=no







|







|






|



















|







|






|







3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
	    CFLAGS="`echo " ${CFLAGS}" | \
		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
	    if test $do64bit = yes; then
		case `arch` in
		    ppc)
			echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6
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
  
			    hold_cflags=$CFLAGS
			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
			    cat > conftest.$ac_ext <<EOF
#line 3120 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_cc_arch_ppc64=no
fi
rm -f conftest*
			    CFLAGS=$hold_cflags
fi

echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
			if test $tcl_cv_cc_arch_ppc64 = yes; then
			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
			    do64bit_ok=yes
			fi;;
		    i386)
			echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6
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
  
			    hold_cflags=$CFLAGS
			    CFLAGS="$CFLAGS -arch x86_64"
			    cat > conftest.$ac_ext <<EOF
#line 3155 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_cc_arch_x86_64=no
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
		# Check for combined 32-bit and 64-bit fat build
		echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
		    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
		    fat_32_64=yes
	    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
if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
		cat > conftest.$ac_ext <<EOF
#line 3200 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:3207: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_ld_single_module=no







|







|






|







3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
		# Check for combined 32-bit and 64-bit fat build
		echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
		    echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
		    fat_32_64=yes
	    fi
	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
	    echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
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
  
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
		cat > conftest.$ac_ext <<EOF
#line 3199 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_ld_single_module=no
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
	    DL_LIBS=""
	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
	    test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
		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
if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
		cat > conftest.$ac_ext <<EOF
#line 3241 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:3248: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_ld_search_paths_first=no







|







|






|







3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
	    DL_LIBS=""
	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
	    test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
		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: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
  
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
		cat > conftest.$ac_ext <<EOF
#line 3240 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_ld_search_paths_first=no
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
	    fi
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
	    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
	    # Check whether --enable-corefoundation or --disable-corefoundation was given.
if test "${enable_corefoundation+set}" = set; then
  enableval="$enable_corefoundation"
  tcl_corefoundation=$enableval
else
  tcl_corefoundation=yes
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
if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		    hold_libs=$LIBS
		    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
			# On Tiger there is no 64-bit CF, so remove 64-bit archs
			# from CFLAGS et al. while testing for presence of CF.
			# 64-bit CF is disabled in tclUnixPort.h if necessary.
			eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
		    done; fi
		    LIBS="$LIBS -framework CoreFoundation"
		    cat > conftest.$ac_ext <<EOF
#line 3297 "configure"
#include "confdefs.h"
#include <CoreFoundation/CoreFoundation.h>
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
  rm -rf conftest*
  tcl_cv_lib_corefoundation=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_lib_corefoundation=no







|











|













|






|







3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
	    fi
	    CC_SEARCH_FLAGS=""
	    LD_SEARCH_FLAGS=""
	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
	    PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
	    PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
	    echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
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"
  tcl_corefoundation=$enableval
else
  tcl_corefoundation=yes
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: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
  
		    hold_libs=$LIBS
		    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
			# On Tiger there is no 64-bit CF, so remove 64-bit archs
			# from CFLAGS et al. while testing for presence of CF.
			# 64-bit CF is disabled in tclUnixPort.h if necessary.
			eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
		    done; fi
		    LIBS="$LIBS -framework CoreFoundation"
		    cat > conftest.$ac_ext <<EOF
#line 3296 "configure"
#include "confdefs.h"
#include <CoreFoundation/CoreFoundation.h>
int main() {
CFBundleRef b = CFBundleGetMainBundle();
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_lib_corefoundation=no
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
EOF

		else
		    tcl_corefoundation=no
		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
if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
			for v in CFLAGS CPPFLAGS LDFLAGS; do
			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
			done
			cat > conftest.$ac_ext <<EOF
#line 3340 "configure"
#include "confdefs.h"
#include <CoreFoundation/CoreFoundation.h>
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
  rm -rf conftest*
  tcl_cv_lib_corefoundation_64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_lib_corefoundation_64=no







|








|






|







3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
EOF

		else
		    tcl_corefoundation=no
		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: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
  
			for v in CFLAGS CPPFLAGS LDFLAGS; do
			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
			done
			cat > conftest.$ac_ext <<EOF
#line 3339 "configure"
#include "confdefs.h"
#include <CoreFoundation/CoreFoundation.h>
int main() {
CFBundleRef b = CFBundleGetMainBundle();
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_lib_corefoundation_64=no
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
	    SHLIB_LD_LIBS=""
	    SHLIB_SUFFIX=".so"
	    DL_OBJS="tclLoadDl.o"
	    DL_LIBS="-ldl"
	    # 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
if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -Wl,-Bexport"
		cat > conftest.$ac_ext <<EOF
#line 3684 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  tcl_cv_ld_Bexport=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_ld_Bexport=no







|







|






|







3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
	    SHLIB_LD_LIBS=""
	    SHLIB_SUFFIX=".so"
	    DL_OBJS="tclLoadDl.o"
	    DL_LIBS="-ldl"
	    # 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: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
  
		hold_ldflags=$LDFLAGS
		LDFLAGS="$LDFLAGS -Wl,-Bexport"
		cat > conftest.$ac_ext <<EOF
#line 3683 "configure"
#include "confdefs.h"

int main() {
int i;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_ld_Bexport=no
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
    #
    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
    # `struct exec' includes a second header that contains information that
    # duplicates the v7 fields that are needed.

    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
if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	cat > conftest.$ac_ext <<EOF
#line 3747 "configure"
#include "confdefs.h"
#include <sys/exec.h>
int main() {

	    struct exec foo;
	    unsigned long seek;
	    int flag;
#if defined(__mips) || defined(mips)
	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
#else
	    seek = N_TXTOFF (foo);
#endif
	    flag = (foo.a_magic == OMAGIC);
	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
    
; return 0; }
EOF
if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_sysexec_h=usable
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_sysexec_h=unusable
fi
rm -f conftest*
fi

echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
	if test $tcl_cv_sysexec_h = usable; then
	    cat >> confdefs.h <<\EOF
#define USE_SYS_EXEC_H 1
EOF

	else
	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
echo "configure:3785: 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 <<EOF
#line 3791 "configure"
#include "confdefs.h"
#include <a.out.h>
int main() {

		struct exec foo;
		unsigned long seek;
		int flag;
#if defined(__mips) || defined(mips)
		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
#else
		seek = N_TXTOFF (foo);
#endif
		flag = (foo.a_magic == OMAGIC);
		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
	    
; return 0; }
EOF
if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_aout_h=usable
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_aout_h=unusable
fi
rm -f conftest*
fi

echo "$ac_t""$tcl_cv_aout_h" 1>&6
	    if test $tcl_cv_aout_h = usable; then
		cat >> confdefs.h <<\EOF
#define USE_A_OUT_H 1
EOF

	    else
		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
echo "configure:3829: 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 <<EOF
#line 3835 "configure"
#include "confdefs.h"
#include <sys/exec_aout.h>
int main() {

		    struct exec foo;
		    unsigned long seek;
		    int flag;
#if defined(__mips) || defined(mips)
		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
#else
		    seek = N_TXTOFF (foo);
#endif
		    flag = (foo.a_midmag == OMAGIC);
		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
		
; return 0; }
EOF
if { (eval echo configure:3853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_sysexecaout_h=usable
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_sysexecaout_h=unusable







|





|

















|



















|





|

















|



















|





|

















|







3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
    #
    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
    # `struct exec' includes a second header that contains information that
    # duplicates the v7 fields that are needed.

    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
	echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
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 <<EOF
#line 3746 "configure"
#include "confdefs.h"
#include <sys/exec.h>
int main() {

	    struct exec foo;
	    unsigned long seek;
	    int flag;
#if defined(__mips) || defined(mips)
	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
#else
	    seek = N_TXTOFF (foo);
#endif
	    flag = (foo.a_magic == OMAGIC);
	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
    
; return 0; }
EOF
if { (eval echo configure:3764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_sysexec_h=usable
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_sysexec_h=unusable
fi
rm -f conftest*
fi

echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
	if test $tcl_cv_sysexec_h = usable; then
	    cat >> confdefs.h <<\EOF
#define USE_SYS_EXEC_H 1
EOF

	else
	    echo $ac_n "checking a.out.h""... $ac_c" 1>&6
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 <<EOF
#line 3790 "configure"
#include "confdefs.h"
#include <a.out.h>
int main() {

		struct exec foo;
		unsigned long seek;
		int flag;
#if defined(__mips) || defined(mips)
		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
#else
		seek = N_TXTOFF (foo);
#endif
		flag = (foo.a_magic == OMAGIC);
		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
	    
; return 0; }
EOF
if { (eval echo configure:3808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_aout_h=usable
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_aout_h=unusable
fi
rm -f conftest*
fi

echo "$ac_t""$tcl_cv_aout_h" 1>&6
	    if test $tcl_cv_aout_h = usable; then
		cat >> confdefs.h <<\EOF
#define USE_A_OUT_H 1
EOF

	    else
		echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
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 <<EOF
#line 3834 "configure"
#include "confdefs.h"
#include <sys/exec_aout.h>
int main() {

		    struct exec foo;
		    unsigned long seek;
		    int flag;
#if defined(__mips) || defined(mips)
		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
#else
		    seek = N_TXTOFF (foo);
#endif
		    flag = (foo.a_midmag == OMAGIC);
		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
		
; return 0; }
EOF
if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_sysexecaout_h=usable
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_sysexecaout_h=unusable
3925
3926
3927
3928
3929
3930
3931

3932
3933
3934
3935




3936

3937
3938
3939
3940
3941
3942
3943

    if test "$SHARED_LIB_SUFFIX" = "" ; then
	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
    fi
    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
    fi


    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)'

    else
        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}

        if test "$RANLIB" = "" ; then
            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
        else







>




>
>
>
>
|
>







3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948

    if test "$SHARED_LIB_SUFFIX" = "" ; then
	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
    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}'
        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}

        if test "$RANLIB" = "" ; then
            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
        else
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
    fi

	# See if the compiler supports casting to a union type.
	# This is used to stop gcc from printing a compiler
	# 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
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 <<EOF
#line 3970 "configure"
#include "confdefs.h"

int main() {

		  union foo { int i; double d; };
		  union foo f = (union foo) (int) 0;
	    
; return 0; }
EOF
if { (eval echo configure:3980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_cast_to_union=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_cast_to_union=no







|




|









|







3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
    fi

	# See if the compiler supports casting to a union type.
	# This is used to stop gcc from printing a compiler
	# warning when initializing a union member.

	echo $ac_n "checking for cast to union support""... $ac_c" 1>&6
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 <<EOF
#line 3975 "configure"
#include "confdefs.h"

int main() {

		  union foo { int i; double d; };
		  union foo f = (union foo) (int) 0;
	    
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_cast_to_union=no
4022
4023
4024
4025
4026
4027
4028

4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
    

    
    
    
    
    




    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
echo "configure:4034: 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"
  tcl_ok=$enableval
else
  tcl_ok=no
fi







>




|







4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
    

    
    
    
    
    
    



    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
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"
  tcl_ok=$enableval
else
  tcl_ok=no
fi
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135

#--------------------------------------------------------------------
#	Detect what compiler flags to set for 64-bit support.
#--------------------------------------------------------------------


    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
echo "configure:4099: 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 <<EOF
#line 4106 "configure"
#include "confdefs.h"
#include <stdlib.h>
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
  rm -rf conftest*
  tcl_cv_flag__isoc99_source=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 4121 "configure"
#include "confdefs.h"
#define _ISOC99_SOURCE 1
#include <stdlib.h>
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
  rm -rf conftest*
  tcl_cv_flag__isoc99_source=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_flag__isoc99_source=no







|






|






|







|







|







4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141

#--------------------------------------------------------------------
#	Detect what compiler flags to set for 64-bit support.
#--------------------------------------------------------------------


    echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
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 <<EOF
#line 4112 "configure"
#include "confdefs.h"
#include <stdlib.h>
int main() {
char *p = (char *)strtoll; char *q = (char *)strtoull;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 4127 "configure"
#include "confdefs.h"
#define _ISOC99_SOURCE 1
#include <stdlib.h>
int main() {
char *p = (char *)strtoll; char *q = (char *)strtoull;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_flag__isoc99_source=no
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
    fi

    
    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4156 "configure"
#include "confdefs.h"
#include <sys/stat.h>
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
  rm -rf conftest*
  tcl_cv_flag__largefile64_source=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 4171 "configure"
#include "confdefs.h"
#define _LARGEFILE64_SOURCE 1
#include <sys/stat.h>
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
  rm -rf conftest*
  tcl_cv_flag__largefile64_source=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_flag__largefile64_source=no







|






|







|







|







4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
    fi

    
    if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4162 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
struct stat64 buf; int i = stat64("/", &buf);
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 4177 "configure"
#include "confdefs.h"
#define _LARGEFILE64_SOURCE 1
#include <sys/stat.h>
int main() {
struct stat64 buf; int i = stat64("/", &buf);
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_flag__largefile64_source=no
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
    fi

    
    if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4206 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
char *p = (char *)open64;
; return 0; }
EOF
if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_flag__largefile_source64=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 4221 "configure"
#include "confdefs.h"
#define _LARGEFILE_SOURCE64 1
#include <sys/stat.h>
int main() {
char *p = (char *)open64;
; return 0; }
EOF
if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_flag__largefile_source64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_flag__largefile_source64=no







|






|







|







|







4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
    fi

    
    if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4212 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
char *p = (char *)open64;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 4227 "configure"
#include "confdefs.h"
#define _LARGEFILE_SOURCE64 1
#include <sys/stat.h>
int main() {
char *p = (char *)open64;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_flag__largefile_source64=no
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
    else
	echo "$ac_t""${tcl_flags}" 1>&6
    fi



    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
echo "configure:4260: 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
  
	tcl_cv_type_64bit=none
	# See if the compiler knows natively about __int64
	cat > conftest.$ac_ext <<EOF
#line 4268 "configure"
#include "confdefs.h"

int main() {
__int64 value = (__int64) 0;
; return 0; }
EOF
if { (eval echo configure:4275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_type_64bit=__int64
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_type_64bit="long long"
fi
rm -f conftest*
	# See if we should use long anyway  Note that we substitute in the
	# 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 <<EOF
#line 4289 "configure"
#include "confdefs.h"

int main() {
switch (0) {
            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
        }
; return 0; }
EOF
if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_type_64bit=${tcl_type_64bit}
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*







|







|






|













|








|







4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
    else
	echo "$ac_t""${tcl_flags}" 1>&6
    fi



    echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
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
  
	tcl_cv_type_64bit=none
	# See if the compiler knows natively about __int64
	cat > conftest.$ac_ext <<EOF
#line 4274 "configure"
#include "confdefs.h"

int main() {
__int64 value = (__int64) 0;
; return 0; }
EOF
if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_type_64bit=__int64
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_type_64bit="long long"
fi
rm -f conftest*
	# See if we should use long anyway  Note that we substitute in the
	# 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 <<EOF
#line 4295 "configure"
#include "confdefs.h"

int main() {
switch (0) {
            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
        }
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
EOF

	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6

	# Now check for auxiliary declarations
	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
echo "configure:4323: 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 <<EOF
#line 4329 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/dirent.h>
int main() {
struct dirent64 p;
; return 0; }
EOF
if { (eval echo configure:4337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_struct_dirent64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_struct_dirent64=no
fi
rm -f conftest*
fi

echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
	    cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
EOF

	fi

	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
echo "configure:4358: 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 <<EOF
#line 4364 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
struct stat64 p;

; return 0; }
EOF
if { (eval echo configure:4372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_struct_stat64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_struct_stat64=no







|





|







|




















|





|







|







4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
EOF

	echo "$ac_t""${tcl_cv_type_64bit}" 1>&6

	# Now check for auxiliary declarations
	echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
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 <<EOF
#line 4335 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/dirent.h>
int main() {
struct dirent64 p;
; return 0; }
EOF
if { (eval echo configure:4343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_struct_dirent64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_struct_dirent64=no
fi
rm -f conftest*
fi

echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
	    cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
EOF

	fi

	echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
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 <<EOF
#line 4370 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
struct stat64 p;

; return 0; }
EOF
if { (eval echo configure:4378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_struct_stat64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_struct_stat64=no
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
EOF

	fi

	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
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 <<EOF
#line 4400 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */







|




|







4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
EOF

	fi

	for ac_func in open64 lseek64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
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 <<EOF
#line 4406 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:4423: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"







|







4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
 
else
  echo "$ac_t""no" 1>&6
fi
done

	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
echo "configure:4448: 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 <<EOF
#line 4454 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
off64_t offset;

; return 0; }
EOF
if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_type_off64_t=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_type_off64_t=no







|





|







|







4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
 
else
  echo "$ac_t""no" 1>&6
fi
done

	echo $ac_n "checking for off64_t""... $ac_c" 1>&6
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 <<EOF
#line 4460 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
off64_t offset;

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_type_off64_t=no
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565


#--------------------------------------------------------------------
#	Check endianness because we can optimize some operations
#--------------------------------------------------------------------

echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:4493: 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 <<EOF
#line 4500 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
if { (eval echo configure:4511: \"$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 <<EOF
#line 4515 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
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 <<EOF
#line 4546 "configure"
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:4559: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes







|






|










|



|










|



















|












|







4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571


#--------------------------------------------------------------------
#	Check endianness because we can optimize some operations
#--------------------------------------------------------------------

echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
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 <<EOF
#line 4506 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
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 <<EOF
#line 4521 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:4532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
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 <<EOF
#line 4552 "configure"
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
#	systems like OSF/1 have a sys/select.h that's of no use, and
#	other systems like SCO UNIX have a sys/select.h that's
#	pernicious.  If "fd_set" isn't defined anywhere then set a
#	special flag.
#--------------------------------------------------------------------

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
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 <<EOF
#line 4617 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
fd_set readMask, writeMask;
; return 0; }
EOF
if { (eval echo configure:4624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  tcl_cv_type_fd_set=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_type_fd_set=no
fi
rm -f conftest*
fi

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
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
#line 4646 "configure"
#include "confdefs.h"
#include <sys/select.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "fd_mask" >/dev/null 2>&1; then
  rm -rf conftest*
  tcl_cv_grep_fd_mask=present







|





|






|















|





|







4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
#	systems like OSF/1 have a sys/select.h that's of no use, and
#	other systems like SCO UNIX have a sys/select.h that's
#	pernicious.  If "fd_set" isn't defined anywhere then set a
#	special flag.
#--------------------------------------------------------------------

echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
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 <<EOF
#line 4623 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
fd_set readMask, writeMask;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_type_fd_set=no
fi
rm -f conftest*
fi

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: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
#line 4652 "configure"
#include "confdefs.h"
#include <sys/select.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "fd_mask" >/dev/null 2>&1; then
  rm -rf conftest*
  tcl_cv_grep_fd_mask=present
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
#       Find out all about time handling differences.
#------------------------------------------------------------------------------

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
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
#line 4691 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5







|




|




|







4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
#       Find out all about time handling differences.
#------------------------------------------------------------------------------

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: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
#line 4697 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
 
else
  echo "$ac_t""no" 1>&6
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
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4728 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:4737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no







|




|








|







4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
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 <<EOF
#line 4734 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:4743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
#	terminating character under some conditions.  Check for this
#	and if the problem exists use a substitute procedure
#	"fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------


    echo $ac_n "checking for strtod""... $ac_c" 1>&6
echo "configure:4767: 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 <<EOF
#line 4772 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strtod(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */







|




|







4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
#	terminating character under some conditions.  Check for this
#	and if the problem exists use a substitute procedure
#	"fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------


    echo $ac_n "checking for strtod""... $ac_c" 1>&6
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 <<EOF
#line 4778 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strtod(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
choke me
#else
strtod();
#endif

; return 0; }
EOF
if { (eval echo configure:4795: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_strtod=no"







|







4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
choke me
#else
strtod();
#endif

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_strtod=no"
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
else
  echo "$ac_t""no" 1>&6
tcl_strtod=0
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
if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	    if test "$cross_compiling" = yes; then
  tcl_cv_strtod_buggy=buggy
else
  cat > conftest.$ac_ext <<EOF
#line 4826 "configure"
#include "confdefs.h"

		extern double strtod();
		int main() {
		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
		    char *term;
		    double value;







|








|







4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
else
  echo "$ac_t""no" 1>&6
tcl_strtod=0
fi

    if test "$tcl_strtod" = 1; then
	echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
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
  
	    if test "$cross_compiling" = yes; then
  tcl_cv_strtod_buggy=buggy
else
  cat > conftest.$ac_ext <<EOF
#line 4832 "configure"
#include "confdefs.h"

		extern double strtod();
		int main() {
		    char *infString="Inf", *nanString="NaN", *spaceString=" ";
		    char *term;
		    double value;
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
		    value = strtod(spaceString, &term);
		    if (term == (spaceString+1)) {
			exit(1);
		    }
		    exit(0);
		}
EOF
if { (eval echo configure:4849: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  tcl_cv_strtod_buggy=buggy







|







4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
		    value = strtod(spaceString, &term);
		    if (term == (spaceString+1)) {
			exit(1);
		    }
		    exit(0);
		}
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  tcl_cv_strtod_buggy=buggy
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966

#--------------------------------------------------------------------
#	Check for various typedefs and provide substitutes if
#	they don't exist.
#--------------------------------------------------------------------

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:4880: 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 <<EOF
#line 4885 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
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
#line 4910 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

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
#line 4928 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4949 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
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
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no







|




|







|
















|

















|




















|










|







4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972

#--------------------------------------------------------------------
#	Check for various typedefs and provide substitutes if
#	they don't exist.
#--------------------------------------------------------------------

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
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 <<EOF
#line 4891 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
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
#line 4916 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

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
#line 4934 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 4955 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:4984: 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 <<EOF
#line 4989 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF







|




|







4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo $ac_n "checking for mode_t""... $ac_c" 1>&6
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 <<EOF
#line 4995 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
  cat >> confdefs.h <<\EOF
#define mode_t int
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:5017: 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 <<EOF
#line 5022 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF







|




|







5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
  cat >> confdefs.h <<\EOF
#define mode_t int
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
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 <<EOF
#line 5028 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
  cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:5050: 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 <<EOF
#line 5055 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF







|




|







5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
  cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
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 <<EOF
#line 5061 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
  cat >> confdefs.h <<\EOF
#define size_t unsigned
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
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
#line 5088 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes







|




|







5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
  cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF

fi

echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
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
#line 5094 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141


#-------------------------------------------
#     In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------

echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6
echo "configure:5122: 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 <<EOF
#line 5128 "configure"
#include "confdefs.h"
#include <pwd.h>
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
  rm -rf conftest*
  tcl_cv_pwd_pw_gecos=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_pwd_pw_gecos=no







|





|






|







5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147


#-------------------------------------------
#     In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------

echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6
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 <<EOF
#line 5134 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
struct passwd pwd; pwd.pw_gecos;
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_pwd_pw_gecos=no
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167

#--------------------------------------------------------------------
#	On Mac OS X, we can build either with X11 or with Aqua
#--------------------------------------------------------------------

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
    # Check whether --enable-aqua or --disable-aqua was given.
if test "${enable_aqua+set}" = set; then
  enableval="$enable_aqua"
  tk_aqua=$enableval
else
  tk_aqua=no
fi







|







5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173

#--------------------------------------------------------------------
#	On Mac OS X, we can build either with X11 or with Aqua
#--------------------------------------------------------------------

if test "`uname -s`" = "Darwin" ; then
    echo $ac_n "checking whether to use Aqua""... $ac_c" 1>&6
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"
  tk_aqua=$enableval
else
  tk_aqua=no
fi
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
	    tk_aqua=no
	fi
    fi
    echo "$ac_t""$tk_aqua" 1>&6
    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
if eval "test \"`echo '$''{'tcl_cv_lib_x11_64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		for v in CFLAGS CPPFLAGS LDFLAGS; do
		    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
		done
		CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
		LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
		cat > conftest.$ac_ext <<EOF
#line 5199 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
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
  rm -rf conftest*
  tcl_cv_lib_x11_64=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_lib_x11_64=no







|










|






|







5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
	    tk_aqua=no
	fi
    fi
    echo "$ac_t""$tk_aqua" 1>&6
    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: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
  
		for v in CFLAGS CPPFLAGS LDFLAGS; do
		    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
		done
		CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
		LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
		cat > conftest.$ac_ext <<EOF
#line 5205 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {
XrmInitialize();
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  tcl_cv_lib_x11_64=no
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
    
    
    # If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# 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

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi








|







5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
    
    
    # If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# 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:5272: checking for X" >&5

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi

5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 5328 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5







|




|







5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 5334 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5402 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:5409: \"$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.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5







|






|







5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5408 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
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.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

    not_really_there=""
    if test "$no_x" = ""; then
	if test "$x_includes" = ""; then
	    cat > conftest.$ac_ext <<EOF
#line 5499 "configure"
#include "confdefs.h"
#include <X11/XIntrinsic.h>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  not_really_there="yes"
fi
rm -f conftest*
	else
	    if test ! -r $x_includes/X11/Intrinsic.h; then
		not_really_there="yes"
	    fi
	fi
    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
	found_xincludes="no"
	cat > conftest.$ac_ext <<EOF
#line 5527 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
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; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  found_xincludes="yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5







|




|



















|


|




|







5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

    not_really_there=""
    if test "$no_x" = ""; then
	if test "$x_includes" = ""; then
	    cat > conftest.$ac_ext <<EOF
#line 5505 "configure"
#include "confdefs.h"
#include <X11/XIntrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  not_really_there="yes"
fi
rm -f conftest*
	else
	    if test ! -r $x_includes/X11/Intrinsic.h; then
		not_really_there="yes"
	    fi
	fi
    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:5530: checking for X11 header files" >&5
	found_xincludes="no"
	cat > conftest.$ac_ext <<EOF
#line 5533 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (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*
  found_xincludes="yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
    fi
    if test "$found_xincludes" = "no"; then
	echo "$ac_t""couldn't find any!" 1>&6
    fi

    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
	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
	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
		echo "$ac_t""$i" 1>&6
		XLIBSW="-L$i -lX11"
		x_libraries="$i"
		break
	    fi
	done
    else
	if test "$x_libraries" = ""; then
	    XLIBSW=-lX11
	else
	    XLIBSW="-L$x_libraries -lX11"
	fi
    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
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lXwindow  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5596 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XCreateWindow();

int main() {
XCreateWindow()
; return 0; }
EOF
if { (eval echo configure:5607: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"







|



















|







|










|







5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
    fi
    if test "$found_xincludes" = "no"; then
	echo "$ac_t""couldn't find any!" 1>&6
    fi

    if test "$no_x" = yes; then
	echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
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
	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
		echo "$ac_t""$i" 1>&6
		XLIBSW="-L$i -lX11"
		x_libraries="$i"
		break
	    fi
	done
    else
	if test "$x_libraries" = ""; then
	    XLIBSW=-lX11
	else
	    XLIBSW="-L$x_libraries -lX11"
	fi
    fi
    if test "$XLIBSW" = nope ; then
	echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lXwindow  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5602 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XCreateWindow();

int main() {
XCreateWindow()
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
#	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
#	   To get around this problem, check for both libraries together
#	   if -lsocket doesn't work by itself.
#--------------------------------------------------------------------

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
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lXbsd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5692 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5699: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"







|







|






|







5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
#	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
#	   To get around this problem, check for both libraries together
#	   if -lsocket doesn't work by itself.
#--------------------------------------------------------------------

if test $tk_aqua = no; then
    echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lXbsd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5698 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
  echo "$ac_t""no" 1>&6
fi

fi

tk_checkBoth=0
echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:5723: 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 <<EOF
#line 5728 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */







|




|







5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
  echo "$ac_t""no" 1>&6
fi

fi

tk_checkBoth=0
echo $ac_n "checking for connect""... $ac_c" 1>&6
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 <<EOF
#line 5734 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
choke me
#else
connect();
#endif

; return 0; }
EOF
if { (eval echo configure:5751: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"







|







5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
choke me
#else
connect();
#endif

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
else
  echo "$ac_t""no" 1>&6
tk_checkSocket=1
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
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5781 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5788: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"







|







|






|







5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
else
  echo "$ac_t""no" 1>&6
tk_checkSocket=1
fi

if test "$tk_checkSocket" = 1; then
    echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5787 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
fi

fi
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
if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5819 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char accept(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */







|




|







5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
fi

fi
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: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 <<EOF
#line 5825 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char accept(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
choke me
#else
accept();
#endif

; return 0; }
EOF
if { (eval echo configure:5842: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_accept=no"







|







5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
choke me
#else
accept();
#endif

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_accept=no"
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
else
  echo "$ac_t""no" 1>&6
LIBS=$tk_oldLibs
fi

fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:5864: 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 <<EOF
#line 5869 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */







|




|







5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
else
  echo "$ac_t""no" 1>&6
LIBS=$tk_oldLibs
fi

fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
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 <<EOF
#line 5875 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
if { (eval echo configure:5892: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
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
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5918 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:5925: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"







|

















|







|






|







5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5924 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
#
# Note: can't use ac_check_lib macro (at least, not in Autoconf 2.1)
# because it can't deal with the "-" in the library name.
#--------------------------------------------------------------------

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
    tk_oldCFlags=$CFLAGS
    CFLAGS="$CFLAGS -I/usr/include/mit"
    tk_oldLibs=$LIBS
    LIBS="$LIBS -lX11-mit"
    cat > conftest.$ac_ext <<EOF
#line 5967 "configure"
#include "confdefs.h"

	#include <X11/Xlib.h>
    
int main() {

	XOpenDisplay(0);
    
; return 0; }
EOF
if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  
	echo "$ac_t""yes" 1>&6
	XLIBSW="-lX11-mit"
	XINCLUDES="-I/usr/include/mit"
    
else







|





|










|







5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
#
# Note: can't use ac_check_lib macro (at least, not in Autoconf 2.1)
# because it can't deal with the "-" in the library name.
#--------------------------------------------------------------------

if test -d /usr/include/mit -a $tk_aqua = no; then
    echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6
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 <<EOF
#line 5973 "configure"
#include "confdefs.h"

	#include <X11/Xlib.h>
    
int main() {

	XOpenDisplay(0);
    
; return 0; }
EOF
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
	XLIBSW="-lX11-mit"
	XINCLUDES="-I/usr/include/mit"
    
else
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015

#--------------------------------------------------------------------
#	Figure out whether "char" is unsigned.  If so, set a
#	#define for __CHAR_UNSIGNED__.
#--------------------------------------------------------------------

echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
echo "configure:6002: 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 <<EOF
#line 6009 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |







|






|







6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021

#--------------------------------------------------------------------
#	Figure out whether "char" is unsigned.  If so, set a
#	#define for __CHAR_UNSIGNED__.
#--------------------------------------------------------------------

echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
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 <<EOF
#line 6015 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
rm -f conftest*

else
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 <<EOF
#line 6031 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
#if !defined(__STDC__) || __STDC__ != 1
#define volatile
#endif
main() {
  volatile char c = 255; exit(c < 0);
}
EOF
if { (eval echo configure:6041: \"$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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_char_unsigned=no







|









|







6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
rm -f conftest*

else
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 <<EOF
#line 6037 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
#if !defined(__STDC__) || __STDC__ != 1
#define volatile
#endif
main() {
  volatile char c = 255; exit(c < 0);
}
EOF
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_char_unsigned=no
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
# AIX remembers this path and will attempt to use it at run-time to look
# up the Tcl library.

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
	# Check whether --enable-framework or --disable-framework was given.
if test "${enable_framework+set}" = set; then
  enableval="$enable_framework"
  enable_framework=$enableval
else
  enable_framework=no
fi







|







6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
# AIX remembers this path and will attempt to use it at run-time to look
# up the Tcl library.

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: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"
  enable_framework=$enableval
else
  enable_framework=no
fi
6490
6491
6492
6493
6494
6495
6496

6497
6498
6499
6500
6501
6502
6503
s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g
s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
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%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
s%@TK_VERSION@%$TK_VERSION%g
s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g
s%@TK_PATCH_LEVEL@%$TK_PATCH_LEVEL%g







>







6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g
s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
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
s%@TK_VERSION@%$TK_VERSION%g
s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g
s%@TK_PATCH_LEVEL@%$TK_PATCH_LEVEL%g

Changes to unix/tcl.m4.

1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
	    # methods are to be avoided for timezone deduction instead, we
	    # deduce the timezone by comparing the localtime result on a
	    # known GMT value.

	    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)
	    fi
	    ;;
	BeOS*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_LD='${CC} -nostart'
	    SHLIB_SUFFIX=".so"
	    DL_OBJS="tclLoadDl.o"







|







1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
	    # methods are to be avoided for timezone deduction instead, we
	    # deduce the timezone by comparing the localtime result on a
	    # known GMT value.

	    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, 1, [Use delta for TZ])
	    fi
	    ;;
	BeOS*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_LD='${CC} -nostart'
	    SHLIB_SUFFIX=".so"
	    DL_OBJS="tclLoadDl.o"
1436
1437
1438
1439
1440
1441
1442
1443
1444

1445
1446
1447
1448
1449
1450
1451
	    # is kind of overkill but it works.
	    # Disable inlining only when one of the
	    # files in compat/*.c is being linked in.
	    if test x"${LIBOBJS}" != x ; then
	        CFLAGS="$CFLAGS -fno-inline"
	    fi

	    # XIM peeking works under XFree86.
	    AC_DEFINE(PEEK_XCLOSEIM)


	    ;;
	GNU*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    if test "$have_dl" = yes; then







<
|
>







1436
1437
1438
1439
1440
1441
1442

1443
1444
1445
1446
1447
1448
1449
1450
1451
	    # is kind of overkill but it works.
	    # Disable inlining only when one of the
	    # files in compat/*.c is being linked in.
	    if test x"${LIBOBJS}" != x ; then
	        CFLAGS="$CFLAGS -fno-inline"
	    fi


	    AC_DEFINE(PEEK_XCLOSEIM, 1,
		[XIM peeking works under XFree86])

	    ;;
	GNU*)
	    SHLIB_CFLAGS="-fPIC"
	    SHLIB_SUFFIX=".so"

	    if test "$have_dl" = yes; then
1738
1739
1740
1741
1742
1743
1744
1745

1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761

1762
1763
1764
1765
1766
1767
1768
			[CFBundleRef b = CFBundleGetMainBundle();],
			tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
		    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
			eval $v'="$hold_'$v'"'
		    done; fi; LIBS=$hold_libs])
		if test $tcl_cv_lib_corefoundation = yes; then
		    LIBS="$LIBS -framework CoreFoundation"
		    AC_DEFINE(HAVE_COREFOUNDATION)

		else
		    tcl_corefoundation=no
		fi
		if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
		    AC_CACHE_CHECK([for 64-bit CoreFoundation], tcl_cv_lib_corefoundation_64, [
			for v in CFLAGS CPPFLAGS LDFLAGS; do
			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
			done
			AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
			    [CFBundleRef b = CFBundleGetMainBundle();],
			    tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no)
			for v in CFLAGS CPPFLAGS LDFLAGS; do
			    eval $v'="$hold_'$v'"'
			done])
		    if test $tcl_cv_lib_corefoundation_64 = no; then
			AC_DEFINE(NO_COREFOUNDATION_64)

		    fi
		fi
	    fi
	    AC_DEFINE(MAC_OSX_TCL)
	    ;;
	NEXTSTEP-*)
	    SHLIB_CFLAGS=""







|
>















|
>







1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
			[CFBundleRef b = CFBundleGetMainBundle();],
			tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
		    if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
			eval $v'="$hold_'$v'"'
		    done; fi; LIBS=$hold_libs])
		if test $tcl_cv_lib_corefoundation = yes; then
		    LIBS="$LIBS -framework CoreFoundation"
		    AC_DEFINE(HAVE_COREFOUNDATION, 1,
			[Do we have access to Darwin CoreFoundation.framework?])
		else
		    tcl_corefoundation=no
		fi
		if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
		    AC_CACHE_CHECK([for 64-bit CoreFoundation], tcl_cv_lib_corefoundation_64, [
			for v in CFLAGS CPPFLAGS LDFLAGS; do
			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
			done
			AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
			    [CFBundleRef b = CFBundleGetMainBundle();],
			    tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no)
			for v in CFLAGS CPPFLAGS LDFLAGS; do
			    eval $v'="$hold_'$v'"'
			done])
		    if test $tcl_cv_lib_corefoundation_64 = no; then
			AC_DEFINE(NO_COREFOUNDATION_64, 1,
			    [Is Darwin CoreFoundation unavailable for 64-bit?])
		    fi
		fi
	    fi
	    AC_DEFINE(MAC_OSX_TCL)
	    ;;
	NEXTSTEP-*)
	    SHLIB_CFLAGS=""
2193
2194
2195
2196
2197
2198
2199

2200
2201
2202
2203




2204

2205
2206
2207
2208
2209
2210
2211

    if test "$SHARED_LIB_SUFFIX" = "" ; then
	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
    fi
    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
    fi


    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)'

    else
        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}

        if test "$RANLIB" = "" ; then
            MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
        else







>




>
>
>
>
|
>







2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219

    if test "$SHARED_LIB_SUFFIX" = "" ; then
	SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
    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}'
        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}

        if test "$RANLIB" = "" ; then
            MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}'
            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
        else
2266
2267
2268
2269
2270
2271
2272

2273
2274
2275
2276
2277
2278
2279
    AC_SUBST(SHLIB_LD_LIBS)
    AC_SUBST(SHLIB_CFLAGS)
    AC_SUBST(SHLIB_SUFFIX)

    AC_SUBST(MAKE_LIB)
    AC_SUBST(MAKE_STUB_LIB)
    AC_SUBST(INSTALL_LIB)

    AC_SUBST(INSTALL_STUB_LIB)
    AC_SUBST(RANLIB)
])

#--------------------------------------------------------------------
# SC_SERIAL_PORT
#







>







2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
    AC_SUBST(SHLIB_LD_LIBS)
    AC_SUBST(SHLIB_CFLAGS)
    AC_SUBST(SHLIB_SUFFIX)

    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)
])

#--------------------------------------------------------------------
# SC_SERIAL_PORT
#