diff options
author | hobbs <hobbs> | 2003-11-12 01:05:34 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-11-12 01:05:34 (GMT) |
commit | 97930d8cb1af6c7eb851a9ce66f9f16b6a596000 (patch) | |
tree | 179a5807296f34b773ed639e91840b0e7c83b236 | |
parent | d081bdaefdd5c97a2957145ea3f0ed540aa55942 (diff) | |
download | tcl-97930d8cb1af6c7eb851a9ce66f9f16b6a596000.zip tcl-97930d8cb1af6c7eb851a9ce66f9f16b6a596000.tar.gz tcl-97930d8cb1af6c7eb851a9ce66f9f16b6a596000.tar.bz2 |
improve AIX --enable-64bit handling
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | unix/configure | 80 | ||||
-rw-r--r-- | unix/tcl.m4 | 74 |
3 files changed, 82 insertions, 77 deletions
@@ -1,3 +1,8 @@ +2003-11-11 Jeff Hobbs <jeffh@ActiveState.com> + + * unix/configure: + * unix/tcl.m4: improve AIX --enable-64bit handling + 2003-11-10 Don Porter <dgp@users.sourceforge.net> * tests/unixInit.test (unixInit-2.10): re-enabled. diff --git a/unix/configure b/unix/configure index 26656fa..0131989 100755 --- a/unix/configure +++ b/unix/configure @@ -5621,30 +5621,10 @@ fi LIBS="$LIBS -lc" # AIX-5 uses ELF style dynamic libraries SHLIB_CFLAGS="" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - if test "`uname -m`" = "ia64" ; then - # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - # AIX-5 has dl* in libc.so - DL_LIBS="" - if test "$GCC" = "yes" ; then - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' - fi - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - else - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - fi - # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LDFLAGS="" @@ -5664,6 +5644,26 @@ fi SHLIB_LD_FLAGS="-b64" fi fi + + if test "`uname -m`" = "ia64" ; then + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + if test "$GCC" = "yes" ; then + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + else + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + fi + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + else + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + fi ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then @@ -5675,7 +5675,6 @@ fi fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" @@ -5693,6 +5692,21 @@ fi DL_LIBS="-lld" fi + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = "yes" ; then + if test "$GCC" = "yes" ; then + echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 + else + do64bit_ok=yes + EXTRA_CFLAGS="-q64" + LDFLAGS="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + fi + fi + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to @@ -5706,7 +5720,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:5710: checking for gettimeofday in -lbsd" >&5 +echo "configure:5724: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5714,7 +5728,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 5718 "configure" +#line 5732 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -5725,7 +5739,7 @@ int main() { gettimeofday() ; return 0; } EOF -if { (eval echo configure:5729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5753,20 +5767,6 @@ fi EOF fi - - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then - if test "$GCC" = "yes" ; then - echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 - else - do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" - RANLIB="${RANLIB} -X64" - AR="${AR} -X64" - SHLIB_LD_FLAGS="-b64" - fi - fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 53a4615..5b4ed48 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -832,30 +832,10 @@ dnl AC_CHECK_TOOL(AR, ar) LIBS="$LIBS -lc" # AIX-5 uses ELF style dynamic libraries SHLIB_CFLAGS="" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".so" - if test "`uname -m`" = "ia64" ; then - # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC - SHLIB_LD="/usr/ccs/bin/ld -G -z text" - # AIX-5 has dl* in libc.so - DL_LIBS="" - if test "$GCC" = "yes" ; then - CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' - else - CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' - fi - LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' - else - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" - DL_LIBS="-ldl" - CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - TCL_NEEDS_EXP_FILE=1 - TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' - fi - # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LDFLAGS="" @@ -875,6 +855,26 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_LD_FLAGS="-b64" fi fi + + if test "`uname -m`" = "ia64" ; then + # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC + SHLIB_LD="/usr/ccs/bin/ld -G -z text" + # AIX-5 has dl* in libc.so + DL_LIBS="" + if test "$GCC" = "yes" ; then + CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' + else + CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' + fi + LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' + else + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} + TCL_NEEDS_EXP_FILE=1 + TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' + fi ;; AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then @@ -886,7 +886,6 @@ dnl AC_CHECK_TOOL(AR, ar) fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" - SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" @@ -904,6 +903,21 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="-lld" fi + # Check to enable 64-bit flags for compiler/linker + if test "$do64bit" = "yes" ; then + if test "$GCC" = "yes" ; then + AC_MSG_WARN("64bit mode not supported with GCC on $system") + else + do64bit_ok=yes + EXTRA_CFLAGS="-q64" + LDFLAGS="-q64" + RANLIB="${RANLIB} -X64" + AR="${AR} -X64" + SHLIB_LD_FLAGS="-b64" + fi + fi + SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}" + # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to @@ -921,20 +935,6 @@ dnl AC_CHECK_TOOL(AR, ar) MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ) fi - - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then - if test "$GCC" = "yes" ; then - AC_MSG_WARN("64bit mode not supported with GCC on $system") - else - do64bit_ok=yes - EXTRA_CFLAGS="-q64" - LDFLAGS="-q64" - RANLIB="${RANLIB} -X64" - AR="${AR} -X64" - SHLIB_LD_FLAGS="-b64" - fi - fi ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" |