1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
8 SDESC[standard]= Tool for automating interactive applications
9 HOMEPAGE= https://core.tcl.tk/expect/
13 SITES[main]= SF/expect/Expect/5.45.4
14 DISTFILE[1]= expect5.45.4.tar.gz:main
16 SPKGS[standard]= complete
22 OPTIONS_AVAILABLE= none
23 OPTIONS_STANDARD= none
25 USES= autoreconf cpe tcl:tea
27 DISTNAME= expect5.45.4
29 LICENSE= PUBDOM:primary
30 LICENSE_FILE= PUBDOM:{{WRKSRC}}/license.terms
34 FPC_EQUIVALENT= lang/expect
36 CONFIGURE_ARGS= --datadir={{PREFIX}}/share/expect
38 PLIST_SUB= PORTVERSION=5.45.4
40 VAR_OPSYS[darwin]= VAR1=1.dylib
43 ${LN} -sf expect5.45.4/libexpect5.45.4.${LIBEXT} \
44 ${STAGEDIR}${PREFIX}/lib/libexpect.${VAR1:Uso.1}
45 ${LN} -sf libexpect.${VAR1:Uso.1} ${STAGEDIR}${PREFIX}/lib/libexpect.${LIBEXT}
46 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libexpect.${LIBEXT}
47 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/expect
49 [FILE:290:descriptions/desc.primary]
50 Expect is a program that performs programmed dialogue with other
51 interactive programs. It is briefly described by its man page, expect(1).
53 It uses pseudo-tty's to control the child processes, so it is not affected
54 by programs that refuse to read from stdin or pipes. (eg: passwd(1) etc).
57 [FILE:39:descriptions/desc.tools]
58 This package contains the expect tool.
62 49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34 632363 expect5.45.4.tar.gz
65 [FILE:89:manifests/plist.primary]
67 lib/expect%%PORTVERSION%%/
68 libexpect%%PORTVERSION%%.so
72 [FILE:378:manifests/plist.tools]
109 [FILE:75:manifests/plist.dev]
118 [FILE:57:manifests/plist.man]
119 share/man/man1/expect.1.gz
120 share/man/man3/libexpect.3.gz
123 [FILE:956:patches/patch-Makefile.in]
124 --- Makefile.in.orig 2018-02-02 19:15:52 UTC
126 @@ -236,10 +236,10 @@ install-libraries: libraries $(SCRIPTS)
127 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
129 # install standalone scripts and their man pages, if requested
130 - @mkdir -p $(DESTDIR)$(prefix)/bin
131 + @mkdir -p $(DESTDIR)$(datadir)
132 -for i in $(SCRIPT_LIST) ; do \
133 if [ -f $$i ] ; then \
134 - $(INSTALL_PROGRAM) $$i $(DESTDIR)$(prefix)/bin/$$i ; \
135 + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(datadir)/$$i ; \
139 @@ -259,7 +259,7 @@ install-doc: doc
140 $(INSTALL_DATA) $(srcdir)/libexpect.man $(DESTDIR)$(mandir)/man3/libexpect.3
141 -for i in $(SCRIPT_MANPAGE_LIST) ; do \
142 if [ -f $(srcdir)/example/$$i.man ] ; then \
143 - $(INSTALL_DATA) $(srcdir)/example/$$i.man $(DESTDIR)$(mandir)/man1/$$i.1 ; \
144 + $(INSTALL_DATA) $(srcdir)/example/$$i.man $(DESTDIR)$(datadir)/$$i.1 ; \
150 [FILE:506:patches/patch-configure]
151 --- configure.orig 2018-02-04 10:43:58 UTC
153 @@ -6563,7 +6563,7 @@ fi
158 + FreeBSD-*|DragonFly-*|MidnightBSD-*)
159 # This configuration from FreeBSD Ports.
161 SHLIB_LD="${CC} -shared"
162 @@ -7150,7 +7150,7 @@ fi
166 - NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
167 + NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*|MidnightBSD-*) ;;
173 [FILE:44312:patches/patch-tclconfig_tcl.m4]
174 --- tclconfig/tcl.m4.orig 2018-02-04 13:55:43 UTC
178 # See the file "license.terms" for information on usage and redistribution
179 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
181 -# RCS: @(#) $Id: tcl.m4,v 1.6 2010/09/16 20:46:47 hobbs Exp $
185 dnl TEA extensions pass us the version of TEA they think they
186 dnl are compatible with (must be set in TEA_INIT below)
187 -dnl TEA_VERSION="3.9"
188 +dnl TEA_VERSION="3.10"
190 # Possible values for key variables defined:
192 @@ -140,6 +138,8 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
193 `ls -d /usr/contrib/lib 2>/dev/null` \
194 `ls -d /usr/lib 2>/dev/null` \
195 `ls -d /usr/lib64 2>/dev/null` \
196 + `ls -d /usr/lib/tcl8.6 2>/dev/null` \
197 + `ls -d /usr/lib/tcl8.5 2>/dev/null` \
199 if test -f "$i/tclConfig.sh" ; then
200 ac_cv_c_tclconfig="`(cd $i; pwd)`"
201 @@ -170,7 +170,7 @@ AC_DEFUN([TEA_PATH_TCLCONFIG], [
203 if test x"${ac_cv_c_tclconfig}" = x ; then
204 TCL_BIN_DIR="# no Tcl configs found"
205 - AC_MSG_ERROR([Can't find Tcl configuration definitions])
206 + AC_MSG_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh])
209 TCL_BIN_DIR="${ac_cv_c_tclconfig}"
210 @@ -323,7 +323,7 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
212 if test x"${ac_cv_c_tkconfig}" = x ; then
213 TK_BIN_DIR="# no Tk configs found"
214 - AC_MSG_ERROR([Can't find Tk configuration definitions])
215 + AC_MSG_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh])
218 TK_BIN_DIR="${ac_cv_c_tkconfig}"
219 @@ -344,11 +344,10 @@ AC_DEFUN([TEA_PATH_TKCONFIG], [
223 -# Subst the following vars:
224 +# Substitutes the following vars:
229 #------------------------------------------------------------------------
231 AC_DEFUN([TEA_LOAD_TCLCONFIG], [
232 @@ -417,25 +416,21 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
233 AC_SUBST(TCL_STUB_LIB_FLAG)
234 AC_SUBST(TCL_STUB_LIB_SPEC)
236 - case "`uname -s`" in
238 - AC_MSG_CHECKING([for cygwin variant])
239 - case ${TCL_EXTRA_CFLAGS} in
240 - *-mwin32*|*-mno-cygwin*)
241 - TEA_PLATFORM="windows"
242 - CFLAGS="$CFLAGS -mwin32"
243 - AC_MSG_RESULT([win32])
246 - TEA_PLATFORM="unix"
247 - AC_MSG_RESULT([unix])
255 + AC_MSG_CHECKING([platform])
256 + hold_cc=$CC; CC="$TCL_CC"
262 + TEA_PLATFORM="unix"
265 + TEA_PLATFORM="windows"
266 + AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo) ]
269 + AC_MSG_RESULT($TEA_PLATFORM)
271 # The BUILD_$pkg is to define the correct extern storage class
272 # handling when making this package
273 @@ -443,6 +438,7 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
274 [Building extension source?])
275 # Do this here as we have fully defined TEA_PLATFORM now
276 if test "${TEA_PLATFORM}" = "windows" ; then
278 CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
281 @@ -567,11 +563,11 @@ AC_DEFUN([TEA_LOAD_TKCONFIG], [
282 # only for running extension test cases. It should never be
283 # or generation of files (like pkgIndex.tcl) at build time.
290 -# Subst's the following values:
292 +# Substitutes the following vars:
294 #------------------------------------------------------------------------
296 @@ -580,7 +576,15 @@ AC_DEFUN([TEA_PROG_TCLSH], [
297 if test -f "${TCL_BIN_DIR}/Makefile" ; then
298 # tclConfig.sh is in Tcl build directory
299 if test "${TEA_PLATFORM}" = "windows"; then
300 + if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then
301 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
302 + elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then
303 + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}"
304 + elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then
305 + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}"
306 + elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then
307 + TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}"
310 TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
312 @@ -617,11 +621,11 @@ AC_DEFUN([TEA_PROG_TCLSH], [
313 # only for running extension test cases. It should never be
314 # or generation of files (like pkgIndex.tcl) at build time.
321 -# Subst's the following values:
323 +# Substitutes the following vars:
325 #------------------------------------------------------------------------
327 @@ -630,9 +634,17 @@ AC_DEFUN([TEA_PROG_WISH], [
328 if test -f "${TK_BIN_DIR}/Makefile" ; then
329 # tkConfig.sh is in Tk build directory
330 if test "${TEA_PLATFORM}" = "windows"; then
331 + if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}" ; then
332 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
333 + elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}s${EXEEXT}" ; then
334 + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}$s{EXEEXT}"
335 + elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}t${EXEEXT}" ; then
336 + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}t${EXEEXT}"
337 + elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}st${EXEEXT}" ; then
338 + WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}st${EXEEXT}"
341 - WISH_PROG="${TK_BIN_DIR}/wish"
342 + WISH_PROG="${TK_BIN_DIR}/wish"
345 # tkConfig.sh is in install location
346 @@ -732,7 +744,6 @@ AC_DEFUN([TEA_ENABLE_SHARED], [
351 #------------------------------------------------------------------------
353 AC_DEFUN([TEA_ENABLE_THREADS], [
354 @@ -856,12 +867,11 @@ AC_DEFUN([TEA_ENABLE_THREADS], [
356 # Defines the following vars:
357 # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true
358 -# Sets to $(CFLAGS_OPTIMIZE) if false
359 +# Sets to "$(CFLAGS_OPTIMIZE) -DNDEBUG" if false
360 # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
361 # Sets to $(LDFLAGS_OPTIMIZE) if false
362 # DBGX Formerly used as debug library extension;
365 #------------------------------------------------------------------------
367 AC_DEFUN([TEA_ENABLE_SYMBOLS], [
368 @@ -874,7 +884,7 @@ AC_DEFUN([TEA_ENABLE_SYMBOLS], [
369 [tcl_ok=$enableval], [tcl_ok=no])
371 if test "$tcl_ok" = "no"; then
372 - CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
373 + CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
374 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
377 @@ -921,7 +931,6 @@ AC_DEFUN([TEA_ENABLE_SYMBOLS], [
379 # Defines the following vars:
380 # HAVE_LANGINFO Triggers use of nl_langinfo if defined.
382 #------------------------------------------------------------------------
384 AC_DEFUN([TEA_ENABLE_LANGINFO], [
385 @@ -962,7 +971,6 @@ AC_DEFUN([TEA_ENABLE_LANGINFO], [
386 # Defines the following var:
388 # system - System/platform/version identification code.
390 #--------------------------------------------------------------------
392 AC_DEFUN([TEA_CONFIG_SYSTEM], [
393 @@ -1031,21 +1039,20 @@ AC_DEFUN([TEA_CONFIG_SYSTEM], [
394 # extensions. An empty string means we don't know how
395 # to use shared libraries on this platform.
396 # LIB_SUFFIX - Specifies everything that comes after the "libfoo"
397 -# in a static or shared library name, using the $VERSION variable
398 +# in a static or shared library name, using the $PACKAGE_VERSION variable
399 # to put the version in the right place. This is used
400 # by platforms that need non-standard library names.
401 -# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs
402 -# to have a version after the .so, and ${VERSION}.a
403 +# Examples: ${PACKAGE_VERSION}.so.1.1 on NetBSD, since it needs
404 +# to have a version after the .so, and ${PACKAGE_VERSION}.a
405 # on AIX, since a shared library needs to have
406 # a .a extension whereas shared objects for loadable
407 # extensions have a .so extension. Defaults to
408 -# ${VERSION}${SHLIB_SUFFIX}.
409 +# ${PACKAGE_VERSION}${SHLIB_SUFFIX}.
411 # Flags used when running the compiler in debug mode
413 # Flags used when running the compiler in optimize mode
414 # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit)
416 #--------------------------------------------------------------------
418 AC_DEFUN([TEA_CONFIG_CFLAGS], [
419 @@ -1087,6 +1094,7 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
420 AC_DEFINE(MODULE_SCOPE,
421 [extern __attribute__((__visibility__("hidden")))],
422 [Compiler support for module scope symbols])
423 + AC_DEFINE(HAVE_HIDDEN, [1], [Compiler support for module scope symbols])
426 # Step 0.d: Disable -rpath support?
427 @@ -1135,18 +1143,17 @@ AC_DEFUN([TEA_CONFIG_CFLAGS], [
428 ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
429 TCL_LIB_VERSIONS_OK=ok
432 AS_IF([test "$GCC" = yes], [
435 CFLAGS_WARNING="-Wall"
436 - ], [CFLAGS_WARNING=""])
437 -dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
438 -dnl AC_CHECK_TOOL(AR, ar)
439 - AC_CHECK_PROG(AR, ar, ar)
444 + AC_CHECK_TOOL(AR, ar)
446 LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
447 - AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION="1.0"])
448 + AS_IF([test "x$SHLIB_VERSION" = x],[SHLIB_VERSION=""],[SHLIB_VERSION=".$SHLIB_VERSION"])
452 @@ -1172,7 +1179,7 @@ dnl AC_CHECK_TOOL(AR, ar)
453 PATH64="${MSSDK}/Bin/Win64"
456 - if test ! -d "${PATH64}" ; then
457 + if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
458 AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
459 AC_MSG_WARN([Ensure latest Platform SDK is installed])
461 @@ -1247,13 +1254,21 @@ dnl AC_CHECK_TOOL(AR, ar)
465 + case "x`echo \${VisualStudioVersion}`" in
467 + lflags="${lflags} -nodefaultlib:libucrt.lib"
468 + TEA_ADD_LIBS([ucrt.lib])
474 if test "$do64bit" != "no" ; then
475 # All this magic is necessary for the Win64 SDK RC1 - hobbs
476 CC="\"${PATH64}/cl.exe\""
477 CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
478 RC="\"${MSSDK}/bin/rc.exe\""
479 - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
480 + lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
481 LINKBIN="\"${PATH64}/link.exe\""
482 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
483 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
484 @@ -1283,13 +1298,13 @@ dnl AC_CHECK_TOOL(AR, ar)
485 CFLAGS_DEBUG="-nologo -Zi -Od"
486 CFLAGS_OPTIMIZE="-nologo -Ox"
487 lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
488 - lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
489 + lflags="${lflags} -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
490 LINKBIN="\"${CEBINROOT}/link.exe\""
496 + lflags="${lflags} -nologo"
498 CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
499 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
501 @@ -1297,13 +1312,45 @@ dnl AC_CHECK_TOOL(AR, ar)
503 if test "$GCC" = "yes"; then
506 + AC_CHECK_TOOL(RC, windres)
508 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
509 - SHLIB_LD="$CC -shared"
510 + SHLIB_LD='${CC} -shared'
511 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
512 + PRACTCL_UNSHARED_LIB_SUFFIX='.a'
514 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
515 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
517 + AC_CACHE_CHECK(for cross-compile version of gcc,
521 + #error cross-compiler
527 + if test "$ac_cv_cross" = "yes"; then
530 + CC="x86_64-w64-mingw32-gcc"
531 + LD="x86_64-w64-mingw32-ld"
532 + AR="x86_64-w64-mingw32-ar"
533 + RANLIB="x86_64-w64-mingw32-ranlib"
534 + RC="x86_64-w64-mingw32-windres"
537 + CC="i686-w64-mingw32-gcc"
538 + LD="i686-w64-mingw32-ld"
539 + AR="i686-w64-mingw32-ar"
540 + RANLIB="i686-w64-mingw32-ranlib"
541 + RC="i686-w64-mingw32-windres"
547 SHLIB_LD="${LINKBIN} -dll ${lflags}"
548 # link -lib only works when -lib is the first arg
549 @@ -1409,8 +1456,10 @@ dnl AC_CHECK_TOOL(AR, ar)
552 SHLIB_LD='${CC} -shared'
553 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
561 @@ -1521,7 +1570,7 @@ dnl AC_CHECK_TOOL(AR, ar)
566 + Linux*|GNU*|NetBSD-Debian)
570 @@ -1554,17 +1603,6 @@ dnl AC_CHECK_TOOL(AR, ar)
571 # files in compat/*.c is being linked in.
573 AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
577 - SHLIB_CFLAGS="-fPIC"
580 - SHLIB_LD='${CC} -shared'
581 - LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
584 - AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
588 @@ -1577,35 +1615,51 @@ dnl AC_CHECK_TOOL(AR, ar)
589 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
592 - SHLIB_CFLAGS="-fPIC"
593 - SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
595 - AS_IF([test $doRpath = yes], [
596 - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
597 - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
598 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
599 - AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
600 - AC_EGREP_CPP(yes, [
604 - ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
605 - AS_IF([test $tcl_cv_ld_elf = yes], [
606 - LDFLAGS=-Wl,-export-dynamic
612 + SHARED_LIB_SUFFIX=""
618 + SHLIB_CFLAGS="-fPIC"
621 + SHLIB_CFLAGS="-fpic"
624 + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
626 + AS_IF([test $doRpath = yes], [
627 + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
628 + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
629 + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
630 + LDFLAGS="-Wl,-export-dynamic"
635 + CFLAGS_OPTIMIZE="-O1"
638 + CFLAGS_OPTIMIZE="-O2"
641 AS_IF([test "${TCL_THREADS}" = "1"], [
642 - # OpenBSD builds and links with -pthread, never -lpthread.
643 + # On OpenBSD: Compile with -pthread
644 + # Don't link with -lpthread
645 LIBS=`echo $LIBS | sed s/-lpthread//`
646 CFLAGS="$CFLAGS -pthread"
647 - SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
649 # OpenBSD doesn't do version numbers with dots.
650 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
651 TCL_LIB_VERSIONS_OK=nodots
653 - NetBSD-*|FreeBSD-[[3-4]].*)
654 - # FreeBSD 3.* and greater have ELF.
655 - # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
657 + # NetBSD has ELF and can use 'cc -shared' to build shared libs
659 SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
661 @@ -1619,35 +1673,31 @@ dnl AC_CHECK_TOOL(AR, ar)
662 CFLAGS="$CFLAGS -pthread"
663 LDFLAGS="$LDFLAGS -pthread"
667 - # FreeBSD-3 doesn't handle version numbers with dots.
668 - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
669 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
670 - TCL_LIB_VERSIONS_OK=nodots
675 + DragonFly-*|FreeBSD-*|MidnightBSD-*)
676 # This configuration from FreeBSD Ports.
678 SHLIB_LD="${CC} -shared"
679 - TCL_SHLIB_LD_EXTRAS="-soname \$[@]"
680 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$[@]"
683 AS_IF([test $doRpath = yes], [
684 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
685 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
686 + LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
687 AS_IF([test "${TCL_THREADS}" = "1"], [
688 # The -pthread needs to go in the LDFLAGS, not LIBS
689 LIBS=`echo $LIBS | sed s/-pthread//`
690 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
691 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
692 - # Version numbers are dot-stripped by system policy.
693 - TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
694 - UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
695 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
696 - TCL_LIB_VERSIONS_OK=nodots
699 + # Version numbers are dot-stripped by system policy.
700 + TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
701 + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
702 + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
703 + TCL_LIB_VERSIONS_OK=nodots
708 CFLAGS_OPTIMIZE="-Os"
709 @@ -1706,7 +1756,7 @@ dnl AC_CHECK_TOOL(AR, ar)
710 AS_IF([test $tcl_cv_ld_single_module = yes], [
711 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
713 - # TEA specific: link shlib with current and compatiblity version flags
714 + # TEA specific: link shlib with current and compatibility version flags
715 vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
716 SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
717 SHLIB_SUFFIX=".dylib"
718 @@ -1818,8 +1868,8 @@ dnl AC_CHECK_TOOL(AR, ar)
719 SHLIB_CFLAGS="-fPIC -melf"
720 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
722 - SHLIB_CFLAGS="-Kpic -belf"
723 - LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
724 + SHLIB_CFLAGS="-Kpic -belf"
725 + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
729 @@ -1942,6 +1992,24 @@ dnl AC_CHECK_TOOL(AR, ar)
730 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
733 + UNIX_SV* | UnixWare-5*)
734 + SHLIB_CFLAGS="-KPIC"
735 + SHLIB_LD='${CC} -G'
738 + # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
739 + # that don't grok the -Bexport option. Test that it does.
740 + AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
741 + hold_ldflags=$LDFLAGS
742 + LDFLAGS="$LDFLAGS -Wl,-Bexport"
743 + AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
744 + LDFLAGS=$hold_ldflags])
745 + AS_IF([test $tcl_cv_ld_Bexport = yes], [
746 + LDFLAGS="$LDFLAGS -Wl,-Bexport"
753 AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
754 @@ -1966,7 +2034,7 @@ dnl # preprocessing tests use only CPPFL
759 + CYGWIN_*|MINGW32_*) ;;
761 NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
763 @@ -1978,15 +2046,111 @@ dnl # preprocessing tests use only CPPFL
764 AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [
765 AC_DEFINE(MODULE_SCOPE, [extern],
766 [No Compiler support for module scope symbols])
767 - AC_DEFINE(NO_VIZ, [], [No visibility hidden passed to zlib?])
770 AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [
771 - # TEA specific: use PACKAGE_VERSION instead of VERSION
772 - SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'])
773 + # TEA specific: use PACKAGE_VERSION instead of VERSION
774 + SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
776 AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
777 - # TEA specific: use PACKAGE_VERSION instead of VERSION
778 - UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'])
779 + # TEA specific: use PACKAGE_VERSION instead of VERSION
780 + UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
783 + if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
784 + AC_CACHE_CHECK(for SEH support in compiler,
787 +#define WIN32_LEAN_AND_MEAN
788 +#include <windows.h>
789 +#undef WIN32_LEAN_AND_MEAN
791 + int main(int argc, char** argv) {
796 + __except (EXCEPTION_EXECUTE_HANDLER) {
806 + if test "$tcl_cv_seh" = "no" ; then
807 + AC_DEFINE(HAVE_NO_SEH, 1,
808 + [Defined when mingw does not support SEH])
812 + # Check to see if the excpt.h include file provided contains the
813 + # definition for EXCEPTION_DISPOSITION; if not, which is the case
814 + # with Cygwin's version as of 2002-04-10, define it to be int,
815 + # sufficient for getting the current code to work.
817 + AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
818 + tcl_cv_eh_disposition,
820 +# define WIN32_LEAN_AND_MEAN
821 +# include <windows.h>
822 +# undef WIN32_LEAN_AND_MEAN
824 + EXCEPTION_DISPOSITION x;
826 + tcl_cv_eh_disposition=yes,
827 + tcl_cv_eh_disposition=no)
829 + if test "$tcl_cv_eh_disposition" = "no" ; then
830 + AC_DEFINE(EXCEPTION_DISPOSITION, int,
831 + [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
834 + # Check to see if winnt.h defines CHAR, SHORT, and LONG
835 + # even if VOID has already been #defined. The win32api
836 + # used by mingw and cygwin is known to do this.
838 + AC_CACHE_CHECK(for winnt.h that ignores VOID define,
839 + tcl_cv_winnt_ignore_void,
842 +#define WIN32_LEAN_AND_MEAN
843 +#include <windows.h>
844 +#undef WIN32_LEAN_AND_MEAN
850 + tcl_cv_winnt_ignore_void=yes,
851 + tcl_cv_winnt_ignore_void=no)
853 + if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
854 + AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
855 + [Defined when cygwin/mingw ignores VOID define in winnt.h])
859 + # See if the compiler supports casting to a union type.
860 + # This is used to stop gcc from printing a compiler
861 + # warning when initializing a union member.
863 + AC_CACHE_CHECK(for cast to union support,
864 + tcl_cv_cast_to_union,
867 + union foo { int i; double d; };
868 + union foo f = (union foo) (int) 0;
870 + tcl_cv_cast_to_union=yes,
871 + tcl_cv_cast_to_union=no)
873 + if test "$tcl_cv_cast_to_union" = "yes"; then
874 + AC_DEFINE(HAVE_CAST_TO_UNION, 1,
875 + [Defined when compiler supports casting to union type.])
878 AC_SUBST(CFLAGS_DEBUG)
879 AC_SUBST(CFLAGS_OPTIMIZE)
880 @@ -1994,6 +2158,7 @@ dnl # preprocessing tests use only CPPFL
884 + AC_SUBST(SHLIB_SUFFIX)
886 AC_SUBST(SHLIB_LD_LIBS)
887 AC_SUBST(SHLIB_CFLAGS)
888 @@ -2025,7 +2190,6 @@ dnl # preprocessing tests use only CPPFL
893 #--------------------------------------------------------------------
895 AC_DEFUN([TEA_SERIAL_PORT], [
896 @@ -2237,7 +2401,6 @@ closedir(d);
899 # PKG_LIBS (appends to)
901 #--------------------------------------------------------------------
903 AC_DEFUN([TEA_PATH_X], [
904 @@ -2251,9 +2414,9 @@ AC_DEFUN([TEA_PATH_UNIX_X], [
906 if test "$no_x" = ""; then
907 if test "$x_includes" = ""; then
908 - AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
909 + AC_TRY_CPP([#include <X11/Xlib.h>], , not_really_there="yes")
911 - if test ! -r $x_includes/X11/Intrinsic.h; then
912 + if test ! -r $x_includes/X11/Xlib.h; then
913 not_really_there="yes"
916 @@ -2261,11 +2424,11 @@ AC_DEFUN([TEA_PATH_UNIX_X], [
917 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
918 AC_MSG_CHECKING([for X11 header files])
920 - AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
921 + AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
922 if test "$found_xincludes" = "no"; then
923 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
925 - if test -r $i/X11/Intrinsic.h; then
926 + if test -r $i/X11/Xlib.h; then
929 found_xincludes="yes"
930 @@ -2333,7 +2496,6 @@ AC_DEFUN([TEA_PATH_UNIX_X], [
935 #--------------------------------------------------------------------
937 AC_DEFUN([TEA_BLOCKING_STYLE], [
938 @@ -2368,7 +2530,6 @@ AC_DEFUN([TEA_BLOCKING_STYLE], [
943 #--------------------------------------------------------------------
945 AC_DEFUN([TEA_TIME_HANDLER], [
946 @@ -2437,7 +2598,6 @@ AC_DEFUN([TEA_TIME_HANDLER], [
948 # Might defines some of the following vars:
949 # strtod (=fixstrtod)
951 #--------------------------------------------------------------------
953 AC_DEFUN([TEA_BUGGY_STRTOD], [
954 @@ -2488,7 +2648,7 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [
958 -# Subst's the following var:
959 +# Substitutes the following vars:
963 @@ -2497,7 +2657,6 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [
965 # Might define the following vars:
968 #--------------------------------------------------------------------
970 AC_DEFUN([TEA_TCL_LINK_LIBS], [
971 @@ -2575,7 +2734,6 @@ AC_DEFUN([TEA_TCL_LINK_LIBS], [
973 # _LARGEFILE64_SOURCE
974 # _LARGEFILE_SOURCE64
976 #--------------------------------------------------------------------
978 AC_DEFUN([TEA_TCL_EARLY_FLAG],[
979 @@ -2623,7 +2781,6 @@ AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
980 # HAVE_STRUCT_DIRENT64
984 #--------------------------------------------------------------------
986 AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
987 @@ -2655,7 +2812,7 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
988 # Now check for auxiliary declarations
989 AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
990 AC_TRY_COMPILE([#include <sys/types.h>
991 -#include <sys/dirent.h>],[struct dirent64 p;],
992 +#include <dirent.h>],[struct dirent64 p;],
993 tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
994 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
995 AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
996 @@ -2725,12 +2882,12 @@ AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
997 AC_DEFUN([TEA_INIT], [
998 # TEA extensions pass this us the version of TEA they think they
999 # are compatible with.
1001 + TEA_VERSION="3.10"
1003 AC_MSG_CHECKING([for correct TEA configuration])
1004 if test x"${PACKAGE_NAME}" = x ; then
1006 -The PACKAGE_NAME variable must be defined by your TEA configure.in])
1007 +The PACKAGE_NAME variable must be defined by your TEA configure.ac])
1009 if test x"$1" = x ; then
1011 @@ -2740,21 +2897,36 @@ TEA version not specified.])
1013 AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
1016 + # If the user did not set CFLAGS, set it now to keep macros
1017 + # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
1018 + if test "${CFLAGS+set}" != "set" ; then
1022 case "`uname -s`" in
1023 *win32*|*WIN32*|*MINGW32_*)
1024 - AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
1025 + AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
1027 TEA_PLATFORM="windows"
1032 - # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1033 + # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
1038 - TEA_PLATFORM="unix"
1039 + # Maybe we are cross-compiling....
1040 + case ${host_alias} in
1043 + TEA_PLATFORM="windows"
1047 + TEA_PLATFORM="unix"
1053 @@ -3061,7 +3233,7 @@ AC_DEFUN([TEA_PREFIX], [
1054 # TEA_SETUP_COMPILER_CC --
1056 # Do compiler checks the way we want. This is just a replacement
1057 -# for AC_PROG_CC in TEA configure.in files to make them cleaner.
1058 +# for AC_PROG_CC in TEA configure.ac files to make them cleaner.
1062 @@ -3074,16 +3246,22 @@ AC_DEFUN([TEA_SETUP_COMPILER_CC], [
1063 # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
1064 # in this macro, they need to go into TEA_SETUP_COMPILER instead.
1066 - # If the user did not set CFLAGS, set it now to keep
1067 - # the AC_PROG_CC macro from adding "-g -O2".
1068 - if test "${CFLAGS+set}" != "set" ; then
1076 + INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
1077 + INSTALL_DATA_DIR='${INSTALL} -d -m 755'
1078 + INSTALL_DATA='${INSTALL} -m 644'
1079 + INSTALL_PROGRAM='${INSTALL}'
1080 + INSTALL_SCRIPT='${INSTALL}'
1081 + INSTALL_LIBRARY='${INSTALL_DATA}'
1084 + AC_SUBST(INSTALL_DATA_DIR)
1085 + AC_SUBST(INSTALL_DATA)
1086 + AC_SUBST(INSTALL_PROGRAM)
1087 + AC_SUBST(INSTALL_SCRIPT)
1088 + AC_SUBST(INSTALL_LIBRARY)
1090 #--------------------------------------------------------------------
1091 # Checks to see if the make program sets the $MAKE variable.
1092 @@ -3095,7 +3273,7 @@ AC_DEFUN([TEA_SETUP_COMPILER_CC], [
1094 #--------------------------------------------------------------------
1097 + AC_CHECK_TOOL(RANLIB, ranlib)
1099 #--------------------------------------------------------------------
1100 # Determines the correct binary file extension (.o, .obj, .exe etc.)
1101 @@ -3176,92 +3354,128 @@ AC_DEFUN([TEA_SETUP_COMPILER], [
1102 # MAKE_STUB_LIB Makefile rule for building a stub library
1103 # VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
1104 # VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
1106 +# PRACTCL_TOOLSET What toolset is in use (gcc or msvc)
1107 +# PRACTCL_SHARED_LIB Template rule for building a shared library
1108 +# PRACTCL_STATIC_LIB Template rule for building a static library
1109 +# PRACTCL_STUB_LIB Template rule for building a stub library
1110 +# PRACTCL_VC_MANIFEST_EMBED_DLL Template rule for embedded VC manifest in DLL
1111 +# PRACTCL_VC_MANIFEST_EMBED_EXE Template rule for embedded VC manifest in EXE
1112 +# PRACTCL_NAME_LIBRARY Template rule for naming libraries
1114 #------------------------------------------------------------------------
1116 AC_DEFUN([TEA_MAKE_LIB], [
1117 - if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
1118 - MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
1119 - MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
1120 - AC_EGREP_CPP([manifest needed], [
1121 + PRACTCL_TOOLSET="gcc"
1122 + PRACTCL_VC_MANIFEST_EMBED_DLL=:
1123 + PRACTCL_VC_MANIFEST_EMBED_EXE=:
1124 + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
1125 + PRACTCL_TOOLSET="msvc"
1126 + PRACTCL_STATIC_LIB="%STLIB_LD% -out:%OUTFILE% %LIBRARY_OBJECTS%"
1127 + PRACTCL_SHARED_LIB="%SHLIB_LD% %SHLIB_LD_LIBS% %LDFLAGS_DEFAULT% -out:%OUTFILE% %LIBRARY_OBJECTS%"
1128 + MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
1129 + MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
1130 + AC_EGREP_CPP([manifest needed], [
1131 #if defined(_MSC_VER) && _MSC_VER >= 1400
1132 print("manifest needed")
1135 - # Could do a CHECK_PROG for mt, but should always be with MSVC8+
1136 - VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
1137 - VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
1138 - MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
1139 - TEA_ADD_CLEANFILES([*.manifest])
1141 - MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
1143 - MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
1144 - MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
1145 - MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
1148 - if test "${SHARED_BUILD}" = "1" ; then
1149 - MAKE_LIB="${MAKE_SHARED_LIB} "
1151 - MAKE_LIB="${MAKE_STATIC_LIB} "
1154 - #--------------------------------------------------------------------
1155 - # Shared libraries and static libraries have different names.
1156 - # Use the double eval to make sure any variables in the suffix is
1157 - # substituted. (@@@ Might not be necessary anymore)
1158 - #--------------------------------------------------------------------
1160 - if test "${TEA_PLATFORM}" = "windows" ; then
1161 - if test "${SHARED_BUILD}" = "1" ; then
1163 + # Could do a CHECK_PROG for mt, but should always be with MSVC8+
1164 + PRACTCL_VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest %OUTFILE%.manifest -outputresource:%OUTFILE%\;2"
1165 + PRACTCL_VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest %OUTFILE%.manifest -outputresource:%OUTFILE%\;1"
1166 + VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi"
1167 + VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi"
1168 + MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
1169 + TEA_ADD_CLEANFILES([*.manifest])
1171 + PRACTCL_STUB_LIB="%STLIB_LD% -nodefaultlib -out:%OUTFILE% %LIBRARY_OBJECTS%"
1172 + MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\[$]@ \$(PKG_STUB_OBJECTS)"
1174 + MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
1175 + MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
1176 + MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
1178 + PRACTCL_STATIC_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%"
1179 + PRACTCL_SHARED_LIB="%SHLIB_LD% -o %OUTFILE% %LIBRARY_OBJECTS% %SHLIB_LD_LIBS%"
1180 + PRACTCL_STUB_LIB="%STLIB_LD% %OUTFILE% %LIBRARY_OBJECTS%"
1183 + if test "${SHARED_BUILD}" = "1" ; then
1184 + MAKE_LIB="${MAKE_SHARED_LIB} "
1186 + MAKE_LIB="${MAKE_STATIC_LIB} "
1189 + #--------------------------------------------------------------------
1190 + # Shared libraries and static libraries have different names.
1191 + # Use the double eval to make sure any variables in the suffix is
1192 + # substituted. (@@@ Might not be necessary anymore)
1193 + #--------------------------------------------------------------------
1194 + if test "${TEA_PLATFORM}" = "windows" ; then
1195 + PRACTCL_NAME_LIBRARY="%LIBRARY_PREFIX%%LIBRARY_NAME%%LIBRARY_VERSION_NODOTS%"
1196 + if test "${SHARED_BUILD}" = "1" ; then
1197 # We force the unresolved linking of symbols that are really in
1198 # the private libraries of Tcl and Tk.
1199 - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
1200 if test x"${TK_BIN_DIR}" != x ; then
1201 - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
1202 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
1204 - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
1206 - eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
1208 - # Some packages build their own stubs libraries
1209 - eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
1210 - if test "$GCC" = "yes"; then
1211 - PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
1213 - # These aren't needed on Windows (either MSVC or gcc)
1217 - RANLIB_STUB="${RANLIB}"
1218 - if test "${SHARED_BUILD}" = "1" ; then
1219 - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
1220 - if test x"${TK_BIN_DIR}" != x ; then
1221 - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
1222 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
1223 + if test "$GCC" = "yes"; then
1224 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
1226 - eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
1229 - eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
1231 - # Some packages build their own stubs libraries
1232 - eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
1233 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
1235 + eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
1236 + if test "$GCC" = "yes"; then
1237 + PKG_LIB_FILE=lib${PKG_LIB_FILE}
1240 + # Some packages build their own stubs libraries
1241 + eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
1242 + if test "$GCC" = "yes"; then
1243 + PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
1245 + # These aren't needed on Windows (either MSVC or gcc)
1249 + PRACTCL_NAME_LIBRARY="lib%LIBRARY_PREFIX%%LIBRARY_NAME%%LIBRARY_VERSION%"
1250 + RANLIB_STUB="${RANLIB}"
1251 + if test "${SHARED_BUILD}" = "1" ; then
1252 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
1253 + if test x"${TK_BIN_DIR}" != x ; then
1254 + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
1256 + eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
1259 + eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
1262 - # These are escaped so that only CFLAGS is picked up at configure time.
1263 - # The other values will be substituted at make time.
1264 - CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
1265 - if test "${SHARED_BUILD}" = "1" ; then
1266 - CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
1269 - AC_SUBST(MAKE_LIB)
1270 - AC_SUBST(MAKE_SHARED_LIB)
1271 - AC_SUBST(MAKE_STATIC_LIB)
1272 - AC_SUBST(MAKE_STUB_LIB)
1273 - AC_SUBST(RANLIB_STUB)
1274 - AC_SUBST(VC_MANIFEST_EMBED_DLL)
1275 - AC_SUBST(VC_MANIFEST_EMBED_EXE)
1276 + # Some packages build their own stubs libraries
1277 + eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
1280 + # These are escaped so that only CFLAGS is picked up at configure time.
1281 + # The other values will be substituted at make time.
1282 + CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
1283 + if test "${SHARED_BUILD}" = "1" ; then
1284 + CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
1287 + AC_SUBST(MAKE_LIB)
1288 + AC_SUBST(MAKE_SHARED_LIB)
1289 + AC_SUBST(MAKE_STATIC_LIB)
1290 + AC_SUBST(MAKE_STUB_LIB)
1291 + AC_SUBST(RANLIB_STUB)
1292 + AC_SUBST(VC_MANIFEST_EMBED_DLL)
1293 + AC_SUBST(VC_MANIFEST_EMBED_EXE)
1294 + AC_SUBST(PRACTCL_TOOLSET)
1295 + AC_SUBST(PRACTCL_SHARED_LIB)
1296 + AC_SUBST(PRACTCL_STATIC_LIB)
1297 + AC_SUBST(PRACTCL_STUB_LIB)
1298 + AC_SUBST(PRACTCL_VC_MANIFEST_EMBED_DLL)
1299 + AC_SUBST(PRACTCL_VC_MANIFEST_EMBED_EXE)
1300 + AC_SUBST(PRACTCL_NAME_LIBRARY)
1303 #------------------------------------------------------------------------
1304 @@ -3350,7 +3564,7 @@ AC_DEFUN([TEA_LIB_SPEC], [
1308 -# Substs the following vars:
1309 +# Substitutes the following vars:
1310 # TCL_TOP_DIR_NATIVE
1312 #------------------------------------------------------------------------
1313 @@ -3389,12 +3603,9 @@ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
1314 # the framework's Headers and PrivateHeaders directories
1317 - if test -d "${TCL_BIN_DIR}/Headers"; then
1318 - if test -d "${TCL_BIN_DIR}/PrivateHeaders"; then
1319 - TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
1320 - elif test -d "${TCL_BIN_DIR}/Headers/tcl-private"; then
1321 - TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/Headers/tcl-private\" ${TCL_INCLUDES}"
1323 + if test -d "${TCL_BIN_DIR}/Headers" -a \
1324 + -d "${TCL_BIN_DIR}/PrivateHeaders"; then
1325 + TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
1327 TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
1329 @@ -3431,7 +3642,7 @@ AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
1330 # Adds a --with-tclinclude switch to configure.
1333 -# Substs the following vars:
1334 +# Substitutes the following vars:
1336 #------------------------------------------------------------------------
1338 @@ -3521,7 +3732,7 @@ AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
1342 -# Substs the following vars:
1343 +# Substitutes the following vars:
1345 #------------------------------------------------------------------------
1347 @@ -3610,7 +3821,7 @@ AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
1348 # Adds a --with-tkinclude switch to configure.
1351 -# Substs the following vars:
1352 +# Substitutes the following vars:
1354 #------------------------------------------------------------------------
1356 @@ -3828,11 +4039,10 @@ AC_DEFUN([TEA_PATH_CONFIG], [
1360 -# Subst the following vars:
1361 +# Substitutes the following vars:
1366 #------------------------------------------------------------------------
1368 AC_DEFUN([TEA_LOAD_CONFIG], [
1369 @@ -3893,7 +4103,6 @@ AC_DEFUN([TEA_LOAD_CONFIG], [
1372 # Adds to LIBS the appropriate extension library
1374 #------------------------------------------------------------------------
1375 AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
1376 AC_MSG_CHECKING([For $1 library for LIBS])
1377 @@ -3925,8 +4134,7 @@ AC_DEFUN([TEA_LOAD_CONFIG_LIB], [
1381 -# Subst the following vars:
1383 +# Substitutes the following vars:
1384 #------------------------------------------------------------------------
1386 AC_DEFUN([TEA_EXPORT_CONFIG], [
1387 @@ -3943,12 +4151,12 @@ AC_DEFUN([TEA_EXPORT_CONFIG], [
1388 eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
1389 eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
1391 - $1_BUILD_LIB_SPEC="-L`pwd` ${$1_LIB_FLAG}"
1392 - $1_LIB_SPEC="-L${pkglibdir} ${$1_LIB_FLAG}"
1393 - $1_BUILD_STUB_LIB_SPEC="-L`pwd` [$]{$1_STUB_LIB_FLAG}"
1394 - $1_STUB_LIB_SPEC="-L${pkglibdir} [$]{$1_STUB_LIB_FLAG}"
1395 - $1_BUILD_STUB_LIB_PATH="`pwd`/[$]{PKG_STUB_LIB_FILE}"
1396 - $1_STUB_LIB_PATH="${pkglibdir}/[$]{PKG_STUB_LIB_FILE}"
1397 + $1_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${$1_LIB_FLAG}"
1398 + $1_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${$1_LIB_FLAG}"
1399 + $1_BUILD_STUB_LIB_SPEC="-L`$CYGPATH $(pwd)` [$]{$1_STUB_LIB_FLAG}"
1400 + $1_STUB_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` [$]{$1_STUB_LIB_FLAG}"
1401 + $1_BUILD_STUB_LIB_PATH="`$CYGPATH $(pwd)`/[$]{PKG_STUB_LIB_FILE}"
1402 + $1_STUB_LIB_PATH="`$CYGPATH ${pkglibdir}`/[$]{PKG_STUB_LIB_FILE}"
1404 AC_SUBST($1_BUILD_LIB_SPEC)
1405 AC_SUBST($1_LIB_SPEC)
1406 @@ -4029,8 +4237,6 @@ AC_DEFUN([TEA_PATH_CELIB], [