diff options
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 200 |
1 files changed, 107 insertions, 93 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index f5f8d72..199930e 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -396,7 +396,9 @@ AC_DEFUN(SC_ENABLE_FRAMEWORK, [ #------------------------------------------------------------------------ # SC_ENABLE_THREADS -- # -# Specify if thread support should be enabled +# Specify if thread support should be enabled. TCL_THREADS is +# checked so that if you are compiling an extension against a +# threaded core, your extension must be compiled threaded as well. # # Arguments: # none @@ -421,8 +423,12 @@ AC_DEFUN(SC_ENABLE_THREADS, [ AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) - if test "$tcl_ok" = "yes"; then - AC_MSG_RESULT(yes) + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then + if test "${TCL_THREADS}" = 1; then + AC_MSG_RESULT([yes (threaded core)]) + else + AC_MSG_RESULT([yes]) + fi TCL_THREADS=1 AC_DEFINE(TCL_THREADS) # USE_THREAD_ALLOC tells us to try the special thread-based @@ -726,7 +732,7 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [ # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode -# EXTRA_CFLAGS +# CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) # #-------------------------------------------------------------------- @@ -796,7 +802,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # Step 3: set configuration options based on system name and version. do64bit_ok=no - EXTRA_CFLAGS="" + LDFLAGS_ORIG="$LDFLAGS" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' @@ -805,7 +811,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O if test "$GCC" = "yes" ; then - CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int" + CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing" else CFLAGS_WARNING="" fi @@ -839,7 +845,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" - LDFLAGS="" LD_LIBRARY_PATH_VAR="LIBPATH" @@ -849,8 +854,8 @@ dnl AC_CHECK_TOOL(AR, ar) AC_MSG_WARN("64bit mode not supported with GCC on $system") else do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" + CFLAGS="$CFLAGS -q64" + LDFLAGS="$LDFLAGS -q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" @@ -891,7 +896,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} LD_LIBRARY_PATH_VAR="LIBPATH" @@ -910,8 +914,8 @@ dnl AC_CHECK_TOOL(AR, ar) AC_MSG_WARN("64bit mode not supported with GCC on $system") else do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" + CFLAGS="$CFLAGS -q64" + LDFLAGS="$LDFLAGS -q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" @@ -937,6 +941,21 @@ dnl AC_CHECK_TOOL(AR, ar) AC_DEFINE(USE_DELTA_FOR_TZ) fi ;; + BeOS*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -nostart" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + + #----------------------------------------------------------- + # Check for inet_ntoa in -lbind, for BeOS (which also needs + # -lsocket, even if the network functions are in -lnet which + # is always linked to, for compatibility. + #----------------------------------------------------------- + AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) + ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" @@ -944,7 +963,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -955,7 +973,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="-export-dynamic" + LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -966,7 +984,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -984,7 +1001,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" - LDFLAGS="-Wl,-E" + LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" @@ -997,7 +1014,7 @@ dnl AC_CHECK_TOOL(AR, ar) fi # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc - #EXTRA_CFLAGS="+DAportable" + #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then @@ -1018,13 +1035,8 @@ dnl AC_CHECK_TOOL(AR, ar) esac else do64bit_ok=yes - if test "`uname -m`" = "ia64" ; then - EXTRA_CFLAGS="+DD64" - LDFLAGS="+DD64 $LDFLAGS" - else - EXTRA_CFLAGS="+DA2.0W" - LDFLAGS="+DA2.0W $LDFLAGS" - fi + CFLAGS="$CFLAGS +DD64" + LDFLAGS="$LDFLAGS +DD64" fi fi ;; @@ -1037,7 +1049,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" - LDFLAGS="-Wl,-E" + LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" @@ -1050,7 +1062,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" + LDFLAGS="$LDFLAGS -Wl,-D,08000000" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' @@ -1064,8 +1076,6 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' - EXTRA_CFLAGS="" - LDFLAGS="" ;; IRIX-6.*) SHLIB_CFLAGS="" @@ -1077,19 +1087,19 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "$GCC" = "yes" ; then - EXTRA_CFLAGS="-mabi=n32" - LDFLAGS="-mabi=n32" + CFLAGS="$CFLAGS -mabi=n32" + LDFLAGS="$LDFLAGS -mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. - EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS" + CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) - EXTRA_CFLAGS="-n32" + CFLAGS="$CFLAGS -n32" ;; esac - LDFLAGS="-n32" + LDFLAGS="$LDFLAGS -n32" fi ;; IRIX64-6.*) @@ -1099,7 +1109,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' @@ -1111,8 +1120,8 @@ dnl AC_CHECK_TOOL(AR, ar) else do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" - EXTRA_CFLAGS="-64" - LDFLAGS="-64" + CFLAGS="$CFLAGS -64" + LDFLAGS="$LDFLAGS -64" fi fi ;; @@ -1121,17 +1130,17 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" + CFLAGS_OPTIMIZE=-O2 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # 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" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="-rdynamic" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else @@ -1139,12 +1148,11 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD="ld -shared" DL_OBJS="tclLoadDld.o" DL_LIBS="-ldld" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then - EXTRA_CFLAGS="-mieee" + CFLAGS="$CFLAGS -mieee" fi # The combo of gcc + glibc has a bug related @@ -1155,7 +1163,7 @@ dnl AC_CHECK_TOOL(AR, ar) # Disable inlining only when one of the # files in compat/*.c is being linked in. if test x"${LIBOBJS}" != x ; then - EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline" + CFLAGS="$CFLAGS -fno-inline" fi # XIM peeking works under XFree86. @@ -1171,7 +1179,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD="${CC} -shared" DL_OBJS="" DL_LIBS="-ldl" - LDFLAGS="-rdynamic" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" else @@ -1179,12 +1187,11 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD="ld -shared" DL_OBJS="" DL_LIBS="-ldld" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then - EXTRA_CFLAGS="-mieee" + CFLAGS="$CFLAGS -mieee" fi ;; MP-RAS-02*) @@ -1194,7 +1201,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1205,11 +1211,11 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="-Wl,-Bexport" + LDFLAGS="$LDFLAGS -Wl,-Bexport" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[[1-2]].*|OpenBSD-*) + NetBSD-*|FreeBSD-[[1-2]].*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ # NetBSD/SPARC needs -fPIC, -fpic will not do. @@ -1219,7 +1225,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' AC_MSG_CHECKING(for ELF) @@ -1240,7 +1245,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' @@ -1251,6 +1255,30 @@ 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="" + CC_SEARCH_FLAGS="" + 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" @@ -1259,13 +1287,13 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="-export-dynamic" + LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "${TCL_THREADS}" = "1" ; then # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` - EXTRA_CFLAGS="-pthread" + CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi case $system in @@ -1287,14 +1315,14 @@ dnl AC_CHECK_TOOL(AR, ar) DL_OBJS="tclLoadDyld.o" PLAT_OBJS="tclMacOSXBundle.o" DL_LIBS="" - LDFLAGS="-prebind" + LDFLAGS="$LDFLAGS -prebind" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" CFLAGS_OPTIMIZE="-Os" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" # for compatibility with autoconf vers 2.13 : HACK="" - EXTRA_CFLAGS="-DMA${HACK}C_OSX_TCL -DHAVE_CFBUNDLE -DUSE_VFORK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\"" + CFLAGS="$CFLAGS -DMA${HACK}C_OSX_TCL -DHAVE_CFBUNDLE -DUSE_VFORK -DTCL_DEFAULT_ENCODING=\\\"utf-8\\\"" LIBS="$LIBS -framework CoreFoundation" ;; NEXTSTEP-*) @@ -1304,7 +1332,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1321,7 +1348,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1337,7 +1363,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1353,24 +1378,23 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "$GCC" = "yes" ; then - EXTRA_CFLAGS="-mieee" + CFLAGS="$CFLAGS -mieee" else - EXTRA_CFLAGS="-DHAVE_TZSET -std1 -ieee" + CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi # see pthread_intro(3) for pthread support on osf1, k.furukawa if test "${TCL_THREADS}" = "1" ; then - EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" - EXTRA_CFLAGS="${EXTRA_CFLAGS} -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" + CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" + CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` if test "$GCC" = "yes" ; then LIBS="$LIBS -lpthread -lmach -lexc" else - EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread" - LDFLAGS="-pthread" + CFLAGS="$CFLAGS -pthread" + LDFLAGS="$LDFLAGS -pthread" fi fi @@ -1385,7 +1409,6 @@ dnl AC_CHECK_TOOL(AR, ar) DL_OBJS="tclLoadDl.o" # dlopen is in -lc on QNX DL_LIBS="" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1396,7 +1419,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" + LDFLAGS="$LDFLAGS -Wl,-D,08000000" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; @@ -1406,10 +1429,10 @@ dnl AC_CHECK_TOOL(AR, ar) # below. if test "$GCC" = "yes" ; then SHLIB_CFLAGS="-fPIC -melf" - LDFLAGS="-melf -Wl,-Bexport" + LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" else SHLIB_CFLAGS="-Kpic -belf" - LDFLAGS="-belf -Wl,-Bexport" + LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi SHLIB_LD="ld -G" SHLIB_LD_LIBS="" @@ -1426,7 +1449,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1437,7 +1459,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} @@ -1467,7 +1488,6 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" - LDFLAGS="" if test "$GCC" = "yes" ; then SHLIB_LD="$CC -shared" CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' @@ -1487,7 +1507,6 @@ dnl AC_CHECK_TOOL(AR, ar) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) SHLIB_CFLAGS="-KPIC" - LDFLAGS="" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then @@ -1498,11 +1517,11 @@ dnl AC_CHECK_TOOL(AR, ar) else do64bit_ok=yes if test "$do64bitVIS" = "yes" ; then - EXTRA_CFLAGS="-xarch=v9a" - LDFLAGS="-xarch=v9a" + CFLAGS="$CFLAGS -xarch=v9a" + LDFLAGS="$LDFLAGS -xarch=v9a" else - EXTRA_CFLAGS="-xarch=v9" - LDFLAGS="-xarch=v9" + CFLAGS="$CFLAGS -xarch=v9" + LDFLAGS="$LDFLAGS -xarch=v9" fi fi else @@ -1534,11 +1553,11 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" - LDFLAGS="-Wl,-D,08000000" + LDFLAGS="$LDFLAGS -Wl,-D,08000000" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "$GCC" != "yes" ; then - EXTRA_CFLAGS="-DHAVE_TZSET -std1" + CFLAGS="$CFLAGS -DHAVE_TZSET -std1" fi ;; UNIX_SV* | UnixWare-5*) @@ -1552,15 +1571,10 @@ dnl AC_CHECK_TOOL(AR, ar) # that don't grok the -Bexport option. Test that it does. hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for ld accepts -Bexport flag) - LDFLAGS="${LDFLAGS} -Wl,-Bexport" - AC_TRY_LINK(, [int i;], found=yes, found=no) - LDFLAGS=$hold_ldflags + LDFLAGS="$LDFLAGS -Wl,-Bexport" + AC_TRY_LINK(, [int i;], [found=yes], + [LDFLAGS=$hold_ldflags found=no]) AC_MSG_RESULT($found) - if test $found = yes; then - LDFLAGS="-Wl,-Bexport" - else - LDFLAGS="" - fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1665,7 +1679,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" - LDFLAGS="" + LDFLAGS="$LDFLAGS_ORIG" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" BUILD_DLTEST="" @@ -1757,7 +1771,6 @@ dnl esac AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) - AC_SUBST(EXTRA_CFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_DEBUG) @@ -1920,7 +1933,7 @@ int main() { # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H -# NO_LIMITS_H +# HAVE_LIMITS_H or NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H @@ -1963,7 +1976,8 @@ closedir(d); AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)]) - AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)]) + AC_CHECK_HEADER(limits.h, + [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) @@ -2431,9 +2445,9 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [ # 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_RUN([#include <unistd.h> - int main() {exit(!(sizeof(]${tcl_type_64bit}[) > sizeof(long)));} - ], tcl_cv_type_64bit=${tcl_type_64bit},:,:)]) + AC_TRY_COMPILE(,[switch (0) { + case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; + }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG) AC_MSG_RESULT(using long) |