Index: Makefile.in =================================================================== RCS file: /cvsroot/memchan/memchan/Makefile.in,v retrieving revision 1.20 diff -u -p -u -p -r1.20 Makefile.in --- Makefile.in 10 Nov 2004 09:09:04 -0000 1.20 +++ Makefile.in 22 Nov 2004 16:46:39 -0000 @@ -80,7 +80,7 @@ Memchanstub_OBJECTS= bufStubLib.$(OBJEXT Memchanstub_LIB_FILE= @Memchanstub_LIB_FILE@ CHANTEST_OBJECTS=chantest.$(OBJEXT) -CHANTEST_LIB_FILE=libChantest0.1.so +CHANTEST_LIB_FILE=libChantest0.1$(SHLIB_SUFFIX) DOC_NROFF = $(DOC_SOURCES:.man=.n) DOC_HTML = $(DOC_SOURCES:.man=.html) @@ -162,7 +162,9 @@ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ OBJEXT = @OBJEXT@ +SHLIB_SUFFIX = @SHLIB_SUFFIX@ RANLIB = @RANLIB@ +RANLIB_STUB = @RANLIB_STUB@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ @@ -182,14 +184,16 @@ TCL_LIBS = @TCL_LIBS@ # to test against an uninstalled Tcl. Add special env vars that you # require for testing here (like TCLX_LIBRARY). #======================================================================== +TCLLIBPATH = $(top_builddir) EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \ + DYLD_LIBRARY_PATH="$(EXTRA_PATH):$(DYLD_LIBRARY_PATH)" \ LIBPATH="$(EXTRA_PATH):${LIBPATH}" \ SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \ PATH="$(EXTRA_PATH):$(PATH)" \ - TCLLIBPATH="$(top_builddir)" + TCLLIBPATH="$(TCLLIBPATH)" TCLSH_PROG = @TCLSH_PROG@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ @@ -322,7 +326,7 @@ $($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJ $($(PACKAGE)stub_LIB_FILE): $($(PACKAGE)stub_OBJECTS) -rm -f $($(PACKAGE)stub_LIB_FILE) ${MAKE_STUB_LIB} - $(RANLIB) $($(PACKAGE)stub_LIB_FILE) + $(RANLIB_STUB) $($(PACKAGE)stub_LIB_FILE) $(CHANTEST_LIB_FILE): $(CHANTEST_OBJECTS) -rm -f $@ @@ -473,8 +477,14 @@ install-lib-binaries: if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ + echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ + else \ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ + fi; \ ext=`echo $$p|sed -e "s/.*\.//"`; \ if test "x$$ext" = "xdll"; then \ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ Index: configure.in =================================================================== RCS file: /cvsroot/memchan/memchan/configure.in,v retrieving revision 1.15 diff -u -p -u -p -r1.15 configure.in --- configure.in 9 Nov 2004 23:10:58 -0000 1.15 +++ configure.in 22 Nov 2004 16:46:39 -0000 @@ -123,6 +123,7 @@ else fi AC_SUBST(CLEANFILES) AC_SUBST(EXTRA_SOURCES) +AC_SUBST(SHLIB_SUFFIX) #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. Index: generic/memchanStubLib.c =================================================================== RCS file: /cvsroot/memchan/memchan/generic/memchanStubLib.c,v retrieving revision 1.1 diff -u -p -u -p -r1.1 memchanStubLib.c --- generic/memchanStubLib.c 9 Nov 2004 23:11:00 -0000 1.1 +++ generic/memchanStubLib.c 22 Nov 2004 16:46:39 -0000 @@ -23,7 +23,7 @@ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT -BufStubs *bufStubsPtr; +extern BufStubs *bufStubsPtr; MemchanStubs *memchanStubsPtr; /* Index: tclconfig/tcl.m4 =================================================================== RCS file: /cvsroot/memchan/memchan/tclconfig/tcl.m4,v retrieving revision 1.6 diff -u -p -u -p -r1.6 tcl.m4 --- tclconfig/tcl.m4 4 Jun 2004 14:55:03 -0000 1.6 +++ tclconfig/tcl.m4 22 Nov 2004 16:46:39 -0000 @@ -4,14 +4,10 @@ # a Tcl extension. # # Copyright (c) 1999-2000 Ajuba Solutions. -# Copyright (c) 2002-2003 ActiveState Corporation. +# Copyright (c) 2002 ActiveState Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -# -# RCS: @(#) $Id: tcl.m4,v 1.6 2004/06/04 14:55:03 patthoyts Exp $ - -AC_PREREQ(2.50) #------------------------------------------------------------------------ # TEA_PATH_TCLCONFIG -- @@ -33,8 +29,10 @@ AC_PREREQ(2.50) #------------------------------------------------------------------------ AC_DEFUN(TEA_PATH_TCLCONFIG, [ - dnl Make sure we are initialized - AC_REQUIRE([TEA_INIT]) + if test x"${TEA_INITED}" = x ; then + # Can't refer to exact macro name or it will be substituted + AC_MSG_ERROR([Must call TEA INIT before PATH_TCLCONFIG]) + fi # # Ok, lets find the tcl configuration # First, look for one uninstalled. @@ -499,7 +497,7 @@ AC_DEFUN(TEA_ENABLE_THREADS, [ *THREADS=1*) if test "${TCL_THREADS}" = "0"; then AC_MSG_WARN([ - Building ${PACKAGE_NAME} without threads enabled, but building against a Tcl + Building ${PACKAGE} without threads enabled, but building against a Tcl that IS thread-enabled.]) fi ;; @@ -544,8 +542,10 @@ AC_DEFUN(TEA_ENABLE_THREADS, [ #------------------------------------------------------------------------ AC_DEFUN(TEA_ENABLE_SYMBOLS, [ - dnl Make sure we are initialized - AC_REQUIRE([TEA_CONFIG_CFLAGS]) + if test x"${TEA_INITED}" = x ; then + # Can't refer to exact macro name or it will be substituted + AC_MSG_ERROR([Must call TEA INIT before ENABLE_SYMBOLS]) + fi if test "${TEA_PLATFORM}" = "windows" ; then tcl_dbgx=d @@ -556,23 +556,20 @@ AC_DEFUN(TEA_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" = "no"; then - CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}" - LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" + CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' + LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" TCL_DBGX="" AC_MSG_RESULT([no]) else - CFLAGS_DEFAULT="${CFLAGS_DEBUG}" - LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" + CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' + LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=${tcl_dbgx} TCL_DBGX=${tcl_dbgx} if test "$tcl_ok" = "yes"; then AC_MSG_RESULT([yes (standard debugging)]) fi fi - if test "${TEA_PLATFORM}" != "windows" ; then - LDFLAGS_DEFAULT="${LDFLAGS}" - fi AC_SUBST(TCL_DBGX) AC_SUBST(CFLAGS_DEFAULT) @@ -682,17 +679,15 @@ AC_DEFUN(TEA_ENABLE_LANGINFO, [ # 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 -# ${PACKAGE_VERSION} variable to put the version in -# the right place. This is used by platforms that -# need non-standard library names. -# Examples: ${PACKAGE_VERSION}.so.1.1 on NetBSD, -# since it needs to have a version after the .so, and -# ${PACKAGE_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 -# ${PACKAGE_VERSION}${SHLIB_SUFFIX}. +# 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. @@ -719,14 +714,16 @@ AC_DEFUN(TEA_ENABLE_LANGINFO, [ # STLIB_LD # SHLIB_LD # SHLIB_CFLAGS -# SHLIB_LD_FLAGS +# SHLIB_LDFLAGS # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE #-------------------------------------------------------------------- AC_DEFUN(TEA_CONFIG_CFLAGS, [ - dnl Make sure we are initialized - AC_REQUIRE([TEA_INIT]) + if test x"${TEA_INITED}" = x ; then + # Can't refer to exact macro name or it will be substituted + AC_MSG_ERROR([Must call TEA INIT before CONFIG_CFLAGS]) + fi # Step 0: Enable 64 bit support? @@ -745,14 +742,6 @@ AC_DEFUN(TEA_CONFIG_CFLAGS, [ do64bit=yes fi - # Step 0.c: Cross-compiling options for Windows/CE builds? - - if test "${TEA_PLATFORM}" = "windows" ; then - AC_MSG_CHECKING([if Windows/CE build is requested]) - AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no]) - AC_MSG_RESULT($doWince) - fi - # 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. @@ -793,8 +782,8 @@ AC_DEFUN(TEA_CONFIG_CFLAGS, [ EXTRA_CFLAGS="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" - TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`' - ECHO_VERSION='`echo ${PACKAGE_VERSION}`' + TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' + ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O @@ -810,7 +799,6 @@ dnl FIXME: Replace AC_CHECK_PROG with AC dnl AC_CHECK_TOOL(AR, ar, :) AC_CHECK_PROG(AR, ar, ar) STLIB_LD='${AR} cr' - LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" case $system in windows) # This is a 2-stage check to make sure we have the 64-bit SDK @@ -830,53 +818,6 @@ dnl AC_CHECK_TOOL(AR, ar, :) fi fi - if test "$doWince" != "no" ; then - if test "$do64bit" = "yes" ; then - AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible]) - fi - if test "$GCC" = "yes" ; then - AC_MSG_ERROR([Windows/CE and GCC builds incompatible]) - fi - TEA_PATH_CELIB - # set defaults - # Currently Tcl requires 300+ - CEVERSION=300; # could be 211 300 301 ... - TARGETCPU=ARM; # could be ARM MIPS SH3 X86 ... - PLATFORM="Pocket PC 2002" - if test "$doWince" = "yes"; then - doWince="300,ARM,ARM,Pocket PC 2002" - fi - eval `echo $doWince | awk -F "," '{ \ - if (length([$]1)) { printf "CEVERSION=%s\n", [$]1 }; \ - if (length([$]2)) { printf "TARGETCPU=%s\n", toupper([$]2) }; \ - if (length([$]3)) { printf "ARCH=%s\n", toupper([$]3) }; \ - if (length([$]4)) { printf "PLATFORM=%s\n", [$]4 }; \ - }'` - OSVERSION=WCE$CEVERSION; - if test "x${ARCH}" = "x" ; then - ARCH=$TARGETCPU; # could be ARM MIPS SH3 X86 X86EM ... - fi - if test "x${WCEROOT}" = "x" ; then - WCEROOT="C:/Program Files/Microsoft eMbedded Tools" - fi - if test "x${SDKROOT}" = "x" ; then - SDKROOT="C:/Windows CE Tools" - fi - # In order to work in the tortured autoconf environment, - # we need to ensure that this path has no spaces - WCEROOT=`cygpath -w -s "$WCEROOT" | sed -e 's!\\\!/!g'` - SDKROOT=`cygpath -w -s "$SDKROOT" | sed -e 's!\\\!/!g'` - CELIB_DIR=`cygpath -w -s "$CELIB_DIR" | sed -e 's!\\\!/!g'` - if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \ - -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then - AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]]) - doWince="no" - else - CEINCLUDE=`cygpath -w -s "${SDKROOT}/${OSVERSION}/${PLATFORM}/include" | sed -e 's!\\\!/!g'` - CELIBPATH=`cygpath -w -s "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" | sed -e 's!\\\!/!g'` - fi - fi - if test "$GCC" != "yes" ; then if test "${SHARED_BUILD}" = "0" ; then runtime=-MT @@ -897,26 +838,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}" CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d" CFLAGS_OPTIMIZE="-nologo -O2 -Gs -W2 ${runtime}" - elif test "$doWince" != "no" ; then - if test "${TARGETCPU}" = "X86"; then - CC="${WCEROOT}/EVC/${OSVERSION}/bin/cl.exe -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" - else - CC="${WCEROOT}/EVC/${OSVERSION}/bin/cl${TARGETCPU}.exe -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\"" - fi - RC="${WCEROOT}/Common/EVC/bin/rc.exe" - cpulower=`echo ${TARGETCPU} | awk '{print tolower([$]0)}'` - defs="${TARGETCPU} _${TARGETCPU}_ ${cpulower} _${cpulower}_ POCKET_SIZE PALM_SIZE _MT _DLL _WINDOWS" - for i in $defs ; do - AC_DEFINE_UNQUOTED($i) - done - AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION) - AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION) - CFLAGS_DEBUG="-nologo -Zi -Od" - CFLAGS_OPTIMIZE="-nologo -Ox" - lflags="-MACHINE:${TARGETCPU} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,3.00" - STLIB_LD="${WCEROOT}/EVC/${OSVERSION}/bin/lib.exe -nologo ${lflags}" - LINKBIN="${WCEROOT}/EVC/${OSVERSION}/bin/link.exe ${lflags}" - else + else RC="rc" STLIB_LD="lib -nologo" LINKBIN="link -link50compat" @@ -938,19 +860,14 @@ dnl AC_CHECK_TOOL(AR, ar, :) SHLIB_LD="${LINKBIN} -dll -nologo" UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib' EXTRA_CFLAGS="-YX" - PATHTYPE=-w # For information on what debugtype is most useful, see: # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp # This essentially turns it all on. LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2" LDFLAGS_OPTIMIZE="-release" - if test "$doWince" != "no" ; then - LDFLAGS_CONSOLE="-link ${lflags}" - LDFLAGS_WINDOW=${LDFLAGS_CONSOLE} - else - LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" - LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" - fi + LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}" + LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}" + PATHTYPE=-w fi SHLIB_LD_LIBS='${LIBS}' @@ -973,32 +890,6 @@ dnl AC_CHECK_TOOL(AR, ar, :) SHLIB_CFLAGS="" SHLIB_SUFFIX=".so" SHLIB_LD_LIBS='${LIBS}' - - DL_OBJS="tclLoadDl.o" - LDFLAGS="" - LD_LIBRARY_PATH_VAR="LIBPATH" - - # AIX v<=4.1 has some different flags than 4.2+ - if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then - #LIBOBJS="$LIBOBJS tclLoadAix.o" - AC_LIBOBJ([tclLoadAix]) - DL_LIBS="-lld" - fi - - # Check to enable 64-bit flags for compiler/linker on AIX 4+ - if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then - if test "$GCC" = "yes" ; then - AC_MSG_WARN("64bit mode not supported with GCC on $system") - else - do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" - RANLIB="${RANLIB} -X64" - AR="${AR} -X64" - SHLIB_LD_FLAGS="-b64" - fi - fi - if test "`uname -m`" = "ia64" ; then # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" @@ -1010,11 +901,19 @@ dnl AC_CHECK_TOOL(AR, ar, :) LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi else - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" DL_LIBS="-ldl" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}\$\{DBGX\}.exp' + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + fi + DL_OBJS="tclLoadDl.o" + LDFLAGS="" + + # AIX v<=4.1 has some different flags than 4.2+ + if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then + LIBOBJS="$LIBOBJS tclLoadAix.o" + DL_LIBS="-lld" fi # On AIX <=v4 systems, libbsd.a has to be linked in to support @@ -1034,6 +933,20 @@ dnl AC_CHECK_TOOL(AR, ar, :) MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ) fi + + # Check to enable 64-bit flags for compiler/linker on AIX 4+ + if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then + if test "$GCC" = "yes" ; then + AC_MSG_WARN("64bit mode not supported with GCC on $system") + else + do64bit_ok=yes + EXTRA_CFLAGS="-q64" + LDFLAGS="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LDFLAGS="-b64" + fi + fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" @@ -1080,7 +993,6 @@ dnl AC_CHECK_TOOL(AR, ar, :) LDFLAGS="-Wl,-E" LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' fi - LD_LIBRARY_PATH_VAR="SHLIB_PATH" # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #EXTRA_CFLAGS="+DAportable" @@ -1125,7 +1037,6 @@ dnl AC_CHECK_TOOL(AR, ar, :) LDFLAGS="-Wl,-E" LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' fi - LD_LIBRARY_PATH_VAR="SHLIB_PATH" ;; IRIX-4.*) SHLIB_CFLAGS="-G 0" @@ -1136,7 +1047,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) DL_LIBS="" LDFLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - SHARED_LIB_SUFFIX='${PACKAGE_VERSION}\$\{DBGX\}.a' + SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' ;; IRIX-5.*) SHLIB_CFLAGS="" @@ -1205,7 +1116,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) # when you inline the string and math operations. Turn this off to # get rid of the warnings. - #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" + CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" if test "$have_dl" = yes; then SHLIB_LD="${CC} -shared" @@ -1232,7 +1143,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) # 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"${USE_COMPAT}" != x ; then + if test x"${LIBOBJS}" != x ; then EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline" fi @@ -1280,7 +1191,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) LDFLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[[1-2]].*) + NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ # NetBSD/SPARC needs -fPIC, -fpic will not do. @@ -1320,30 +1231,6 @@ dnl AC_CHECK_TOOL(AR, ar, :) UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; - OpenBSD-*) - SHLIB_LD="${CC} -shared" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - DL_OBJS="tclLoadDl.o" - DL_LIBS="" - LDFLAGS="" - LD_SEARCH_FLAGS="" - AC_MSG_CHECKING(for ELF) - AC_EGREP_CPP(yes, [ -#ifdef __ELF__ - yes -#endif - ], - [AC_MSG_RESULT(yes) - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'], - [AC_MSG_RESULT(no) - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'] - ) - - # OpenBSD doesn't do version numbers with dots. - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' - TCL_LIB_VERSIONS_OK=nodots - ;; FreeBSD-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fPIC" @@ -1372,14 +1259,13 @@ dnl AC_CHECK_TOOL(AR, ar, :) Rhapsody-*|Darwin-*) SHLIB_CFLAGS="-fno-common" SHLIB_LD="cc -dynamiclib \${LDFLAGS}" - TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${PACKAGE_VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000" + TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr 0xa000000" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" LDFLAGS="-prebind" LD_SEARCH_FLAGS="" - LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" CFLAGS_OPTIMIZE="-O3" EXTRA_CFLAGS="-arch ppc -pipe" ;; @@ -1752,7 +1638,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*) + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Rhapsody-*|Darwin-*) ;; @@ -1772,10 +1658,10 @@ dnl AC_CHECK_TOOL(AR, ar, :) fi if test "$SHARED_LIB_SUFFIX" = "" ; then - SHARED_LIB_SUFFIX='${PACKAGE_VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' + SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then - UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}\$\{DBGX\}.a' + UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi AC_SUBST(DL_LIBS) @@ -1784,14 +1670,14 @@ dnl AC_CHECK_TOOL(AR, ar, :) AC_SUBST(CFLAGS_WARNING) AC_SUBST(EXTRA_CFLAGS) + SHLIB_LDFLAGS='$(LDFLAGS_DEFAULT)' AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_CFLAGS) - AC_SUBST(SHLIB_LD_FLAGS) + AC_SUBST(SHLIB_LDFLAGS) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) - AC_SUBST(LD_LIBRARY_PATH_VAR) ]) #-------------------------------------------------------------------- @@ -1999,10 +1885,8 @@ closedir(d); AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). - # tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and - # CHECK on limits.h - AC_HAVE_HEADERS(limits.h unistd.h sys/param.h) + AC_HAVE_HEADERS(unistd.h sys/param.h) ]) @@ -2102,7 +1986,7 @@ AC_DEFUN(TEA_PATH_UNIX_X, [ XLIBSW=-lX11 fi if test x"${XLIBSW}" != x ; then - PKG_LIBS="${PKG_LIBS} ${XLIBSW}" + LIBS="${LIBS} ${XLIBSW}" fi ]) @@ -2294,9 +2178,7 @@ AC_DEFUN(TEA_BUGGY_STRTOD, [ AC_MSG_RESULT([ok]) else AC_MSG_RESULT([buggy]) - #LIBOBJS="$LIBOBJS fixstrtod.o" - AC_LIBOBJ([fixstrtod]) - USE_COMPAT=1 + LIBOBJS="$LIBOBJS fixstrtod.o" AC_DEFINE(strtod, fixstrtod) fi fi @@ -2454,23 +2336,13 @@ AC_DEFUN(TEA_TCL_EARLY_FLAGS,[ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ AC_MSG_CHECKING([for 64-bit integer type]) AC_CACHE_VAL(tcl_cv_type_64bit,[ - tcl_cv_type_64bit=none - # See if the compiler knows natively about __int64 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], - tcl_type_64bit=__int64, tcl_type_64bit="long long") - # 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... - AC_TRY_COMPILE(,[switch (0) { - case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; - }],tcl_cv_type_64bit=${tcl_type_64bit})]) + tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none + AC_TRY_RUN([#include + int main() {exit(!(sizeof(long long) > sizeof(long)));} + ], tcl_cv_type_64bit="long long"))]) if test "${tcl_cv_type_64bit}" = none ; then - AC_DEFINE(TCL_WIDE_INT_IS_LONG) AC_MSG_RESULT([using long]) - elif test "${tcl_cv_type_64bit}" = "__int64" ; then - # We actually want to use the default tcl.h checks in this - # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* - AC_MSG_RESULT([using Tcl header defaults]) else AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}) AC_MSG_RESULT([${tcl_cv_type_64bit}]) @@ -2542,21 +2414,13 @@ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ #------------------------------------------------------------------------ AC_DEFUN(TEA_INIT, [ - TEA_VERSION="3.0" - AC_MSG_CHECKING([for correct TEA configuration]) - if test x"${PACKAGE_NAME}" = x ; then - AC_MSG_ERROR([ -The PACKAGE_NAME variable must be defined by your TEA configure.in]) - fi - if test x"$1" = x ; then + if test x"${PACKAGE}" = x ; then AC_MSG_ERROR([ -TEA version not specified.]) - elif test "$1" != "${TEA_VERSION}" ; then - AC_MSG_RESULT([warning: TEA version "$1" != ${TEA_VERSION}]) - else - AC_MSG_RESULT([ok]) +The PACKAGE variable must be defined by your TEA configure.in]) fi + AC_MSG_RESULT([ok]) + TEA_INITED=ok case "`uname -s`" in *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) @@ -2575,227 +2439,6 @@ TEA version not specified.]) AC_SUBST(EXEEXT) AC_SUBST(CYGPATH) - - # This package name must be replaced statically for AC_SUBST to work - AC_SUBST(PKG_LIB_FILE) - # Substitute STUB_LIB_FILE in case package creates a stub library too. - AC_SUBST(PKG_STUB_LIB_FILE) - - # We AC_SUBST these here to ensure they are subst'ed, - # in case the user doesn't call TEA_ADD_... - AC_SUBST(PKG_STUB_SOURCES) - AC_SUBST(PKG_STUB_OBJECTS) - AC_SUBST(PKG_TCL_SOURCES) - AC_SUBST(PKG_HEADERS) - AC_SUBST(PKG_INCLUDES) - AC_SUBST(PKG_LIBS) - AC_SUBST(PKG_CFLAGS) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_SOURCES -- -# -# Specify one or more source files. Users should check for -# the right platform before adding to their list. -# It is not important to specify the directory, as long as it is -# in the generic, win or unix subdirectory of $(srcdir). -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_SOURCES -# PKG_OBJECTS -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_SOURCES, [ - vars="$@" - for i in $vars; do - case $i in - [\$]*) - # allow $-var names - PKG_SOURCES="$PKG_SOURCES $i" - PKG_OBJECTS="$PKG_OBJECTS $i" - ;; - *) - # check for existence - allows for generic/win/unix VPATH - if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ - -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ - ; then - AC_MSG_ERROR([could not find source file '$i']) - fi - PKG_SOURCES="$PKG_SOURCES $i" - # this assumes it is in a VPATH dir - i=`basename $i` - # handle user calling this before or after TEA_SETUP_COMPILER - if test x"${OBJEXT}" != x ; then - j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" - else - j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" - fi - PKG_OBJECTS="$PKG_OBJECTS $j" - ;; - esac - done - AC_SUBST(PKG_SOURCES) - AC_SUBST(PKG_OBJECTS) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_STUB_SOURCES -- -# -# Specify one or more source files. Users should check for -# the right platform before adding to their list. -# It is not important to specify the directory, as long as it is -# in the generic, win or unix subdirectory of $(srcdir). -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_STUB_SOURCES -# PKG_STUB_OBJECTS -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_STUB_SOURCES, [ - vars="$@" - for i in $vars; do - # check for existence - allows for generic/win/unix VPATH - if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \ - -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \ - ; then - AC_MSG_ERROR([could not find stub source file '$i']) - fi - PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i" - # this assumes it is in a VPATH dir - i=`basename $i` - # handle user calling this before or after TEA_SETUP_COMPILER - if test x"${OBJEXT}" != x ; then - j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}" - else - j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}" - fi - PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j" - done - AC_SUBST(PKG_STUB_SOURCES) - AC_SUBST(PKG_STUB_OBJECTS) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_TCL_SOURCES -- -# -# Specify one or more Tcl source files. These should be platform -# independent runtime files. -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_TCL_SOURCES -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_TCL_SOURCES, [ - vars="$@" - for i in $vars; do - # check for existence, be strict because it is installed - if test ! -f "${srcdir}/$i" ; then - AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i']) - fi - PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i" - done - AC_SUBST(PKG_TCL_SOURCES) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_HEADERS -- -# -# Specify one or more source headers. Users should check for -# the right platform before adding to their list. -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_HEADERS -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_HEADERS, [ - vars="$@" - for i in $vars; do - # check for existence, be strict because it is installed - if test ! -f "${srcdir}/$i" ; then - AC_MSG_ERROR([could not find header file '${srcdir}/$i']) - fi - PKG_HEADERS="$PKG_HEADERS $i" - done - AC_SUBST(PKG_HEADERS) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_INCLUDES -- -# -# Specify one or more include dirs. Users should check for -# the right platform before adding to their list. -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_INCLUDES -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_INCLUDES, [ - vars="$@" - for i in $vars; do - PKG_INCLUDES="$PKG_INCLUDES $i" - done - AC_SUBST(PKG_INCLUDES) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_LIBS -- -# -# Specify one or more libraries. Users should check for -# the right platform before adding to their list. -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_LIBS -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_LIBS, [ - vars="$@" - for i in $vars; do - PKG_LIBS="$PKG_LIBS $i" - done - AC_SUBST(PKG_LIBS) -]) - -#------------------------------------------------------------------------ -# TEA_ADD_CFLAGS -- -# -# Specify one or more CFLAGS. Users should check for -# the right platform before adding to their list. -# -# Arguments: -# one or more file names -# -# Results: -# -# Defines and substs the following vars: -# PKG_CFLAGS -#------------------------------------------------------------------------ -AC_DEFUN(TEA_ADD_CFLAGS, [ - PKG_CFLAGS="$PKG_CFLAGS $@" - AC_SUBST(PKG_CFLAGS) ]) #------------------------------------------------------------------------ @@ -2834,7 +2477,7 @@ AC_DEFUN(TEA_PREFIX, [ ]) #------------------------------------------------------------------------ -# TEA_SETUP_COMPILER_CC -- +# TEA_PROG_CC -- # # Do compiler checks the way we want. This is just a replacement # for AC_PROG_CC in TEA configure.in files to make them cleaner. @@ -2846,10 +2489,7 @@ AC_DEFUN(TEA_PREFIX, [ # # Sets up CC var and other standard bits we need to make executables. #------------------------------------------------------------------------ -AC_DEFUN(TEA_SETUP_COMPILER_CC, [ - # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE) - # in this macro, they need to go into TEA_SETUP_COMPILER instead. - +AC_DEFUN(TEA_SETUP_COMPILER, [ # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then @@ -2857,7 +2497,19 @@ AC_DEFUN(TEA_SETUP_COMPILER_CC, [ fi AC_PROG_CC - AC_PROG_CPP + + #------------------------------------------------------------------------ + # If we're using GCC, see if the compiler understands -pipe. If so, use it. + # It makes compiling go faster. (This is only a performance feature.) + #------------------------------------------------------------------------ + + if test -z "$no_pipe" -a -n "$GCC"; then + AC_MSG_CHECKING([if the compiler understands -pipe]) + OLDCC="$CC" + CC="$CC -pipe" + AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC" + AC_MSG_RESULT([no])) + fi AC_PROG_INSTALL @@ -2879,37 +2531,6 @@ AC_DEFUN(TEA_SETUP_COMPILER_CC, [ AC_OBJEXT AC_EXEEXT -]) - -#------------------------------------------------------------------------ -# TEA_SETUP_COMPILER -- -# -# Do compiler checks that use the compiler. This must go after -# TEA_SETUP_COMPILER_CC, which does the actual compiler check. -# -# Arguments: -# none -# -# Results: -# -# Sets up CC var and other standard bits we need to make executables. -#------------------------------------------------------------------------ -AC_DEFUN(TEA_SETUP_COMPILER, [ - # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here. - AC_REQUIRE([TEA_SETUP_COMPILER_CC]) - - #------------------------------------------------------------------------ - # If we're using GCC, see if the compiler understands -pipe. If so, use it. - # It makes compiling go faster. (This is only a performance feature.) - #------------------------------------------------------------------------ - - if test -z "$no_pipe" -a -n "$GCC"; then - AC_MSG_CHECKING([if the compiler understands -pipe]) - OLDCC="$CC" - CC="$CC -pipe" - AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC" - AC_MSG_RESULT([no])) - fi #-------------------------------------------------------------------- # Common compiler flag setup @@ -2917,14 +2538,10 @@ AC_DEFUN(TEA_SETUP_COMPILER, [ TEA_TCL_EARLY_FLAGS TEA_TCL_64BIT_FLAGS - AC_C_BIGENDIAN + #TEA_C_BIGENDIAN if test "${TEA_PLATFORM}" = "unix" ; then - TEA_TCL_LINK_LIBS TEA_MISSING_POSIX_HEADERS - # Let the user call this, because if it triggers, they will - # need a compat/strtod.c that is correct. Users can also - # use Tcl_GetDouble(FromObj) instead. - #TEA_BUGGY_STRTOD + TEA_BUGGY_STRTOD fi ]) @@ -2953,13 +2570,13 @@ AC_DEFUN(TEA_SETUP_COMPILER, [ AC_DEFUN(TEA_MAKE_LIB, [ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then - MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_FLAGS} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)" - MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)" - else - MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)" - MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_FLAGS} \${SHLIB_LD_LIBS}" - MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)" + MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\[$]@ \$(\[$](PACKAGE)_OBJECTS)" + MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(\[$](PACKAGE)stub_OBJECTS)" + else + MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)_OBJECTS)" + MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(\[$](PACKAGE)_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}" + MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(\[$](PACKAGE)stub_OBJECTS)" fi if test "${SHARED_BUILD}" = "1" ; then @@ -2983,26 +2600,26 @@ AC_DEFUN(TEA_MAKE_LIB, [ if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}" RANLIB=: else - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + eval eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}" fi # Some packages build there own stubs libraries - eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + eval eval "${PACKAGE}stub_LIB_FILE=${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" else if test "${SHARED_BUILD}" = "1" ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}" if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}" fi - eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" + eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}" RANLIB=: else - eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" + eval eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}" fi # Some packages build there own stubs libraries - eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}" + eval eval "${PACKAGE}stub_LIB_FILE=lib${PACKAGE}stub${UNSHARED_LIB_SUFFIX}" fi # These are escaped so that only CFLAGS is picked up at configure time. @@ -3127,21 +2744,15 @@ AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [ TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\" TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\" TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} - - TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" else TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)' - TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic' - TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix' - TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win' - TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps' - TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools' - TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat' + TCL_GENERIC_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/generic' + TCL_UNIX_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/unix' + TCL_WIN_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/win' + TCL_BMAP_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/bitmaps' + TCL_TOOL_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/tools' + TCL_COMPAT_DIR_NATIVE='$(TCL_TOP_DIR_NATIVE)/compat' TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} - - # substitute these in "relaxed" so that TCL_INCLUDES still works - # without requiring the other vars to be defined in the Makefile - eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\"" fi AC_SUBST(TCL_TOP_DIR_NATIVE) @@ -3152,6 +2763,7 @@ AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [ AC_SUBST(TCL_TOOL_DIR_NATIVE) AC_SUBST(TCL_PLATFORM_DIR_NATIVE) + TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" AC_SUBST(TCL_INCLUDES) AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}]) ]) @@ -3179,7 +2791,7 @@ AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [ AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [ AC_MSG_CHECKING([for Tcl public headers]) - AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) + AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval}) AC_CACHE_VAL(ac_cv_c_tclh, [ # Use the value from --with-tclinclude, if it was given @@ -3259,15 +2871,13 @@ AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}" else - TK_TOP_DIR_NATIVE='${TK_SRC_DIR}' - TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic' - TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix' - TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win' + TK_TOP_DIR_NATIVE='$(TK_SRC_DIR)' + TK_GENERIC_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/generic' + TK_UNIX_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/unix' + TK_WIN_DIR_NATIVE='$(TK_TOP_DIR_NATIVE)/win' TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} - # substitute these in "relaxed" so that TK_INCLUDES still works - # without requiring the other vars to be defined in the Makefile - eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\"" + TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" fi AC_SUBST(TK_TOP_DIR_NATIVE) @@ -3353,17 +2963,6 @@ AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [ TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" AC_SUBST(TK_INCLUDES) - - if test "${TEA_PLATFORM}" = "windows" ; then - # On Windows, we need the X compat headers - AC_MSG_CHECKING([for X11 header files]) - if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then - INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`" - TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" - AC_SUBST(TK_XINCLUDES) - fi - AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}]) - fi ]) #------------------------------------------------------------------------ @@ -3385,13 +2984,7 @@ AC_DEFUN(TEA_PROG_TCLSH, [ AC_MSG_CHECKING([for tclsh]) AC_CACHE_VAL(ac_cv_path_tclsh, [ - if test "x${CELIB_DIR}" != "x" ; then - # If CELIB_DIR is defined, assume Windows/CE target is requested - # which means target tclsh cannot be run (cross-compile) - search_path=`echo ${PATH} | sed -e 's/:/ /g'` - else - search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'` - fi + search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do @@ -3434,13 +3027,7 @@ AC_DEFUN(TEA_PROG_WISH, [ AC_MSG_CHECKING([for wish]) AC_CACHE_VAL(ac_cv_path_wish, [ - if test "x${CELIB_DIR}" != "x" ; then - # If CELIB_DIR is defined, assume Windows/CE target is requested - # which means target wish cannot be run (cross-compile) - search_path=`echo ${PATH} | sed -e 's/:/ /g'` - else - search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'` - fi + search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \ `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do @@ -3612,70 +3199,3 @@ AC_DEFUN(TEA_LOAD_CONFIG, [ AC_SUBST($1_STUB_LIB_SPEC) AC_SUBST($1_STUB_LIB_PATH) ]) - -#------------------------------------------------------------------------ -# TEA_PATH_CELIB -- -# -# Locate Keuchel's celib emulation layer for targeting Win/CE -# -# Arguments: -# none -# -# Results: -# -# Adds the following arguments to configure: -# --with-celib=... -# -# Defines the following vars: -# CELIB_DIR Full path to the directory containing -# the include and platform lib files -#------------------------------------------------------------------------ - -AC_DEFUN(TEA_PATH_CELIB, [ - # First, look for one uninstalled. - # the alternative search directory is invoked by --with-celib - - if test x"${no_celib}" = x ; then - # we reset no_celib in case something fails here - no_celib=true - AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval}) - AC_MSG_CHECKING([for Windows/CE celib directory]) - AC_CACHE_VAL(ac_cv_c_celibconfig,[ - # First check to see if --with-celibconfig was specified. - if test x"${with_celibconfig}" != x ; then - if test -d "${with_celibconfig}/inc" ; then - ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)` - else - AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory]) - fi - fi - - # then check for a celib library - if test x"${ac_cv_c_celibconfig}" = x ; then - for i in \ - ../celib-palm-3.0 \ - ../celib \ - ../../celib-palm-3.0 \ - ../../celib \ - `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \ - ${srcdir}/../celib-palm-3.0 \ - ${srcdir}/../celib \ - `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \ - ; do - if test -d "$i/inc" ; then - ac_cv_c_celibconfig=`(cd $i; pwd)` - break - fi - done - fi - ]) - if test x"${ac_cv_c_celibconfig}" = x ; then - CELIB_DIR="# no Celib configs found" - AC_MSG_ERROR([Cannot find celib support library directory]) - else - no_celib= - CELIB_DIR=${ac_cv_c_celibconfig} - AC_MSG_RESULT([found $CELIB_DIR]) - fi - fi -])