--- tcl.m4.orig Mon Jul 26 18:40:46 2004 +++ tcl.m4 Mon Apr 13 23:31:25 2009 @@ -17,7 +17,7 @@ # the tclConfig.sh file #------------------------------------------------------------------------ -AC_DEFUN(SC_PATH_TCLCONFIG, [ +AC_DEFUN([SC_PATH_TCLCONFIG], [ # # Ok, lets find the tcl configuration # First, look for one uninstalled. @@ -121,7 +121,7 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ # the tkConfig.sh file #------------------------------------------------------------------------ -AC_DEFUN(SC_PATH_TKCONFIG, [ +AC_DEFUN([SC_PATH_TKCONFIG], [ # # Ok, lets find the tk configuration # First, look for one uninstalled. @@ -224,7 +224,7 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ # #------------------------------------------------------------------------ -AC_DEFUN(SC_LOAD_TCLCONFIG, [ +AC_DEFUN([SC_LOAD_TCLCONFIG], [ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then @@ -290,7 +290,7 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [ # TK_BIN_DIR #------------------------------------------------------------------------ -AC_DEFUN(SC_LOAD_TKCONFIG, [ +AC_DEFUN([SC_LOAD_TKCONFIG], [ AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh]) if test -f "$TK_BIN_DIR/tkConfig.sh" ; then @@ -327,7 +327,7 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [ # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ -AC_DEFUN(SC_ENABLE_SHARED, [ +AC_DEFUN([SC_ENABLE_SHARED], [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries [--enable-shared]], @@ -367,7 +367,7 @@ AC_DEFUN(SC_ENABLE_SHARED, [ # FRAMEWORK_BUILD Value of 1 or 0 #------------------------------------------------------------------------ -AC_DEFUN(SC_ENABLE_FRAMEWORK, [ +AC_DEFUN([SC_ENABLE_FRAMEWORK], [ AC_MSG_CHECKING([how to package libraries]) AC_ARG_ENABLE(framework, [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]], @@ -418,7 +418,7 @@ AC_DEFUN(SC_ENABLE_FRAMEWORK, [ # #------------------------------------------------------------------------ -AC_DEFUN(SC_ENABLE_THREADS, [ +AC_DEFUN([SC_ENABLE_THREADS], [ AC_MSG_CHECKING(for building with threads) AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) @@ -515,7 +515,7 @@ AC_DEFUN(SC_ENABLE_THREADS, [ # #------------------------------------------------------------------------ -AC_DEFUN(SC_ENABLE_SYMBOLS, [ +AC_DEFUN([SC_ENABLE_SYMBOLS], [ AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. @@ -572,7 +572,7 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ # #------------------------------------------------------------------------ -AC_DEFUN(SC_ENABLE_LANGINFO, [ +AC_DEFUN([SC_ENABLE_LANGINFO], [ AC_ARG_ENABLE(langinfo, [ --enable-langinfo use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic], @@ -619,7 +619,7 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [ # according to the user's selection. # #-------------------------------------------------------------------- -AC_DEFUN(SC_CONFIG_MANPAGES, [ +AC_DEFUN([SC_CONFIG_MANPAGES], [ AC_MSG_CHECKING([whether to use symlinks for manpages]) AC_ARG_ENABLE(man-symlinks, @@ -736,7 +736,7 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [ # #-------------------------------------------------------------------- -AC_DEFUN(SC_CONFIG_CFLAGS, [ +AC_DEFUN([SC_CONFIG_CFLAGS], [ # Step 0.a: Enable 64 bit support? @@ -1256,29 +1256,63 @@ dnl AC_CHECK_TOOL(AR, ar) 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, [ + case `arch -s` in + m88k|vax) + SHLIB_CFLAGS="" + SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".a" + DL_OBJS="tclLoadAout.o" + DL_LIBS="" + LDFLAGS="" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' + ;; + *) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.${LIBtcl84_VERSION}' + 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'] - ) + ], + AC_MSG_RESULT(yes) + [ LDFLAGS=-Wl,-export-dynamic ], + AC_MSG_RESULT(no) + LDFLAGS="" + ) + ;; + esac # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; + FabBSD-*) + SHLIB_CFLAGS="-fPIC" + SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.${LIBtcl84_VERSION}' + LDFLAGS=-Wl,-export-dynamic + + # FabBSD 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" @@ -1699,7 +1733,7 @@ dnl AC_CHECK_TOOL(AR, ar) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) + NetBSD-*|FreeBSD-*|OpenBSD-*|FabBSD-*) ;; Rhapsody-*|Darwin-*) ;; @@ -1817,7 +1851,7 @@ dnl esac # #-------------------------------------------------------------------- -AC_DEFUN(SC_SERIAL_PORT, [ +AC_DEFUN([SC_SERIAL_PORT], [ AC_CHECK_HEADERS(sys/modem.h) AC_MSG_CHECKING([termios vs. termio vs. sgtty]) AC_CACHE_VAL(tcl_cv_api_serial, [ @@ -1946,7 +1980,7 @@ int main() { # #-------------------------------------------------------------------- -AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ +AC_DEFUN([SC_MISSING_POSIX_HEADERS], [ AC_MSG_CHECKING(dirent.h) AC_TRY_LINK([#include #include ], [ @@ -2027,7 +2061,7 @@ closedir(d); # #-------------------------------------------------------------------- -AC_DEFUN(SC_PATH_X, [ +AC_DEFUN([SC_PATH_X], [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then @@ -2112,7 +2146,7 @@ AC_DEFUN(SC_PATH_X, [ # #-------------------------------------------------------------------- -AC_DEFUN(SC_BLOCKING_STYLE, [ +AC_DEFUN([SC_BLOCKING_STYLE], [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) @@ -2177,7 +2211,7 @@ AC_DEFUN(SC_BLOCKING_STYLE, [ # #-------------------------------------------------------------------- -AC_DEFUN(SC_TIME_HANDLER, [ +AC_DEFUN([SC_TIME_HANDLER], [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE @@ -2254,7 +2288,7 @@ AC_DEFUN(SC_TIME_HANDLER, [ # #-------------------------------------------------------------------- -AC_DEFUN(SC_BUGGY_STRTOD, [ +AC_DEFUN([SC_BUGGY_STRTOD], [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs]) @@ -2316,7 +2350,7 @@ AC_DEFUN(SC_BUGGY_STRTOD, [ # #-------------------------------------------------------------------- -AC_DEFUN(SC_TCL_LINK_LIBS, [ +AC_DEFUN([SC_TCL_LINK_LIBS], [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. @@ -2392,7 +2426,7 @@ AC_DEFUN(SC_TCL_LINK_LIBS, [ # #-------------------------------------------------------------------- -AC_DEFUN(SC_TCL_EARLY_FLAG,[ +AC_DEFUN([SC_TCL_EARLY_FLAG],[ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, AC_TRY_COMPILE([[#define ]$1[ 1 @@ -2404,7 +2438,7 @@ AC_DEFUN(SC_TCL_EARLY_FLAG,[ tcl_flags="$tcl_flags $1" fi]) -AC_DEFUN(SC_TCL_EARLY_FLAGS,[ +AC_DEFUN([SC_TCL_EARLY_FLAGS],[ AC_MSG_CHECKING([for required early compiler flags]) tcl_flags="" SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], @@ -2436,7 +2470,7 @@ AC_DEFUN(SC_TCL_EARLY_FLAGS,[ # #-------------------------------------------------------------------- -AC_DEFUN(SC_TCL_64BIT_FLAGS, [ +AC_DEFUN([SC_TCL_64BIT_FLAGS], [ AC_MSG_CHECKING([for 64-bit integer type]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none