Lines Matching +full:os +full:- +full:manifest +full:- +full:offset
1 # tcl.m4 --
3 # This file provides a set of autoconf macros to help TEA-enable
6 # Copyright (c) 1999-2000 Ajuba Solutions.
7 # Copyright (c) 2002-2005 ActiveState Corporation.
16 # TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
17 # TEA_PLATFORM - windows unix
18 # TEA_TK_EXTENSION - True if this is a Tk extension
21 #------------------------------------------------------------------------
22 # TEA_PATH_TCLCONFIG --
33 # --with-tcl=...
38 #------------------------------------------------------------------------
46 # the alternative search directory is invoked by --with-tcl
53 AS_HELP_STRING([--with-tcl],
59 # First check to see if --with-tcl was specified.
63 if test -f "${with_tclconfig}"; then
64 …AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConf…
68 if test -f "${with_tclconfig}/tclConfig.sh" ; then
79 `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
80 `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
81 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
83 `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
84 `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
85 `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
87 `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
88 `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
89 `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
91 -a -f "$i/win/tclConfig.sh" ; then
95 if test -f "$i/unix/tclConfig.sh" ; then
103 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
104 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
105 `ls -d /Library/Frameworks 2>/dev/null` \
106 `ls -d /Network/Library/Frameworks 2>/dev/null` \
107 …`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.…
108 …`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.…
109 …`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.…
111 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
120 -a x"${ac_cv_c_tclconfig}" = x ; then
121 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
122 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
124 if test -f "$i/tclConfig.sh" ; then
133 for i in `ls -d ${libdir} 2>/dev/null` \
134 `ls -d ${exec_prefix}/lib 2>/dev/null` \
135 `ls -d ${prefix}/lib 2>/dev/null` \
136 `ls -d /usr/local/lib 2>/dev/null` \
137 `ls -d /usr/contrib/lib 2>/dev/null` \
138 `ls -d /usr/pkg/lib 2>/dev/null` \
139 `ls -d /usr/lib 2>/dev/null` \
140 `ls -d /usr/lib64 2>/dev/null` \
141 `ls -d /usr/lib/tcl8.6 2>/dev/null` \
142 `ls -d /usr/lib/tcl8.5 2>/dev/null` \
143 `ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
144 `ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
145 `ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
146 `ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
148 if test -f "$i/tclConfig.sh" ; then
159 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
160 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
161 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
163 -a -f "$i/win/tclConfig.sh" ; then
167 if test -f "$i/unix/tclConfig.sh" ; then
177 …AC_MSG_ERROR([Can't find Tcl configuration definitions. Use --with-tcl to specify a directory cont…
186 #------------------------------------------------------------------------
187 # TEA_PATH_TKCONFIG --
197 # --with-tk=...
202 #------------------------------------------------------------------------
208 # the alternative search directory is invoked by --with-tk
215 AS_HELP_STRING([--with-tk],
221 # First check to see if --with-tkconfig was specified.
225 if test -f "${with_tkconfig}"; then
226 …AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.…
230 if test -f "${with_tkconfig}/tkConfig.sh" ; then
241 `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
242 `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \
243 `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
245 `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
246 `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \
247 `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
249 `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
250 `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
251 `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
253 -a -f "$i/win/tkConfig.sh" ; then
257 if test -f "$i/unix/tkConfig.sh" ; then
265 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
266 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
267 `ls -d /Library/Frameworks 2>/dev/null` \
268 `ls -d /Network/Library/Frameworks 2>/dev/null` \
270 if test -f "$i/Tk.framework/tkConfig.sh" ; then
279 for i in `ls -d ${libdir} 2>/dev/null` \
280 `ls -d ${exec_prefix}/lib 2>/dev/null` \
281 `ls -d ${prefix}/lib 2>/dev/null` \
282 `ls -d /usr/local/lib 2>/dev/null` \
283 `ls -d /usr/contrib/lib 2>/dev/null` \
284 `ls -d /usr/pkg/lib 2>/dev/null` \
285 `ls -d /usr/lib/tk8.6 2>/dev/null` \
286 `ls -d /usr/lib/tk8.5 2>/dev/null` \
287 `ls -d /usr/lib 2>/dev/null` \
288 `ls -d /usr/lib64 2>/dev/null` \
289 `ls -d /usr/local/lib/tk8.6 2>/dev/null` \
290 `ls -d /usr/local/lib/tk8.5 2>/dev/null` \
291 `ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
292 `ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
294 if test -f "$i/tkConfig.sh" ; then
303 -a x"${ac_cv_c_tkconfig}" = x ; then
304 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
305 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
307 if test -f "$i/tkConfig.sh" ; then
318 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
319 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
320 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
322 -a -f "$i/win/tkConfig.sh" ; then
326 if test -f "$i/unix/tkConfig.sh" ; then
336 …AC_MSG_ERROR([Can't find Tk configuration definitions. Use --with-tk to specify a directory contai…
345 #------------------------------------------------------------------------
346 # TEA_LOAD_TCLCONFIG --
363 #------------------------------------------------------------------------
368 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
381 if test -f "${TCL_BIN_DIR}/Makefile" ; then
385 elif test "`uname -s`" = "Darwin"; then
391 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
395 TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
400 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
401 TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
428 # first test we've already retrieved platform (cross-compile), fallback to unix otherwise:
429 TEA_PLATFORM="${TEA_PLATFORM-unix}"
433 AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
457 #------------------------------------------------------------------------
458 # TEA_LOAD_TKCONFIG --
471 #------------------------------------------------------------------------
476 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
489 if test -f "${TK_BIN_DIR}/Makefile" ; then
493 elif test "`uname -s`" = "Darwin"; then
499 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
503 TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
508 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
509 TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
520 AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
548 #------------------------------------------------------------------------
565 #------------------------------------------------------------------------
569 if test -f "${TCL_BIN_DIR}/Makefile" ; then
572 if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
574 … elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
576 … elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
578 … elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
591 list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
592 `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
593 `ls -d ${TCL_PREFIX}/bin 2>/dev/null`"
595 if test -f "$i/${TCLSH_PROG}" ; then
606 #------------------------------------------------------------------------
623 #------------------------------------------------------------------------
627 if test -f "${TK_BIN_DIR}/Makefile" ; then
630 if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
632 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
634 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
636 elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
649 list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
650 `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
651 `ls -d ${TK_PREFIX}/bin 2>/dev/null`"
653 if test -f "$i/${WISH_PROG}" ; then
664 #------------------------------------------------------------------------
665 # TEA_ENABLE_SHARED --
675 # --enable-shared=yes|no
676 # --enable-stubs=yes|no
685 # USE_TCL_STUBS Value true: if SHARED_BUILD or --enable-stubs
686 # USE_TCLOO_STUBS Value true: if SHARED_BUILD or --enable-stubs
687 # USE_TK_STUBS Value true: if SHARED_BUILD or --enable-stubs
689 #------------------------------------------------------------------------
693 AS_HELP_STRING([--enable-shared],
705 AS_HELP_STRING([--enable-stubs],
743 #------------------------------------------------------------------------
744 # TEA_ENABLE_THREADS --
755 # threaded or non-threaded Tcl core, but a non-threaded extension may
756 # only run in a non-threaded Tcl core.
764 # --enable-threads
773 #------------------------------------------------------------------------
777 AS_HELP_STRING([--enable-threads],
788 if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
794 # USE_THREAD_ALLOC tells us to try the special thread-based
798 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
799 if test "`uname -s`" = "SunOS" ; then
803 AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
817 THREADS_LIBS=" -lpthread"
823 THREADS_LIBS=" -lpthreads"
832 THREADS_LIBS=" -pthread"
835 AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled])
859 that IS thread-enabled. It is recommended to use --enable-threads.])
866 #------------------------------------------------------------------------
867 # TEA_ENABLE_SYMBOLS --
884 # --enable-symbols
888 # Sets to "$(CFLAGS_OPTIMIZE) -DNDEBUG" if false
891 #------------------------------------------------------------------------
898 AS_HELP_STRING([--enable-symbols],
902 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
916 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
920 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
929 #------------------------------------------------------------------------
930 # TEA_ENABLE_LANGINFO --
941 # --enable-langinfo=yes|no (default is yes)
945 #------------------------------------------------------------------------
949 AS_HELP_STRING([--enable-langinfo],
971 #--------------------------------------------------------------------
975 # on a feature-driven basis, alas). This can usually be done via the
984 # system - System/platform/version identification code.
986 #--------------------------------------------------------------------
994 tcl_cv_sys_version=`uname -s`-`uname -r`
995 if test "$?" -ne 0 ; then
999 if test "`uname -s`" = "AIX" ; then
1000 tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
1002 if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
1003 tcl_cv_sys_version=NetBSD-Debian
1011 #--------------------------------------------------------------------
1024 # DL_OBJS, DL_LIBS - removed for TEA, only needed by core.
1025 # LDFLAGS - Flags to pass to the compiler when linking object
1028 # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
1029 # that tell the run-time dynamic linker where to look
1033 # CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib",
1034 # that tell the run-time dynamic linker where to look
1037 # SHLIB_CFLAGS - Flags to pass to cc when compiling the components
1038 # of a shared library (may request position-independent
1040 # SHLIB_LD - Base command to use for combining object files
1042 # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
1053 # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable
1056 # LIB_SUFFIX - Specifies everything that comes after the "libfoo"
1059 # by platforms that need non-standard library names.
1066 # CFLAGS_DEBUG -
1068 # CFLAGS_OPTIMIZE -
1070 # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit)
1071 #--------------------------------------------------------------------
1081 AS_HELP_STRING([--enable-64bit],
1089 AC_ARG_ENABLE(64bit-vis,
1090 AS_HELP_STRING([--enable-64bit-vis],
1102 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
1115 # Step 0.d: Disable -rpath support?
1119 AS_HELP_STRING([--disable-rpath],
1135 # "windows" case and removed some core-only vars.
1138 # default to '{$LIBS}' and set to "" on per-platform necessary basis
1140 # When ld needs options to work in 64-bit mode, put them in
1146 TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
1149 CFLAGS_DEBUG=-g
1151 CFLAGS_OPTIMIZE=-O2
1152 CFLAGS_WARNING="-Wall"
1154 CFLAGS_OPTIMIZE=-O
1168 MACHINE="AMD64" ; # default to AMD64 64-bit build
1181 runtime=-MT
1183 runtime=-MD
1186 x1[[4-9]]*)
1187 lflags="${lflags} -nodefaultlib:libucrt.lib"
1197 lflags="${lflags} -nologo -MACHINE:${MACHINE} "
1199 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
1200 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
1206 lflags="${lflags} -nologo"
1208 CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
1209 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
1216 CFLAGS_DEBUG="-g"
1217 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
1218 SHLIB_LD='${CC} -shared'
1220 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
1221 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
1223 AC_CACHE_CHECK(for cross-compile version of gcc,
1227 #error cross-compiler
1236 CC="x86_64-w64-mingw32-${CC}"
1237 LD="x86_64-w64-mingw32-ld"
1238 AR="x86_64-w64-mingw32-ar"
1239 RANLIB="x86_64-w64-mingw32-ranlib"
1240 RC="x86_64-w64-mingw32-windres"
1243 CC="aarch64-w64-mingw32-clang"
1244 LD="aarch64-w64-mingw32-ld"
1245 AR="aarch64-w64-mingw32-ar"
1246 RANLIB="aarch64-w64-mingw32-ranlib"
1247 RC="aarch64-w64-mingw32-windres"
1250 CC="i686-w64-mingw32-${CC}"
1251 LD="i686-w64-mingw32-ld"
1252 AR="i686-w64-mingw32-ar"
1253 RANLIB="i686-w64-mingw32-ranlib"
1254 RC="i686-w64-mingw32-windres"
1260 SHLIB_LD="${LINKBIN} -dll ${lflags}"
1261 # link -lib only works when -lib is the first arg
1262 STLIB_LD="${LINKBIN} -lib ${lflags}"
1264 PATHTYPE=-w
1266 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
1268 # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
1270 LDFLAGS_DEBUG="-debug -debugtype:cv"
1271 LDFLAGS_OPTIMIZE="-release"
1272 LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
1273 LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
1281 AIX-*)
1290 CC=`echo "$CC" | sed -e 's/^\([[^ ]]*\)/\1_r/'`
1295 LIBS="$LIBS -lc"
1301 # Check to enable 64-bit flags for compiler/linker
1307 CFLAGS="$CFLAGS -q64"
1308 LDFLAGS_ARCH="-q64"
1309 RANLIB="${RANLIB} -X64"
1310 AR="${AR} -X64"
1311 SHLIB_LD_FLAGS="-b64"
1315 AS_IF([test "`uname -m`" = ia64], [
1316 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
1317 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1319 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
1321 CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
1323 LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
1326 SHLIB_LD='${CC} -shared -Wl,-bexpall'
1328 SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
1329 LDFLAGS="$LDFLAGS -brtl"
1332 CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
1337 SHLIB_CFLAGS="-fPIC"
1338 SHLIB_LD='${CC} -nostart'
1341 #-----------------------------------------------------------
1342 # Check for inet_ntoa in -lbind, for BeOS (which also needs
1343 # -lsocket, even if the network functions are in -lnet which
1345 #-----------------------------------------------------------
1346 AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
1348 BSD/OS-2.1*|BSD/OS-3*)
1350 SHLIB_LD="shlicc -r"
1355 BSD/OS-4.*)
1356 SHLIB_CFLAGS="-export-dynamic -fPIC"
1357 SHLIB_LD='${CC} -shared'
1359 LDFLAGS="$LDFLAGS -export-dynamic"
1365 SHLIB_LD='${CC} -shared'
1367 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$[@].a"
1374 SHLIB_CFLAGS="-K PIC"
1375 SHLIB_LD='${CC} -G'
1382 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
1383 SHLIB_CFLAGS="-fPIC"
1385 SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
1386 AC_CHECK_LIB(network, inet_ntoa, [LIBS="$LIBS -lnetwork"])
1388 HP-UX-*.11.*)
1393 #LIBS="$LIBS -lxnet" # Use the XOPEN network library
1395 AS_IF([test "`uname -m`" = ia64], [
1403 SHLIB_LD="ld -b"
1404 LDFLAGS="$LDFLAGS -Wl,-E"
1405 CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
1410 SHLIB_LD='${CC} -shared'
1413 CFLAGS="$CFLAGS -z"
1416 # Check to enable 64-bit flags for compiler/linker
1419 case `${CC} -dumpmachine` in
1421 # 64-bit gcc in use. Fix flags for GNU ld.
1423 SHLIB_LD='${CC} -shared'
1425 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
1438 HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
1443 SHLIB_LD="ld -b"
1445 LDFLAGS="$LDFLAGS -Wl,-E"
1446 CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
1450 IRIX-5.*)
1452 SHLIB_LD="ld -shared -rdata_shared"
1456 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1457 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'])
1459 IRIX-6.*)
1461 SHLIB_LD="ld -n32 -shared -rdata_shared"
1464 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1465 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'])
1467 CFLAGS="$CFLAGS -mabi=n32"
1468 LDFLAGS="$LDFLAGS -mabi=n32"
1471 IRIX-6.3)
1473 CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
1476 CFLAGS="$CFLAGS -n32"
1479 LDFLAGS="$LDFLAGS -n32"
1482 IRIX64-6.*)
1484 SHLIB_LD="ld -n32 -shared -rdata_shared"
1487 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1488 LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'])
1490 # Check to enable 64-bit flags for compiler/linker
1497 SHLIB_LD="ld -64 -shared -rdata_shared"
1498 CFLAGS="$CFLAGS -64"
1499 LDFLAGS_ARCH="-64"
1503 Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
1504 SHLIB_CFLAGS="-fPIC"
1508 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
1511 SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
1512 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
1515 DragonFly-*|FreeBSD-*)
1517 # The -pthread needs to go in the LDFLAGS, not LIBS
1518 LIBS=`echo $LIBS | sed s/-pthread//`
1525 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
1527 AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])
1529 AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [
1531 CFLAGS="$CFLAGS -m64"
1536 CFLAGS="$CFLAGS -m64"
1542 # functions like strtod(). The -fno-builtin flag should address
1543 # this problem but it does not work. The -fno-inline flag is kind
1547 AS_IF([test x"${USE_COMPAT}" != x],[CFLAGS="$CFLAGS -fno-inline"])
1550 SHLIB_CFLAGS="-fPIC"
1552 CFLAGS_OPTIMIZE=-02
1553 SHLIB_LD='${CC} -shared'
1554 LD_FLAGS="-Wl,--export-dynamic"
1556 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1557 LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
1559 OpenBSD-*)
1560 arch=`arch -s`
1563 SHLIB_CFLAGS="-fPIC"
1566 SHLIB_CFLAGS="-fpic"
1569 SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
1572 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
1575 LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
1576 CFLAGS_OPTIMIZE="-O2"
1577 # On OpenBSD: Compile with -pthread
1578 # Don't link with -lpthread
1579 LIBS=`echo $LIBS | sed s/-lpthread//`
1580 CFLAGS="$CFLAGS -pthread"
1585 NetBSD-*)
1586 # NetBSD has ELF and can use 'cc -shared' to build shared libs
1587 SHLIB_CFLAGS="-fPIC"
1588 SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
1590 LDFLAGS="$LDFLAGS -export-dynamic"
1592 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'])
1594 # The -pthread needs to go in the CFLAGS, not LIBS
1595 LIBS=`echo $LIBS | sed s/-pthread//`
1596 CFLAGS="$CFLAGS -pthread"
1597 LDFLAGS="$LDFLAGS -pthread"
1599 Darwin-*)
1600 CFLAGS_OPTIMIZE="-Os"
1601 SHLIB_CFLAGS="-fno-common"
1603 # preprocessing tests and compiling tests, move any -isysroot and
1604 # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
1606 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
1607 if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
1609 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
1610 if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
1614 AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag],
1617 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
1622 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
1626 AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag],
1629 CFLAGS="$CFLAGS -arch x86_64"
1634 CFLAGS="$CFLAGS -arch x86_64"
1638 AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);;
1641 # Check for combined 32-bit and 64-bit fat build
1642 AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
1643 && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [
1647 SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
1648 AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
1650 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
1655 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
1658 …vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1…
1659 SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
1661 LDFLAGS="$LDFLAGS -headerpad_max_install_names"
1662 AC_CACHE_CHECK([if ld accepts -search_paths_first flag],
1665 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
1670 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
1681 # extensions, verify that 64-bit build is possible.
1682 AS_IF([test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"], [
1684 AC_CACHE_CHECK([for 64-bit X11], tcl_cv_lib_x11_64, [
1686 … eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
1688 CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
1689 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
1697 AC_CACHE_CHECK([for 64-bit Tk], tcl_cv_lib_tk_64, [
1699 … eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
1701 CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
1709 # remove 64-bit arch flags from CFLAGS et al. if configuration
1710 # does not support 64-bit.
1711 AS_IF([test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no], [
1712 AC_MSG_NOTICE([Removing 64-bit architectures from compiler & linker flags])
1714 eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
1718 OS/390-*)
1721 [Should OS/390 do the right thing with sockets?])
1723 OSF1-V*)
1727 SHLIB_LD='ld -shared -expect_unresolved "*"'
1729 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
1733 CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
1734 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
1735 AS_IF([test "$GCC" = yes], [CFLAGS="$CFLAGS -mieee"], [
1736 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"])
1738 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
1739 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
1740 LIBS=`echo $LIBS | sed s/-lpthreads//`
1742 LIBS="$LIBS -lpthread -lmach -lexc"
1744 CFLAGS="$CFLAGS -pthread"
1745 LDFLAGS="$LDFLAGS -pthread"
1748 QNX-6*)
1751 SHLIB_CFLAGS="-fPIC"
1752 SHLIB_LD="ld -Bshareable -x"
1758 SCO_SV-3.2*)
1760 SHLIB_CFLAGS="-fPIC -melf"
1761 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
1763 SHLIB_CFLAGS="-Kpic -belf"
1764 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
1766 SHLIB_LD="ld -G"
1772 SunOS-5.[[0-6]])
1776 # won't define thread-safe library routines.
1778 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
1782 SHLIB_CFLAGS="-KPIC"
1785 SHLIB_LD='${CC} -shared'
1786 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
1789 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1790 CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
1794 SunOS-5*)
1796 # won't define thread-safe library routines.
1798 AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
1802 SHLIB_CFLAGS="-KPIC"
1804 # Check to enable 64-bit flags for compiler/linker
1809 AS_IF([test "`${CC} -dumpversion | awk -F. '{print [$]1}'`" -lt 3], [
1813 CFLAGS="$CFLAGS -m64 -mcpu=v9"
1814 LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
1815 SHLIB_CFLAGS="-fPIC"
1820 CFLAGS="$CFLAGS -xarch=v9a"
1821 LDFLAGS_ARCH="-xarch=v9a"
1823 CFLAGS="$CFLAGS -xarch=v9"
1824 LDFLAGS_ARCH="-xarch=v9"
1832 SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
1834 CFLAGS="$CFLAGS -m64"
1835 LDFLAGS="$LDFLAGS -m64";;
1842 SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*)
1843 CFLAGS="$CFLAGS -m64"
1844 LDFLAGS="$LDFLAGS -m64";;
1846 CFLAGS="$CFLAGS -xarch=amd64"
1847 LDFLAGS="$LDFLAGS -xarch=amd64";;
1855 SHLIB_LD='${CC} -shared'
1856 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
1860 # We need to specify -static-libgcc or we need to
1862 # JH: static-libgcc is necessary for core Tcl, but may
1864 SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
1867 #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
1868 #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
1870 # JH: static-libgcc is necessary for core Tcl, but may
1872 SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
1877 SunOS-5.[[1-9]][[0-9]]*)
1879 SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
1881 SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
1883 CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
1884 LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
1887 UNIX_SV* | UnixWare-5*)
1888 SHLIB_CFLAGS="-KPIC"
1889 SHLIB_LD='${CC} -G'
1893 # that don't grok the -Bexport option. Test that it does.
1894 AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
1896 LDFLAGS="$LDFLAGS -Wl,-Bexport"
1901 LDFLAGS="$LDFLAGS -Wl,-Bexport"
1908 AS_IF([test "$do64bit" = yes -a "$do64bit_ok" = no], [
1909 AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
1928 AIX-*) ;;
1929 BSD/OS*) ;;
1932 NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
1933 Darwin-*) ;;
1934 SCO_SV-3.2*) ;;
1936 *) SHLIB_CFLAGS="-fPIC" ;;
1951 if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
1982 # with Cygwin's version as of 2002-04-10, define it to be int,
2062 # verify any possible 64-bit or similar switches are necessary
2067 #--------------------------------------------------------------------
2074 # pseudo-terminal (usually /dev/null instead.)
2086 #--------------------------------------------------------------------
2184 #--------------------------------------------------------------------
2192 # no include files, so double-check its result just to be safe.
2206 #--------------------------------------------------------------------
2221 if test ! -r $x_includes/X11/Xlib.h; then
2226 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
2233 if test -r $i/X11/Xlib.h; then
2235 XINCLUDES=" -I$i"
2243 XINCLUDES="-I$x_includes"
2256 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
2258 XLIBSW="-L$i -lX11"
2265 XLIBSW=-lX11
2267 XLIBSW="-L$x_libraries -lX11"
2271 AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
2274 AC_MSG_RESULT([could not find any! Using -lX11.])
2275 XLIBSW=-lX11
2283 #--------------------------------------------------------------------
2286 # The statements below check for systems where POSIX-style
2287 # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
2288 # On these systems (mostly older ones), use the old BSD-style
2301 #--------------------------------------------------------------------
2319 #--------------------------------------------------------------------
2336 #--------------------------------------------------------------------
2391 #--------------------------------------------------------------------
2408 #--------------------------------------------------------------------
2422 if ((term != infString) && (term[-1] == 0)) {
2426 if ((term != nanString) && (term[-1] == 0)) {
2444 #--------------------------------------------------------------------
2448 # Things like the math library (-lm), socket stuff (-lsocket vs.
2449 # -lnsl), zlib (-lz) and libtommath (-ltommath) are dealt with here.
2463 #--------------------------------------------------------------------
2466 #--------------------------------------------------------------------
2469 #--------------------------------------------------------------------
2471 AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
2473 #--------------------------------------------------------------------
2474 # Interactive UNIX requires -linet instead of -lsocket, plus it
2475 # needs net/errno.h to define the socket-related error codes.
2476 #--------------------------------------------------------------------
2478 AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
2482 #--------------------------------------------------------------------
2483 # Check for the existence of the -lsocket and -lnsl libraries.
2487 # 1. Use "connect" and "accept" to check for -lsocket, and
2488 # "gethostbyname" to check for -lnsl.
2491 # 3. Use -lnsl and -lsocket only if they supply procedures that
2495 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
2497 # if -lsocket doesn't work by itself.
2498 #--------------------------------------------------------------------
2504 LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
2508 LIBS="$LIBS -lsocket -lnsl"
2512 [LIBS="$LIBS -lnsl"])])
2514 [LIBS="$LIBS -ltommath"])])
2516 [LIBS="$LIBS -lz"])])
2519 #--------------------------------------------------------------------
2522 # Check for what flags are needed to be passed so the correct OS
2535 #--------------------------------------------------------------------
2538 AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
2540 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#define ]$1[ 1
2542 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
2543 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)]))
2544 if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
2566 #--------------------------------------------------------------------
2569 # Check for what is defined in the way of 64-bit features.
2583 #--------------------------------------------------------------------
2586 AC_MSG_CHECKING([for 64-bit integer type])
2593 # type that is our current guess for a 64-bit type inside this check
2599 AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?])
2602 -a "${TEA_PLATFORM}" = "windows" ; then
2640 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]], [[off64_t offset;
2661 #------------------------------------------------------------------------
2662 # TEA_INIT --
2688 #------------------------------------------------------------------------
2701 # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
2706 case "`uname -s`" in
2708 AC_CHECK_PROG(CYGPATH, cygpath, cygpath -m, echo)
2718 # Maybe we are cross-compiling....
2767 #------------------------------------------------------------------------
2768 # TEA_ADD_SOURCES --
2783 #------------------------------------------------------------------------
2789 # allow $-var names
2794 # check for existence - allows for generic/win/unix VPATH
2797 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
2798 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
2799 -a ! -f "${srcdir}/macosx/$i" \
2808 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
2810 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
2820 #------------------------------------------------------------------------
2821 # TEA_ADD_STUB_SOURCES --
2836 #------------------------------------------------------------------------
2840 # check for existence - allows for generic/win/unix VPATH
2841 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
2842 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
2843 -a ! -f "${srcdir}/macosx/$i" \
2852 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
2854 j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
2862 #------------------------------------------------------------------------
2863 # TEA_ADD_TCL_SOURCES --
2875 #------------------------------------------------------------------------
2880 if test ! -f "${srcdir}/$i" ; then
2888 #------------------------------------------------------------------------
2889 # TEA_ADD_HEADERS --
2901 #------------------------------------------------------------------------
2906 if test ! -f "${srcdir}/$i" ; then
2914 #------------------------------------------------------------------------
2915 # TEA_ADD_INCLUDES --
2927 #------------------------------------------------------------------------
2936 #------------------------------------------------------------------------
2937 # TEA_ADD_LIBS --
2942 # "-lfoo" when using GCC (mingw).
2951 #------------------------------------------------------------------------
2955 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
2956 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
2957 i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.[[lL]][[iI]][[bB]][$]/-l\1/'`
2964 #------------------------------------------------------------------------
2965 # TEA_ADD_CFLAGS --
2977 #------------------------------------------------------------------------
2983 #------------------------------------------------------------------------
2984 # TEA_ADD_CLEANFILES --
2994 #------------------------------------------------------------------------
2999 #------------------------------------------------------------------------
3000 # TEA_PREFIX --
3002 # Handle the --prefix=... option by defaulting to what Tcl gave
3009 # If --prefix or --exec-prefix was not specified, $prefix and
3012 #------------------------------------------------------------------------
3017 AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
3020 AC_MSG_NOTICE([--prefix defaulting to /usr/local])
3024 if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3025 -o x"${exec_prefix_default}" = x"yes" ; then
3027 AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
3030 AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
3036 #------------------------------------------------------------------------
3037 # TEA_SETUP_COMPILER_CC --
3048 #------------------------------------------------------------------------
3056 #--------------------------------------------------------------------
3058 #--------------------------------------------------------------------
3062 #--------------------------------------------------------------------
3064 #--------------------------------------------------------------------
3068 #--------------------------------------------------------------------
3070 #--------------------------------------------------------------------
3076 #------------------------------------------------------------------------
3077 # TEA_SETUP_COMPILER --
3088 #------------------------------------------------------------------------
3093 #------------------------------------------------------------------------
3094 # If we're using GCC, see if the compiler understands -pipe. If so, use it.
3096 #------------------------------------------------------------------------
3098 if test -z "$no_pipe" -a -n "$GCC"; then
3099 AC_CACHE_CHECK([if the compiler understands -pipe],
3101 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
3105 CFLAGS="$CFLAGS -pipe"
3109 #--------------------------------------------------------------------
3111 #--------------------------------------------------------------------
3116 #------------------------------------------------------------------------
3117 # TEA_MAKE_LIB --
3130 # CFLAGS - Done late here to note disturb other AC macros
3131 # MAKE_LIB - Command to execute to build the Tcl library;
3137 # VC_MANIFEST_EMBED_DLL Makefile rule for embedded VC manifest in DLL
3138 # VC_MANIFEST_EMBED_EXE Makefile rule for embedded VC manifest in EXE
3139 #------------------------------------------------------------------------
3142 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
3143 MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
3144 …MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS) \${SHLIB_…
3145 AC_EGREP_CPP([manifest needed], [
3147 print("manifest needed")
3151 …VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -o…
3152 …VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -o…
3154 TEA_ADD_CLEANFILES([*.manifest])
3156 MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\[$]@ \$(PKG_STUB_OBJECTS)"
3159 …MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD…
3169 #--------------------------------------------------------------------
3173 #--------------------------------------------------------------------
3177 if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
3191 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
3248 #------------------------------------------------------------------------
3249 # TEA_LIB_SPEC --
3259 # $prefix/$exec-prefix, then some defaults.
3269 #------------------------------------------------------------------------
3274 # Look in exec-prefix for the library (defined by TEA_PREFIX).
3278 # Or in a user-specified location.
3287 `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
3288 `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
3289 `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
3290 `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
3291 `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
3292 `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
3293 `ls -dr /usr/lib64/$1[[0-9]]*.lib 2>/dev/null ` \
3294 `ls -dr /usr/lib64/lib$1[[0-9]]* 2>/dev/null ` \
3295 `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
3296 `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
3297 if test -f "$i" ; then
3310 tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
3311 $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
3321 #------------------------------------------------------------------------
3322 # TEA_PRIVATE_TCL_HEADERS --
3337 #------------------------------------------------------------------------
3340 # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
3350 if test "${TEA_PLATFORM}" = "windows" -a \
3351 -f "${ac_cv_c_tclh}/tclWinPort.h"; then
3353 elif test "${TEA_PLATFORM}" = "unix" -a \
3354 -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
3367 TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
3368 if test "`uname -s`" = "Darwin"; then
3373 if test -d "${TCL_BIN_DIR}/Headers" -a \
3374 -d "${TCL_BIN_DIR}/PrivateHeaders"; then
3375 TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
3377 …TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/…
3383 if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
3396 #------------------------------------------------------------------------
3397 # TEA_PUBLIC_TCL_HEADERS --
3409 # Adds a --with-tclinclude switch to configure.
3414 #------------------------------------------------------------------------
3419 …AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header file…
3422 # Use the value from --with-tclinclude, if it was given
3425 if test -f "${with_tclinclude}/tcl.h" ; then
3432 if test "`uname -s`" = "Darwin"; then
3437 list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
3444 if test -f "${TCL_BIN_DIR}/Makefile" ; then
3445 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
3448 # Check order: pkg --prefix location, Tcl's --prefix location,
3453 `ls -d ${temp_includedir} 2>/dev/null` \
3454 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
3455 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
3456 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
3459 d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
3460 list="$list `ls -d ${d} 2>/dev/null`"
3464 if test -f "$i/tcl.h" ; then
3475 AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude])
3484 TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
3489 #------------------------------------------------------------------------
3490 # TEA_PRIVATE_TK_HEADERS --
3504 #------------------------------------------------------------------------
3507 # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
3517 if test "${TEA_PLATFORM}" = "windows" -a \
3518 -f "${ac_cv_c_tkh}/tkWinPort.h"; then
3520 elif test "${TEA_PLATFORM}" = "unix" -a \
3521 -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
3535 TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
3537 if test -d "${TK_SRC_DIR}/generic/ttk"; then
3538 TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
3541 TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
3544 TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
3546 if test "`uname -s`" = "Darwin"; then
3551 if test -d "${TK_BIN_DIR}/Headers" -a \
3552 -d "${TK_BIN_DIR}/PrivateHeaders"; then
3553 TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
3555 …TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/Priv…
3561 if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
3575 #------------------------------------------------------------------------
3576 # TEA_PUBLIC_TK_HEADERS --
3588 # Adds a --with-tkinclude switch to configure.
3593 #------------------------------------------------------------------------
3598 …AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files]…
3601 # Use the value from --with-tkinclude, if it was given
3604 if test -f "${with_tkinclude}/tk.h" ; then
3611 if test "`uname -s`" = "Darwin"; then
3616 list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
3623 if test -f "${TK_BIN_DIR}/Makefile" ; then
3624 list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
3627 # Check order: pkg --prefix location, Tk's --prefix location,
3628 # relative to directory of tkConfig.sh, Tcl's --prefix location,
3633 `ls -d ${temp_includedir} 2>/dev/null` \
3634 `ls -d ${TK_PREFIX}/include 2>/dev/null` \
3635 `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \
3636 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
3637 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
3638 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
3641 d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
3642 list="$list `ls -d ${d} 2>/dev/null`"
3646 if test -f "$i/tk.h" ; then
3657 AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude])
3666 TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
3673 if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
3675 TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
3682 #------------------------------------------------------------------------
3683 # TEA_PATH_CONFIG --
3695 # --with-$1=...
3700 #------------------------------------------------------------------------
3706 # the alternative search directory is invoked by --with-$1
3712 …AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], wi…
3716 # First check to see if --with-$1 was specified.
3720 if test -f ${with_$1config}; then
3721 …AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.…
3725 if test -f "${with_$1config}/$1Config.sh" ; then
3736 `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
3737 `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
3738 `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
3739 `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
3741 `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
3742 `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
3743 `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
3744 `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
3746 `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
3747 `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
3748 `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
3749 `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
3751 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
3752 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
3753 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
3754 `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
3756 if test -f "$i/$1Config.sh" ; then
3760 if test -f "$i/unix/$1Config.sh" ; then
3769 for i in `ls -d ${libdir} 2>/dev/null` \
3770 `ls -d ${exec_prefix}/lib 2>/dev/null` \
3771 `ls -d ${prefix}/lib 2>/dev/null` \
3772 `ls -d /usr/local/lib 2>/dev/null` \
3773 `ls -d /usr/contrib/lib 2>/dev/null` \
3774 `ls -d /usr/pkg/lib 2>/dev/null` \
3775 `ls -d /usr/lib 2>/dev/null` \
3776 `ls -d /usr/lib64 2>/dev/null` \
3778 if test -f "$i/$1Config.sh" ; then
3798 #------------------------------------------------------------------------
3799 # TEA_LOAD_CONFIG --
3814 #------------------------------------------------------------------------
3819 if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
3835 if test -f "${$1_BIN_DIR}/Makefile" ; then
3836 AC_MSG_WARN([Found Makefile - using build library specs for $1])
3855 # Allow the caller to prevent this auto-check by specifying any 2nd arg
3857 # Check both upper and lower-case variants
3858 # If a dev wanted non-stubs libs, this function could take an option
3861 [TEA_LOAD_CONFIG_LIB(translit($1,[a-z],[A-Z])_STUB)],
3866 #------------------------------------------------------------------------
3867 # TEA_LOAD_CONFIG_LIB --
3874 #------------------------------------------------------------------------
3882 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
3894 #------------------------------------------------------------------------
3895 # TEA_EXPORT_CONFIG --
3906 #------------------------------------------------------------------------
3909 #--------------------------------------------------------------------
3911 #--------------------------------------------------------------------
3916 eval $1_LIB_FLAG="-l$1${PACKAGE_VERSION}"
3917 eval $1_STUB_LIB_FLAG="-l$1stub${PACKAGE_VERSION}"
3919 eval $1_LIB_FLAG="-l$1`echo ${PACKAGE_VERSION} | tr -d .`"
3920 eval $1_STUB_LIB_FLAG="-l$1stub`echo ${PACKAGE_VERSION} | tr -d .`"
3922 $1_BUILD_LIB_SPEC="-L`$CYGPATH $(pwd)` ${$1_LIB_FLAG}"
3923 $1_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` ${$1_LIB_FLAG}"
3924 $1_BUILD_STUB_LIB_SPEC="-L`$CYGPATH $(pwd)` [$]{$1_STUB_LIB_FLAG}"
3925 $1_STUB_LIB_SPEC="-L`$CYGPATH ${pkglibdir}` [$]{$1_STUB_LIB_FLAG}"
3942 #------------------------------------------------------------------------
3943 # TEA_INSTALLER --
3958 #------------------------------------------------------------------------
3961 INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
3962 INSTALL_DATA_DIR='${INSTALL} -d -m 755'
3963 INSTALL_DATA='${INSTALL} -m 644'
3964 INSTALL_PROGRAM='${INSTALL} -m 755'
3965 INSTALL_SCRIPT='${INSTALL} -m 755'
3969 HP-UX-*) INSTALL_LIBRARY='${INSTALL} -m 755' ;;
3970 *) INSTALL_LIBRARY='${INSTALL} -m 644' ;;
3982 # Tip 430 - ZipFS Modifications
3984 #------------------------------------------------------------------------
3998 #------------------------------------------------------------------------
4009 search_path=`echo ${PATH} | sed -e 's/:/ /g'`
4011 for j in `ls -r $dir/macher 2> /dev/null` \
4012 `ls -r $dir/macher 2> /dev/null` ; do
4014 if test -f "$j" ; then
4022 if test -f "$ac_cv_path_macher" ; then
4029 search_path=`echo ${PATH} | sed -e 's/:/ /g'`
4031 for j in `ls -r $dir/zip 2> /dev/null` \
4032 `ls -r $dir/zip 2> /dev/null` ; do
4034 if test -f "$j" ; then
4042 if test -f "$ac_cv_path_zip" ; then
4045 ZIP_PROG_OPTIONS="-rq"
4053 ZIP_PROG_OPTIONS="-o -r"