From 315eceb5db3079f23e9b44bbc8c26b32f07b60f3 Mon Sep 17 00:00:00 2001 From: surles Date: Wed, 16 Jun 1999 20:11:28 +0000 Subject: modified files to work with new windows Makefiles --- generic/tkInt.decls | 10 +- generic/tkInt.h | 27 +- generic/tkIntXlibDecls.h | 18 +- generic/tkStubInit.c | 4 +- generic/tkTest.c | 4 +- generic/tkText.h | 25 +- unix/Makefile.in | 3 +- win/aclocal.m4 | 1303 +++++++++++++++------------------------------- win/configure.in | 257 ++++----- win/stubs.c | 6 +- xlib/X11/Xlib.h | 13 - 11 files changed, 593 insertions(+), 1077 deletions(-) diff --git a/generic/tkInt.decls b/generic/tkInt.decls index 5c7693b..30157a6 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tkInt.decls,v 1.7 1999/05/25 01:31:05 stanton Exp $ +# RCS: @(#) $Id: tkInt.decls,v 1.8 1999/06/16 20:11:28 surles Exp $ library tk @@ -1501,6 +1501,10 @@ declare 103 win { Status XStringListToTextProperty(char** list, int count, \ XTextProperty* text_prop_return) } +declare 104 win { + void XDrawLine (Display* d, Drawable dr, GC g, int x1, int y1, \ + int x2, int y2) +} # X functions for Mac @@ -1873,3 +1877,7 @@ declare 80 mac { declare 81 mac { void XForceScreenSaver(Display* display, int mode) } +declare 82 mac { + void XDrawLine (Display* d, Drawable dr, GC g, int x1, int y1, \ + int x2, int y2) +} diff --git a/generic/tkInt.h b/generic/tkInt.h index 6c6dc42..427262f 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.13 1999/04/28 18:18:06 redman Exp $ + * RCS: $Id: tkInt.h,v 1.14 1999/06/16 20:11:28 surles Exp $ */ #ifndef _TKINT @@ -1000,6 +1000,31 @@ EXTERN int TkpTestembedCmd _ANSI_ARGS_((ClientData clientData, /* * Unsupported commands. */ + +typedef struct TkTextIndex TkTextIndex; +typedef struct TkTextSegment TkTextSegment; +typedef struct TkText TkText; +typedef struct TkTextBTree *TkTextBTree; + +EXTERN int TkTextGetIndex _ANSI_ARGS_((Tcl_Interp *interp, + TkText *textPtr, char *string, + TkTextIndex *indexPtr)); +EXTERN void TkTextIndexBackBytes _ANSI_ARGS_(( + CONST TkTextIndex *srcPtr, int count, + TkTextIndex *dstPtr)); +EXTERN void TkTextIndexForwBytes _ANSI_ARGS_(( + CONST TkTextIndex *srcPtr, int count, + TkTextIndex *dstPtr)); +EXTERN TkTextIndex * TkTextMakeCharIndex _ANSI_ARGS_((TkTextBTree tree, + int lineIndex, int charIndex, + TkTextIndex *indexPtr)); +EXTERN TkTextIndex * TkTextMakeByteIndex _ANSI_ARGS_((TkTextBTree tree, + int lineIndex, int byteIndex, + TkTextIndex *indexPtr)); +EXTERN void TkTextPrintIndex _ANSI_ARGS_(( + CONST TkTextIndex *indexPtr, char *string)); +EXTERN TkTextSegment * TkTextSetMark _ANSI_ARGS_((TkText *textPtr, char *name, + TkTextIndex *indexPtr)); EXTERN int TkUnsupported1Cmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, int argc, char **argv)); diff --git a/generic/tkIntXlibDecls.h b/generic/tkIntXlibDecls.h index a720d5a..8ad8fd2 100644 --- a/generic/tkIntXlibDecls.h +++ b/generic/tkIntXlibDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.9 1999/06/02 18:15:54 stanton Exp $ + * RCS: @(#) $Id: tkIntXlibDecls.h,v 1.10 1999/06/16 20:11:28 surles Exp $ */ #ifndef _TKINTXLIBDECLS @@ -351,6 +351,9 @@ EXTERN void XSetWMClientMachine _ANSI_ARGS_((Display* display, /* 103 */ EXTERN Status XStringListToTextProperty _ANSI_ARGS_((char** list, int count, XTextProperty* text_prop_return)); +/* 104 */ +EXTERN void XDrawLine _ANSI_ARGS_((Display* d, Drawable dr, GC g, + int x1, int y1, int x2, int y2)); #endif /* __WIN32__ */ #ifdef MAC_TCL /* Slot 0 is reserved */ @@ -605,6 +608,9 @@ EXTERN void XDrawSegments _ANSI_ARGS_((Display * display, /* 81 */ EXTERN void XForceScreenSaver _ANSI_ARGS_((Display* display, int mode)); +/* 82 */ +EXTERN void XDrawLine _ANSI_ARGS_((Display* d, Drawable dr, GC g, + int x1, int y1, int x2, int y2)); #endif /* MAC_TCL */ typedef struct TkIntXlibStubs { @@ -716,6 +722,7 @@ typedef struct TkIntXlibStubs { XVisualInfo * (*xGetVisualInfo) _ANSI_ARGS_((Display* display, long vinfo_mask, XVisualInfo* vinfo_template, int* nitems_return)); /* 101 */ void (*xSetWMClientMachine) _ANSI_ARGS_((Display* display, Window w, XTextProperty* text_prop)); /* 102 */ Status (*xStringListToTextProperty) _ANSI_ARGS_((char** list, int count, XTextProperty* text_prop_return)); /* 103 */ + void (*xDrawLine) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 104 */ #endif /* __WIN32__ */ #ifdef MAC_TCL void *reserved0; @@ -800,6 +807,7 @@ typedef struct TkIntXlibStubs { Status (*xStringListToTextProperty) _ANSI_ARGS_((char** list, int count, XTextProperty* text_prop_return)); /* 79 */ void (*xDrawSegments) _ANSI_ARGS_((Display * display, Drawable d, GC gc, XSegment * segments, int nsegments)); /* 80 */ void (*xForceScreenSaver) _ANSI_ARGS_((Display* display, int mode)); /* 81 */ + void (*xDrawLine) _ANSI_ARGS_((Display* d, Drawable dr, GC g, int x1, int y1, int x2, int y2)); /* 82 */ #endif /* MAC_TCL */ } TkIntXlibStubs; @@ -1228,6 +1236,10 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XStringListToTextProperty \ (tkIntXlibStubsPtr->xStringListToTextProperty) /* 103 */ #endif +#ifndef XDrawLine +#define XDrawLine \ + (tkIntXlibStubsPtr->xDrawLine) /* 104 */ +#endif #endif /* __WIN32__ */ #ifdef MAC_TCL /* Slot 0 is reserved */ @@ -1555,6 +1567,10 @@ extern TkIntXlibStubs *tkIntXlibStubsPtr; #define XForceScreenSaver \ (tkIntXlibStubsPtr->xForceScreenSaver) /* 81 */ #endif +#ifndef XDrawLine +#define XDrawLine \ + (tkIntXlibStubsPtr->xDrawLine) /* 82 */ +#endif #endif /* MAC_TCL */ #endif /* defined(USE_TK_STUBS) && !defined(USE_TK_STUB_PROCS) */ diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c index 2ebe002..18dab1e 100644 --- a/generic/tkStubInit.c +++ b/generic/tkStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubInit.c,v 1.8 1999/05/25 01:31:06 stanton Exp $ + * RCS: @(#) $Id: tkStubInit.c,v 1.9 1999/06/16 20:11:29 surles Exp $ */ #include "tkInt.h" @@ -565,6 +565,7 @@ TkIntXlibStubs tkIntXlibStubs = { XGetVisualInfo, /* 101 */ XSetWMClientMachine, /* 102 */ XStringListToTextProperty, /* 103 */ + XDrawLine, /* 104 */ #endif /* __WIN32__ */ #ifdef MAC_TCL NULL, /* 0 */ @@ -649,6 +650,7 @@ TkIntXlibStubs tkIntXlibStubs = { XStringListToTextProperty, /* 79 */ XDrawSegments, /* 80 */ XForceScreenSaver, /* 81 */ + XDrawLine, /* 82 */ #endif /* MAC_TCL */ }; diff --git a/generic/tkTest.c b/generic/tkTest.c index 4b2fa93..c396345 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTest.c,v 1.5 1999/04/16 01:51:23 stanton Exp $ + * RCS: @(#) $Id: tkTest.c,v 1.6 1999/06/16 20:11:29 surles Exp $ */ #include "tkInt.h" @@ -206,7 +206,7 @@ extern int TkplatformtestInit _ANSI_ARGS_(( Tcl_Interp *interp)); extern int TclThread_Init _ANSI_ARGS_((Tcl_Interp *interp)); -#if !(defined(__WIN32__) || defined(MAC_TCL)) +#if !(defined(__WIN32__) && defined(MAC_TCL)) #define TkplatformtestInit(x) TCL_OK #endif diff --git a/generic/tkText.h b/generic/tkText.h index 68cfff5..ce69521 100644 --- a/generic/tkText.h +++ b/generic/tkText.h @@ -10,15 +10,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.h,v 1.3 1999/04/16 01:51:23 stanton Exp $ + * RCS: @(#) $Id: tkText.h,v 1.4 1999/06/16 20:11:29 surles Exp $ */ #ifndef _TKTEXT #define _TKTEXT -#ifndef _TK -#include "tk.h" -#endif +#include "tkInt.h" /* * Opaque types for structures whose guts are only needed by a single @@ -780,23 +778,14 @@ extern TkTextTag * TkTextCreateTag _ANSI_ARGS_((TkText *textPtr, extern void TkTextFreeDInfo _ANSI_ARGS_((TkText *textPtr)); extern void TkTextFreeTag _ANSI_ARGS_((TkText *textPtr, TkTextTag *tagPtr)); -extern int TkTextGetIndex _ANSI_ARGS_((Tcl_Interp *interp, - TkText *textPtr, char *string, - TkTextIndex *indexPtr)); extern TkTextTabArray * TkTextGetTabs _ANSI_ARGS_((Tcl_Interp *interp, Tk_Window tkwin, char *string)); -extern void TkTextIndexBackBytes _ANSI_ARGS_(( - CONST TkTextIndex *srcPtr, int count, - TkTextIndex *dstPtr)); extern void TkTextIndexBackChars _ANSI_ARGS_(( CONST TkTextIndex *srcPtr, int count, TkTextIndex *dstPtr)); extern int TkTextIndexCmp _ANSI_ARGS_(( CONST TkTextIndex *index1Ptr, CONST TkTextIndex *index2Ptr)); -extern void TkTextIndexForwBytes _ANSI_ARGS_(( - CONST TkTextIndex *srcPtr, int count, - TkTextIndex *dstPtr)); extern void TkTextIndexForwChars _ANSI_ARGS_(( CONST TkTextIndex *srcPtr, int count, TkTextIndex *dstPtr)); @@ -808,12 +797,6 @@ extern void TkTextInsertDisplayProc _ANSI_ARGS_(( int screenY)); extern void TkTextLostSelection _ANSI_ARGS_(( ClientData clientData)); -extern TkTextIndex * TkTextMakeCharIndex _ANSI_ARGS_((TkTextBTree tree, - int lineIndex, int charIndex, - TkTextIndex *indexPtr)); -extern TkTextIndex * TkTextMakeByteIndex _ANSI_ARGS_((TkTextBTree tree, - int lineIndex, int byteIndex, - TkTextIndex *indexPtr)); extern int TkTextMarkCmd _ANSI_ARGS_((TkText *textPtr, Tcl_Interp *interp, int argc, char **argv)); extern int TkTextMarkNameToIndex _ANSI_ARGS_((TkText *textPtr, @@ -825,8 +808,6 @@ extern void TkTextPickCurrent _ANSI_ARGS_((TkText *textPtr, XEvent *eventPtr)); extern void TkTextPixelIndex _ANSI_ARGS_((TkText *textPtr, int x, int y, TkTextIndex *indexPtr)); -extern void TkTextPrintIndex _ANSI_ARGS_(( - CONST TkTextIndex *indexPtr, char *string)); extern void TkTextRedrawRegion _ANSI_ARGS_((TkText *textPtr, int x, int y, int width, int height)); extern void TkTextRedrawTag _ANSI_ARGS_((TkText *textPtr, @@ -840,8 +821,6 @@ extern int TkTextSeeCmd _ANSI_ARGS_((TkText *textPtr, extern int TkTextSegToOffset _ANSI_ARGS_(( CONST TkTextSegment *segPtr, CONST TkTextLine *linePtr)); -extern TkTextSegment * TkTextSetMark _ANSI_ARGS_((TkText *textPtr, char *name, - TkTextIndex *indexPtr)); extern void TkTextSetYView _ANSI_ARGS_((TkText *textPtr, TkTextIndex *indexPtr, int pickPlace)); extern int TkTextTagCmd _ANSI_ARGS_((TkText *textPtr, diff --git a/unix/Makefile.in b/unix/Makefile.in index 04984b9..50d86b7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.18 1999/06/15 22:23:19 wart Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.19 1999/06/16 20:11:29 surles Exp $ # Current Tk version; used in various names. @@ -76,7 +76,6 @@ MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann # for this version of Tk ("srcdir" will be replaced or has already # been replaced by the configure script): TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic -TCL_UNIX_DIR = @TCL_SRC_DIR@/unix # The directory containing the Tcl library archive file appropriate # for this version of Tk: diff --git a/win/aclocal.m4 b/win/aclocal.m4 index d43ff7b..9099193 100644 --- a/win/aclocal.m4 +++ b/win/aclocal.m4 @@ -1,875 +1,428 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4a - -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A -dnl PARTICULAR PURPOSE. - -#------------------------------------------------------------------------ -# SC_PATH_TCLCONFIG -- -# -# Locate the tclConfig.sh file and perform a sanity check on -# the Tcl compile flags -# Currently a no-op for Windows -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-tcl=... -# -# Defines the following vars: -# TCLCONFIG Full path to the tclConfig.sh file -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PATH_TCLCONFIG, [ -]) - -#------------------------------------------------------------------------ -# SC_PATH_TKCONFIG -- -# -# Locate the tkConfig.sh file -# Currently a no-op for Windows -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-tk=... -# -# Defines the following vars: -# TKCONFIG Full path to the tkConfig.sh file -#------------------------------------------------------------------------ - -AC_DEFUN(SC_PATH_TKCONFIG, [ -]) - -#------------------------------------------------------------------------ -# SC_LOAD_TCLCONFIG -- -# -# Load the tclConfig.sh file -# Currently a no-op for Windows -# -# Arguments: -# -# Requires the following vars to be set: -# TCLCONFIG -# -# Results: -# -# Subst's the following vars: -# TCL_CC -# TCL_DEFS -# TCL_CFLAGS -# TCL_DBGX -# TCL_LIBS -# TCL_SHLIB_LD -# SHLIB_SUFFIX -# TCL_LD_FLAGS -# TCL_BUILD_LIB_SPEC -# TCL_LIB_SPEC -# TCL_SHARED_LIB_SUFFIX -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LOAD_TCLCONFIG, [ -]) - -#------------------------------------------------------------------------ -# SC_LOAD_TKCONFIG -- -# -# Load the tkConfig.sh file -# Currently a no-op for Windows -# -# Arguments: -# -# Requires the following vars to be set: -# TKCONFIG -# -# Results: -# -# Subst's the following vars: -# TK_VERSION -# TK_DEFS -# TK_DBGX -# TK_LIBS -# TK_XINCLUDES -# TK_XLIBSW -# TK_BUILD_LIB_SPEC -# TK_LIB_SPEC -#------------------------------------------------------------------------ - -AC_DEFUN(SC_LOAD_TKCONFIG, [ -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_GCC -- -# -# Allows the use of GCC if available -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-gcc -# -# Defines the following vars: -# CC Command to use for the compiler -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_GCC, [ - AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], - [ok=$enableval], [ok=no]) - if test "$ok" = "yes"; then - CC=gcc - else - CC=cl - fi -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_SHARED -- -# -# Allows the building of shared libraries -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-shared=yes|no -# -# Defines the following vars: -# TCL_SHARED_BUILD Value of 1 or 0 -# STATIC_BUILD -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_SHARED, [ - AC_ARG_ENABLE(shared, - [ --enable-shared build and link with shared libraries [--enable-shared]], - [tcl_ok=$enableval], [tcl_ok=yes]) - - if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval - else - tcl_ok=yes - fi - - if test "$tcl_ok" = "yes" ; then - TCL_SHARED_BUILD=1 - else - TCL_SHARED_BUILD=0 - AC_DEFINE(STATIC_BUILD) - fi - -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_THREADS -- -# -# Specify if thread support should be enabled -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --enable-threads=yes|no -# -# Defines the following vars: -# TCL_THREADS -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_THREADS, [ - AC_ARG_ENABLE(threads, [ --enable-threads build with threads], - [tcl_ok=$enableval], [tcl_ok=no]) - if test "$tcl_ok" = "yes"; then - AC_DEFINE(TCL_THREADS) - echo "building with threads enabled" - else - echo "building with threads disabled (default)" - fi -]) - -#------------------------------------------------------------------------ -# SC_ENABLE_SYMBOLS -- -# -# Specify if debugging symbols should be used -# -# Arguments: -# none -# -# Requires the following vars to be set: -# CFLAGS_DEBUG -# CFLAGS_OPTIMIZE -# -# Results: -# -# Adds the following arguments to configure: -# --enable-symbols -# -# Defines the following vars: -# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true -# Sets to CFLAGS_OPTIMIZE if false -# LD_FLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true - Sets to LDFLAGS_OPTIMIZE if false -# DBGX Debug library extension -# -#------------------------------------------------------------------------ - -AC_DEFUN(SC_ENABLE_SYMBOLS, [ - AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) - - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='${CFLAGS_DEBUG}' - LD_FLAGS_DEFAULT='${LDFLAGS_DEBUG}' - DBGX=d - echo "building with debug symbols" - else - CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}' - LD_FLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}' - DBGX="" - echo "building without debug symbols" - fi -]) - - -#-------------------------------------------------------------------- -# SC_TCL_CONFIG_CFLAGS -# -# Arguments: -# none -# -# Results: -# -# Defines the following vars: -# -# DL_OBJS - Name of the object file that implements dynamic -# loading for Tcl on this system. -# DL_LIBS - Library file(s) to include in tclsh and other base -# applications in order for the "load" command to work. -# LD_FLAGS - Flags to pass to the compiler when linking object -# files into an executable application binary such -# as tclsh. -# LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", -# that tell the run-time dynamic linker where to look -# for shared libraries such as libtcl.so. Depends on -# the variable LIB_RUNTIME_DIR in the Makefile. -# MAKE_LIB - Command to execute to build the Tcl library; -# differs depending on whether or not Tcl is being -# compiled as a shared library. -# SHLIB_CFLAGS - Flags to pass to cc when compiling the components -# of a shared library (may request position-independent -# code, among other things). -# SHLIB_LD - Base command to use for combining object files -# into a shared library. -# SHLIB_LD_LIBS - Dependent libraries for the linker to scan when -# creating shared libraries. This symbol typically -# goes at the end of the "ld" commands that build -# shared libraries. The value of the symbol is -# "${LIBS}" if all of the dependent libraries should -# be specified when creating a shared library. If -# dependent libraries should not be specified (as on -# SunOS 4.x, where they cause the link to fail, or in -# general if Tcl and Tk aren't themselves shared -# libraries), then this symbol has an empty string -# as its value. -# SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable -# extensions. An empty string means we don't know how -# to use shared libraries on this platform. -# TCL_LIB_FILE - Name of the file that contains the Tcl library, such -# as libtcl7.8.so or libtcl7.8.a. -# TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl" -# in the shared library name, using the $VERSION variable -# to put the version in the right place. This is used -# by platforms that need non-standard library names. -# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs -# to have a version after the .so, and ${VERSION}.a -# on AIX, since the Tcl shared library needs to have -# a .a extension whereas shared objects for loadable -# extensions have a .so extension. Defaults to -# ${VERSION}${SHLIB_SUFFIX}. -# TCL_NEEDS_EXP_FILE - -# 1 means that an export file is needed to link to a -# shared library. -# TCL_EXP_FILE - The name of the installed export / import file which -# should be used to link to the Tcl shared library. -# Empty if Tcl is unshared. -# TCL_BUILD_EXP_FILE - -# The name of the built export / import file which -# should be used to link to the Tcl shared library. -# Empty if Tcl is unshared. -# CFLAGS_DEBUG - -# Flags used when running the compiler in debug mode -# CFLAGS_OPTIMIZE - -# Flags used when running the compiler in optimize mode -#-------------------------------------------------------------------- - -AC_DEFUN(SC_TCL_CONFIG_CFLAGS, [ - - # Step 1: set the variable "system" to hold the name and version number - # for the system. This can usually be done via the "uname" command, but - # there are a few systems, like Next, where this doesn't work. - - AC_MSG_CHECKING([system version (for dynamic loading)]) - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - AC_MSG_RESULT([unknown (can't find uname command)]) - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print $3}' /etc/.relid'` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi - AC_MSG_RESULT($system) - fi - fi - - # Step 2: check for existence of -ldl library. This is needed because - # Linux can use either -ldl or -ldld for dynamic loading. - - AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) - - # Step 3: set configuration options based on system name and version. - - do64bit_ok=no - fullSrcDir=`cd $srcdir; pwd` - EXTRA_CFLAGS="" - TCL_EXPORT_FILE_SUFFIX="" - TCL_UNSHARED_LIB_SUFFIX="" - TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' - ECHO_VERSION='`echo ${VERSION}`' - TCL_LIB_VERSIONS_OK=ok - CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O - TCL_NEEDS_EXP_FILE=0 - TCL_BUILD_EXP_FILE="" - TCL_EXP_FILE="" - case $system in - AIX-4.[[2-9]]) - SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - ;; - AIX-*) - SHLIB_CFLAGS="" - SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - LIBOBJS="$LIBOBJS tclLoadAix.o" - DL_LIBS="-lld" - LD_FLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - ;; - BSD/OS-2.1*|BSD/OS-3*) - SHLIB_CFLAGS="" - SHLIB_LD="shlicc -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - BSD/OS-4.*) - SHLIB_CFLAGS="-export-dynamic -fPIC" - SHLIB_LD="cc -shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="-export-dynamic" - LD_SEARCH_FLAGS="" - ;; - dgux*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) - SHLIB_SUFFIX=".sl" - AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) - if test "$tcl_ok" = yes; then - SHLIB_CFLAGS="+z" - SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" - DL_OBJS="tclLoadShl.o" - DL_LIBS="-ldld" - LD_FLAGS="-Wl,-E" - LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' - fi - ;; - IRIX-4.*) - SHLIB_CFLAGS="-G 0" - SHLIB_SUFFIX=".a" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LD_FLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' - ;; - IRIX-5.*|IRIX-6.*|IRIX64-6.5*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -n32 -shared -rdata_shared" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then - EXTRA_CFLAGS="-mabi=n32" - LD_FLAGS="-mabi=n32" - else - case $system in - IRIX-6.3) - # Use to build 6.2 compatible binaries on 6.3. - EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" - ;; - *) - EXTRA_CFLAGS="-n32" - ;; - esac - LD_FLAGS="-n32" - fi - ;; - IRIX64-6.*) - SHLIB_CFLAGS="" - SHLIB_LD="ld -32 -shared -rdata_shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - ;; - Linux*) - SHLIB_CFLAGS="-fPIC" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - if test "$have_dl" = yes; then - SHLIB_LD="${CC} -shared" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="-rdynamic" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - else - AC_CHECK_HEADER(dld.h, [ - SHLIB_LD="ld -shared" - DL_OBJS="tclLoadDld.o" - DL_LIBS="-ldld" - LD_FLAGS="" - LD_SEARCH_FLAGS=""]) - fi - ;; - MP-RAS-02*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - MP-RAS-*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="-Wl,-Bexport" - LD_SEARCH_FLAGS="" - ;; - NetBSD-*|FreeBSD-[[12]].*|OpenBSD-*) - # Not available on all versions: check for include file. - AC_CHECK_HEADER(dlfcn.h, [ - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - ], [ - SHLIB_CFLAGS="" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".a" - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - ]) - - # FreeBSD doesn't handle version numbers with dots. - - TCL_UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - FreeBSD-*) - # FreeBSD 3.* and greater have ELF. - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -Bshareable -x" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - NEXTSTEP-*) - SHLIB_CFLAGS="" - SHLIB_LD="cc -nostdlib -r" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadNext.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h - ;; - OSF1-1.0|OSF1-1.1|OSF1-1.2) - # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 - SHLIB_CFLAGS="" - # Hack: make package name same as library name - SHLIB_LD='ld -R -export $@:' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadOSF.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-1.*) - # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -shared" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - OSF1-V*) - # Digital OSF/1 - SHLIB_CFLAGS="" - SHLIB_LD='ld -shared -expect_unresolved "*"' - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - ;; - RISCos-*) - SHLIB_CFLAGS="-G 0" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".a" - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LD_FLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - ;; - SCO_SV-3.2*) - # Note, dlopen is available only on SCO 3.2.5 and greater. However, - # this test works, since "uname -s" was non-standard in 3.2.4 and - # below. - SHLIB_CFLAGS="-Kpic -belf" - SHLIB_LD="ld -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LD_FLAGS="-belf -Wl,-Bexport" - LD_SEARCH_FLAGS="" - ;; - SINIX*5.4*) - SHLIB_CFLAGS="-K PIC" - SHLIB_LD="cc -G" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - ;; - SunOS-4*) - SHLIB_CFLAGS="-PIC" - SHLIB_LD="ld" - SHLIB_LD_LIBS="" - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - - # SunOS can't handle version numbers with dots in them in library - # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it - # requires an extra version number at the end of .so file names. - # So, the library has to have a name like libtcl75.so.1.0 - - TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - TCL_UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; - SunOS-5.[[0-6]]*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - LD_FLAGS="" - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - ;; - SunOS-5*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - LD_FLAGS="" - - do64bit_ok=no - if test "$do64bit" = "yes" ; then - arch=`isainfo` - if test "$arch" = "sparcv9 sparc" ; then - if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then - do64bit_ok=yes - EXTRA_CFLAGS="-xarch=v9" - LD_FLAGS="-xarch=v9" - else - AC_MSG_WARN("64bit mode not supported using GCC on $system") - fi - else - AC_MSG_WARN("64bit mode only supported sparcv9 system") - fi - fi - - # Note: need the LIBS below, otherwise Tk won't find Tcl's - # symbols when dynamically loaded into tclsh. - - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="-ldl" - if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then - LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - fi - ;; - ULTRIX-4.*) - SHLIB_CFLAGS="-G 0" - SHLIB_SUFFIX=".a" - SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" - SHLIB_LD_LIBS='${LIBS}' - DL_OBJS="tclLoadAout.o" - DL_LIBS="" - LD_FLAGS="-Wl,-D,08000000" - LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - ;; - UNIX_SV* | UnixWare-5*) - SHLIB_CFLAGS="-KPIC" - SHLIB_LD="cc -G" - 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. - hold_ldflags=$LDFLAGS - AC_MSG_CHECKING(for ld accepts -Bexport flag) - LDFLAGS="${LDFLAGS} -Wl,-Bexport" - AC_TRY_LINK(, [int i;], found=yes, found=no) - LDFLAGS=$hold_ldflags - AC_MSG_RESULT($found) - if test $found = yes; then - LD_FLAGS="-Wl,-Bexport" - else - LD_FLAGS="" - fi - LD_SEARCH_FLAGS="" - ;; - esac - - if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then - AC_MSG_WARN("64bit support being disabled -- not supported on this platform") - fi - - # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic - # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, - # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need - # to determine which of several header files defines the a.out file - # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we - # support only a file format that is more or less version-7-compatible. - # In particular, - # - a.out files must begin with `struct exec'. - # - the N_TXTOFF on the `struct exec' must compute the seek address - # of the text segment - # - The `struct exec' must contain a_magic, a_text, a_data, a_bss - # and a_entry fields. - # The following compilation should succeed if and only if either sys/exec.h - # or a.out.h is usable for the purpose. - # - # 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 - AC_MSG_CHECKING(sys/exec.h) - AC_TRY_COMPILE([#include ],[ - 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; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then - AC_DEFINE(USE_SYS_EXEC_H) - else - AC_MSG_CHECKING(a.out.h) - AC_TRY_COMPILE([#include ],[ - 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; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then - AC_DEFINE(USE_A_OUT_H) - else - AC_MSG_CHECKING(sys/exec_aout.h) - AC_TRY_COMPILE([#include ],[ - 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; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then - AC_DEFINE(USE_SYS_EXEC_AOUT_H) - else - DL_OBJS="" - fi - fi - fi - fi - - # Step 5: disable dynamic loading if requested via a command-line switch. - - AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], - [tcl_ok=$enableval], [tcl_ok=yes]) - if test "$tcl_ok" = "no"; then - DL_OBJS="" - fi - - if test "x$DL_OBJS" != "x" ; then - BUILD_DLTEST="\$(DLTEST_TARGETS)" - else - echo "Can't figure out how to do dynamic loading or shared libraries" - echo "on this system." - SHLIB_CFLAGS="" - SHLIB_LD="" - SHLIB_SUFFIX="" - DL_OBJS="tclLoadNone.o" - DL_LIBS="" - LD_FLAGS="" - LD_SEARCH_FLAGS="" - BUILD_DLTEST="" - fi - - # If we're running gcc, then change the C flags for compiling shared - # libraries to the right flags for gcc, instead of those for the - # standard manufacturer compiler. - - if test "$DL_OBJS" != "tclLoadNone.o" ; then - if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then - case $system in - AIX-*) - ;; - BSD/OS*) - ;; - IRIX*) - ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) - ;; - RISCos-*) - ;; - ULTRIX-4.*) - ;; - *) - SHLIB_CFLAGS="-fPIC" - ;; - esac - fi - fi -]) - +#------------------------------------------------------------------------ +# SC_PATH_TCLCONFIG -- +# +# Locate the tclConfig.sh file and perform a sanity check on +# the Tcl compile flags +# Currently a no-op for Windows +# +# Arguments: +# PATCH_LEVEL The patch level for Tcl if any. +# +# Results: +# +# Adds the following arguments to configure: +# --with-tcl=... +# +# Defines the following vars: +# TCL_BIN_DIR Full path to the tclConfig.sh file +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PATH_TCLCONFIG, [ + AC_MSG_CHECKING([the location of tclConfig.sh]) + + if test -d ../../tcl8.1$1/win; then + TCL_BIN_DIR_DEFAULT=../../tcl8.1$1/win + else + TCL_BIN_DIR_DEFAULT=../../tcl8.1/win + fi + + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR], + TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`) + if test ! -d $TCL_BIN_DIR; then + AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) + fi + if test ! -f $TCL_BIN_DIR/tclConfig.sh; then + AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + fi + AC_MSG_RESULT([$TCL_BIN_DIR]) +]) + +#------------------------------------------------------------------------ +# SC_PATH_TKCONFIG -- +# +# Locate the tkConfig.sh file +# Currently a no-op for Windows +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-tk=... +# +# Defines the following vars: +# TK_BIN_DIR Full path to the tkConfig.sh file +#------------------------------------------------------------------------ + +AC_DEFUN(SC_PATH_TKCONFIG, [ + AC_MSG_CHECKING([the location of tkConfig.sh]) + + if test -d ../../tk8.1$1/win; then + TK_BIN_DIR_DEFAULT=../../tk8.1$1/win + else + TK_BIN_DIR_DEFAULT=../../tk8.1/win + fi + + AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.1 binaries from DIR], + TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`) + if test ! -d $TK_BIN_DIR; then + AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist) + fi + if test ! -f $TK_BIN_DIR/tkConfig.sh; then + AC_MSG_ERROR(There is no tkConfig.sh in $TK_BIN_DIR: perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?) + fi + + AC_MSG_RESULT([$TK_BIN_DIR]) +]) + +#------------------------------------------------------------------------ +# SC_LOAD_TCLCONFIG -- +# +# Load the tclConfig.sh file +# Currently a no-op for Windows +# +# Arguments: +# +# Requires the following vars to be set: +# TCL_BIN_DIR +# +# Results: +# +# Sets the following vars that should be in tclConfig.sh: +# TCL_BIN_DIR +# TCL_SRC_DIR +# TCL_LIB_FILE +# Defines the following vars: +# TCL_THREADS +#------------------------------------------------------------------------ + +AC_DEFUN(SC_LOAD_TCLCONFIG, [ + AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) + + if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then + AC_MSG_RESULT([loading]) + . $TCL_BIN_DIR/tclConfig.sh + else + AC_MSG_RESULT([file not found]) + fi + + if test "$TCL_THREADS" = "1"; then + AC_DEFINE(TCL_THREADS) + fi +]) + +#------------------------------------------------------------------------ +# SC_LOAD_TKCONFIG -- +# +# Load the tkConfig.sh file +# Currently a no-op for Windows +# +# Arguments: +# +# Requires the following vars to be set: +# TK_BIN_DIR +# +# Results: +# +# Sets the following vars that should be in tkConfig.sh: +# TK_BIN_DIR +#------------------------------------------------------------------------ + +AC_DEFUN(SC_LOAD_TKCONFIG, [ + AC_MSG_CHECKING([for existence of $TCLCONFIG]) + + if test -f "$TK_BIN_DIR/tkConfig.sh" ; then + AC_MSG_CHECKING([loading $TK_BIN_DIR/tkConfig.sh]) + . $TK_BIN_DIR/tkConfig.sh + else + AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) + fi +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_GCC -- +# +# Allows the use of GCC if available +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-gcc +# +# Defines the following vars: +# CC Command to use for the compiler +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_GCC, [ + AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]], + [ok=$enableval], [ok=no]) + if test "$ok" = "yes"; then + CC=gcc + else + CC=cl + fi +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_SHARED -- +# +# Allows the building of shared libraries +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-shared=yes|no +# +# Defines the following vars: +# SHARED_BUILD Value of 1 or 0 +# STATIC_BUILD +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_SHARED, [ + AC_MSG_CHECKING([how to build libraries]) + AC_ARG_ENABLE(shared, + [ --enable-shared build and link with shared libraries [--enable-shared]], + [tcl_ok=$enableval], [tcl_ok=yes]) + + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + tcl_ok=$enableval + else + tcl_ok=yes + fi + + if test "$tcl_ok" = "yes" ; then + AC_MSG_RESULT([shared]) + SHARED_BUILD=1 + else + AC_MSG_RESULT([static]) + SHARED_BUILD=0 + AC_DEFINE(STATIC_BUILD) + fi +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_THREADS -- +# +# Specify if thread support should be enabled +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --enable-threads=yes|no +# +# Defines the following vars: +# TCL_THREADS +# +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_THREADS, [ + AC_MSG_CHECKING(for building with threads) + AC_ARG_ENABLE(threads, [ --enable-threads build with threads], + [tcl_ok=$enableval], [tcl_ok=no]) + if test "$tcl_ok" = "yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(TCL_THREADS) + else + AC_MSG_RESULT(no (default)) + fi +]) + +#------------------------------------------------------------------------ +# SC_ENABLE_SYMBOLS -- +# +# Specify if debugging symbols should be used +# +# Arguments: +# none +# +# Requires the following vars to be set: +# CFLAGS_DEBUG +# CFLAGS_OPTIMIZE +# +# Results: +# +# Adds the following arguments to configure: +# --enable-symbols +# +# Defines the following vars: +# CFLAGS_DEFAULT Sets to CFLAGS_DEBUG if true +# Sets to CFLAGS_OPTIMIZE if false +# LDFLAGS_DEFAULT Sets to LDFLAGS_DEBUG if true +# Sets to LDFLAGS_OPTIMIZE if false +# DBGX Debug library extension +# +#------------------------------------------------------------------------ + +AC_DEFUN(SC_ENABLE_SYMBOLS, [ + AC_MSG_CHECKING([for build with symbols]) + AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) + + if test "$tcl_ok" = "yes"; then + CFLAGS_DEFAULT='${CFLAGS_DEBUG}' + LDFLAGS_DEFAULT='${LDFLAGS_DEBUG}' + DBGX=d + AC_MSG_RESULT([yes]) + else + CFLAGS_DEFAULT='${CFLAGS_OPTIMIZE}' + LDFLAGS_DEFAULT='${LDFLAGS_OPTIMIZE}' + DBGX="" + AC_MSG_RESULT([no]) + fi +]) + + +#-------------------------------------------------------------------- +# SC_CONFIG_CFLAGS +# +# Try to determine the proper flags to pass to the compiler +# for building shared libraries and other such nonsense. +# +# NOTE: The backslashes in quotes below are substituted twice +# due to the fact that they are in a macro and then inlined +# in the final configure script. +# +# Arguments: +# none +# +# Results: +# +# Defines the following vars for all compilers: +# EXTRA_CFLAGS +# CFLAGS_DEBUG +# CFLAGS_OPTIMIZE +# CFLAGS_WARNING +# LDFLAGS_DEBUG +# LDFLAGS_OPTIMIZE +# PATHTYPE +# CC_OBJNAME +# CC_EXENAME +# +# Defines the following vars for non-gcc compilers +# SHLIB_LD +# SHLIB_LD_LIBS +# LIBS +# AR +# MAKE_LIB +# MAKE_EXE +# MAKE_DLL +# +# LIBSUFFIX +# LIBRARIES +# EXESUFFIX +# DLLSUFFIX +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_CONFIG_CFLAGS, [ + AC_MSG_CHECKING([compiler flags]) + EXTRA_CFLAGS="" + # set various compiler flags depending on whether we are using gcc or cl + + if test "${GCC}" = "yes" ; then + CFLAGS_DEBUG=-g + CFLAGS_OPTIMIZE=-O + CFLAGS_WARNING="-Wall -Wconversion" + LDFLAGS_DEBUG=-g + LDFLAGS_OPTIMIZE=-O + PATHTYPE=-u + + # Specify the CC output file names based on the target name + CC_OBJNAME="-o \[$]@" + CC_EXENAME="-o \[$]@" + else + SHLIB_LD="link -dll -nologo" + SHLIB_LD_LIBS="user32.lib advapi32.lib" + LIBS="user32.lib advapi32.lib" + AR="lib -nologo" + RC="rc" + MAKE_LIB="\${AR} -out:\[$]@" + MAKE_EXE="\${CC} -Fe\[$]@" + + if test "${SHARED_BUILD}" = "0" ; then + # static + AC_MSG_RESULT([using static flags]) + runtime=-MT + MAKE_DLL="echo " + LIBSUFFIX="s\${DBGX}.lib" + LIBRARIES="\${STATIC_LIBRARIES}" + EXESUFFIX="s\${DBGX}.exe" + DLLSUFFIX="" + else + # dynamic + AC_MSG_RESULT([using shared flags]) + runtime=-MD + MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@" + LIBSUFFIX="\${DBGX}.lib" + DLLSUFFIX="\${DBGX}.dll" + EXESUFFIX="\${DBGX}.exe" + LIBRARIES="\${SHARED_LIBRARIES}" + fi + + EXTRA_CFLAGS="-YX" + CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" +# CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}" + CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" + CFLAGS_WARNING="-W3" + LDFLAGS_DEBUG="-debug:full -debugtype:cv" + LDFLAGS_OPTIMIZE="-release" + PATHTYPE=-w + + # Specify the CC output file names based on the target name + CC_OBJNAME="-Fo\[$]@" + CC_EXENAME="-Fe\[$]@" + + # Specify linker flags depending on the type of app being + # built -- Console vs. Window. + LDFLAGS_CONSOLE="-subsystem:console" + LDFLAGS_WINDOW="-subsystem:windows" + fi +]) + +#------------------------------------------------------------------------ +# SC_WITH_TCL -- +# +# Location of the Tcl build directory. +# +# Arguments: +# none +# +# Results: +# +# Adds the following arguments to configure: +# --with-tcl=... +# +# Defines the following vars: +# TCL_BIN_DIR Full path to the tcl build dir. +#------------------------------------------------------------------------ + +AC_DEFUN(SC_WITH_TCL, [ + if test -d ../../tcl8.1$1/win; then + TCL_BIN_DEFAULT=../../tcl8.1$1/win + else + TCL_BIN_DEFAULT=../../tcl8.1/win + fi + + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR], + TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) + if test ! -d $TCL_BIN_DIR; then + AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) + fi + if test ! -f $TCL_BIN_DIR/Makefile; then + AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) + else + echo "building against Tcl binaries in: $TCL_BIN_DIR" + fi + AC_SUBST(TCL_BIN_DIR) +]) + diff --git a/win/configure.in b/win/configure.in index 648c8da..8e49ac6 100644 --- a/win/configure.in +++ b/win/configure.in @@ -1,186 +1,137 @@ -dnl This file is an input file used by the GNU "autoconf" program to -dnl generate the file "configure", which is run during Tcl installation -dnl to configure the system for the local environment. +# This file is an input file used by the GNU "autoconf" program to +# generate the file "configure", which is run during Tk installation +# to configure the system for the local environment. +# +# RCS: @(#) $Id: configure.in,v 1.2 1999/06/16 20:11:30 surles Exp $ + AC_INIT(../generic/tk.h) -# RCS: @(#) $Id: configure.in,v 1.1 1999/06/02 19:30:23 surles Exp $ TK_VERSION=8.1 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=1 TK_PATCH_LEVEL=.2 -VERSION=${TK_VERSION} +VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION -# Check whether --enable-gcc or --disable-gcc was given. Do this before -# AC_PROG_CC and AC_CYGWIN are called so the compiler can be fully tested -# by built-in autoconf tools. +#-------------------------------------------------------------------- +# Check whether --enable-gcc or --disable-gcc was given. Do this +# before AC_PROG_CC and AC_CYGWIN are called so the compiler can +# be fully tested by built-in autoconf tools. +#-------------------------------------------------------------------- -AC_ARG_ENABLE(gcc, [ --enable-gcc build with gcc], - [tcl_ok=$enableval], [tcl_ok=test_all]) -if test "$tcl_ok" = "yes"; then - CC=gcc -fi -if test "$tcl_ok" = "no"; then - CC=cl -fi +SC_ENABLE_GCC + +#-------------------------------------------------------------------- +# Checks to see if the make progeam sets the $MAKE variable. +#-------------------------------------------------------------------- AC_PROG_MAKE_SET + +#-------------------------------------------------------------------- +# These two macros perform additinal compiler test. +#-------------------------------------------------------------------- + AC_PROG_CC AC_CYGWIN + +#-------------------------------------------------------------------- +# Determines the correct binary file extension (.o, .obj, .exe etc.) +#-------------------------------------------------------------------- + AC_OBJEXT AC_EXEEXT #-------------------------------------------------------------------- -# See if there was a command-line option for where Tcl is; if -# not, assume that its top-level directory is a sibling of ours. -# Try the patch-level-specific directory first, then the general one. -#-------------------------------------------------------------------- - -if test -d ../../tcl8.1$TK_PATCH_LEVEL/unix; then - TCL_BIN_DEFAULT=../../tcl8.1$TK_PATCH_LEVEL/unix -else - TCL_BIN_DEFAULT=../../tcl8.1/unix -fi - -AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR], - TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) -if test ! -d $TCL_BIN_DIR; then - AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) -fi -if test ! -f $TCL_BIN_DIR/Makefile; then - AC_MSG_ERROR(There is no Makefile in $TCL_BIN_DIR: perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?) -else - echo "building against Tcl binaries in: $TCL_BIN_DIR" -fi - -# Set the default compiler switches based on the --enable-symbols option - -AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols], - [tcl_ok=$enableval], [tcl_ok=no]) -if test "$tcl_ok" = "yes"; then - CFLAGS='${CFLAGS_DEBUG}' - LD_FLAGS='${LDFLAGS_DEBUG}' - TCL_DBGX=d - echo "building with debug symbols" -else - CFLAGS='${CFLAGS_OPTIMIZE}' - LD_FLAGS='${LDFLAGS_OPTIMIZE}' - TCL_DBGX="" - echo "building without debug symbols" -fi - -# Trick to replace DBGX with TCL_DBGX -DBGX='${TCL_DBGX}' -eval "TCL_LIB_FILE=${TCL_LIB_FILE}" - # Check whether --enable-threads or --disable-threads was given. +#-------------------------------------------------------------------- + +SC_ENABLE_THREADS + +#-------------------------------------------------------------------- +# The statements below define a collection of symbols related to +# building libtk as a shared library instead of a static library. +#-------------------------------------------------------------------- + +SC_ENABLE_SHARED + +#-------------------------------------------------------------------- +# The statements below define a collection of compile flags. This +# macro depends on the value of SHARED_BUILD, and should be called +# after SC_ENABLE_SHARED checks the configure switches. +#-------------------------------------------------------------------- + +SC_CONFIG_CFLAGS + +#-------------------------------------------------------------------- +# Set the default compiler switches based on the --enable-symbols +# option. This macro depends on C flags, and should be called +# after SC_CONFIG_CFLAGS macro is called. +#-------------------------------------------------------------------- + +SC_ENABLE_SYMBOLS + +TK_DBGX=${DBGX} +CFLAGS=${CFLAGS_DEFAULT} +LDFLAGS=${LDFLAGS_DEFAULT} + +#-------------------------------------------------------------------- +# Locate and source the tclConfig.sh file. +#-------------------------------------------------------------------- + +SC_PATH_TCLCONFIG($TK_PATCH_LEVEL) +SC_LOAD_TCLCONFIG + +#-------------------------------------------------------------------- +# Perform final evaluations of variables with possible substitutions. +#-------------------------------------------------------------------- + +eval "TK_SRC_DIR=`cd $srcdir; pwd`" +eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}" +eval "TK_LIB_FILE=tk$VER${LIBSUFFIX}" +eval "TK_STUB_LIB_FILE=tkstub$VER${LIBSUFFIX}" +eval "TCL_DLL_FILE=tcl$VER${DLLSUFFIX}" +eval "TCL_LIB_FILE=tcl$VER${LIBSUFFIX}" +eval "TCL_STUB_LIB_FILE=tclstub$VER${LIBSUFFIX}" + +AC_SUBST(TK_VERSION) +AC_SUBST(TK_MAJOR_VERSION) +AC_SUBST(TK_MINOR_VERSION) +AC_SUBST(TK_PATCH_LEVEL) +AC_SUBST(TK_DBGX) +AC_SUBST(TK_LIB_FILE) +AC_SUBST(TK_DLL_FILE) +AC_SUBST(TK_STUB_LIB_FILE) +AC_SUBST(TK_SRC_DIR) +AC_SUBST(TK_BIN_DIR) +AC_SUBST(TCL_VERSION) +AC_SUBST(TCL_MAJOR_VERSION) +AC_SUBST(TCL_MINOR_VERSION) +AC_SUBST(TCL_PATCH_LEVEL) +AC_SUBST(TCL_LIB_FILE) +AC_SUBST(TCL_DLL_FILE) +AC_SUBST(TCL_STUB_LIB_FILE) +AC_SUBST(TCL_SRC_DIR) +AC_SUBST(TCL_BIN_DIR) +AC_SUBST(TCL_DBGX) -AC_ARG_ENABLE(threads, [ --enable-threads build with threads], - [tcl_ok=$enableval], [tcl_ok=no]) -if test "$tcl_ok" = "yes"; then - AC_DEFINE(TCL_THREADS) - echo "building with threads enabled" -else - echo "building with threads disabled (default)" -fi - -#-------------------------------------------------------------------- -# The statements below define a collection of symbols related to -# building libtcl as a shared library instead of a static library. -#-------------------------------------------------------------------- - -AC_ARG_ENABLE(shared, - [ --enable-shared build libtcl as a shared library (on by default)], - [tcl_ok=$enableval], [tcl_ok=yes]) - -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - tcl_ok=$enableval -else - tcl_ok=yes -fi - -if test "$tcl_ok" = "yes" ; then - TCL_SHARED_BUILD=1 -else - TCL_SHARED_BUILD=0 - AC_DEFINE(STATIC_BUILD) -fi - -EXTRA_CFLAGS="" -# set various compiler flags depending on whether we are using gcc or cl -if test "${GCC}" = "yes" ; then - CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O - CFLAGS_WARNING="-Wall -Wconversion" - LDFLAGS_DEBUG=-g - LDFLAGS_OPTIMIZE=-O - PATHTYPE=-u - - # Specify the CC output file names based on the target name - CC_OBJNAME="-o \$@" - CC_EXENAME="-o \$@" -else - SHLIB_LD="link -dll -nologo" - SHLIB_LD_LIBS="user32.lib advapi32.lib" - LIBS="user32.lib advapi32.lib" - AR="lib -nologo" - MAKE_LIB="\${AR} -out:\$@" - MAKE_EXE="\${CC} -Fe\$@" - - if test "${TCL_SHARED_BUILD}" = "0" ; then - # static - echo "building static version" - runtime=-MT - MAKE_DLL="echo " - LIBSUFFIX="s\${TCL_DBGX}.lib" - LIBRARIES="\${STATIC_LIBRARIES}" - EXESUFFIX="s\${TCL_DBGX}.exe" - DLLSUFFIX="" - else - # dynamic - echo "building dynamic version" - runtime=-MD - MAKE_DLL="\${SHLIB_LD} \${SHLIB_LD_LIBS} -out:\$@" - LIBSUFFIX="\${TCL_DBGX}.lib" - DLLSUFFIX="\${TCL_DBGX}.dll" - EXESUFFIX="\${TCL_DBGX}.exe" - LIBRARIES="\${SHARED_LIBRARIES}" - fi - - EXTRA_CFLAGS="-YX -nologo" - CFLAGS_DEBUG="-Z7 -Od -WX ${runtime}d" - CFLAGS_OPTIMIZE="-O2 -Gs -GD ${runtime}" - CFLAGS_WARNING="-W3" - LDFLAGS_DEBUG="-debug" - LDFLAGS_OPTIMIZE="-release" - PATHTYPE=-w - - # Specify the CC output file names based on the target name - CC_OBJNAME="-Fo\$@" - CC_EXENAME="-Fe\$@" -fi - -eval "LD_FLAGS=${LD_FLAGS}" AC_SUBST(PATHTYPE) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(EXTRA_CFLAGS) -AC_SUBST(TCL_DBGX) -AC_SUBST(TCL_LIB_FILE) -AC_SUBST(TCL_MAJOR_VERSION) -AC_SUBST(TCL_MINOR_VERSION) -AC_SUBST(TCL_PATCH_LEVEL) -AC_SUBST(TCL_VERSION) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(CC_OBJNAME) AC_SUBST(CC_EXENAME) +AC_SUBST(LDFLAGS) +AC_SUBST(LDFLAGS_DEBUG) +AC_SUBST(LDFLAGS_OPTIMIZE) +AC_SUBST(LDFLAGS_CONSOLE) +AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) +AC_SUBST(RC) AC_SUBST(DLLSUFFIX) AC_SUBST(LIBSUFFIX) AC_SUBST(EXESUFFIX) @@ -188,4 +139,4 @@ AC_SUBST(LIBRARIES) AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_DLL) -AC_OUTPUT(Makefile) +AC_OUTPUT(Makefile tkConfig.sh) diff --git a/win/stubs.c b/win/stubs.c index c9b97f5..e827b0f 100644 --- a/win/stubs.c +++ b/win/stubs.c @@ -1,8 +1,4 @@ -#include -#include -#include -#include -#include +#include "tk.h" /* * Undocumented Xlib internal function diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h index a6bb591..3507694 100644 --- a/xlib/X11/Xlib.h +++ b/xlib/X11/Xlib.h @@ -1195,19 +1195,6 @@ _XFUNCPROTOBEGIN -extern void XDrawLine( -#if NeedFunctionPrototypes - Display* /* display */, - Drawable /* d */, - GC /* gc */, - int /* x1 */, - int /* y1 */, - int /* x2 */, - int /* y2 */ -#endif -); - - extern void XFillRectangle( #if NeedFunctionPrototypes Display* /* display */, -- cgit v0.12