diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 3 | ||||
-rwxr-xr-x | unix/configure | 112 | ||||
-rw-r--r-- | unix/configure.in | 10 | ||||
-rw-r--r-- | unix/tcl.m4 | 7 |
4 files changed, 86 insertions, 46 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 41c5b08..448c2d5 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.79 2001/06/28 01:22:21 hobbs Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.80 2001/07/11 00:59:30 mdejong Exp $ VERSION = @TCL_VERSION@ @@ -218,6 +218,7 @@ TCL_BUILD_EXP_FILE = @TCL_BUILD_EXP_FILE@ COMPAT_OBJS = @LIBOBJS@ AC_FLAGS = @EXTRA_CFLAGS@ @DEFS@ +AR = @AR@ RANLIB = @RANLIB@ SRC_DIR = @srcdir@ TOP_DIR = @srcdir@/.. diff --git a/unix/configure b/unix/configure index 35ab72d..59f9b8b 100755 --- a/unix/configure +++ b/unix/configure @@ -533,7 +533,7 @@ else fi -# RCS: @(#) $Id: configure.in,v 1.68 2001/06/26 20:13:20 mdejong Exp $ +# RCS: @(#) $Id: configure.in,v 1.69 2001/06/26 20:28:43 mdejong Exp $ TCL_VERSION=8.4 TCL_MAJOR_VERSION=8 @@ -4782,7 +4782,36 @@ fi TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" - STLIB_LD="ar cr" + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4789: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AR="ar" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AR="$ac_cv_prog_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + STLIB_LD='${AR} cr' case $system in AIX-5.*) if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then @@ -4859,7 +4888,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:4863: checking for gettimeofday in -lbsd" >&5 +echo "configure:4892: 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 @@ -4867,7 +4896,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 4871 "configure" +#line 4900 "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 @@ -4878,7 +4907,7 @@ int main() { gettimeofday() ; return 0; } EOF -if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4911: \"$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 @@ -4940,7 +4969,7 @@ EOF HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*|HP-UX-*.11.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:4944: checking for shl_load in -ldld" >&5 +echo "configure:4973: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4948,7 +4977,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <<EOF -#line 4952 "configure" +#line 4981 "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 @@ -4959,7 +4988,7 @@ int main() { shl_load() ; return 0; } EOF -if { (eval echo configure:4963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4992: \"$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 @@ -5066,17 +5095,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:5070: checking for dld.h" >&5 +echo "configure:5099: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5075 "configure" +#line 5104 "configure" #include "confdefs.h" #include <dld.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5131,17 +5160,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:5135: checking for dlfcn.h" >&5 +echo "configure:5164: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5140 "configure" +#line 5169 "configure" #include "confdefs.h" #include <dlfcn.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5168,9 +5197,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:5172: checking for ELF" >&5 +echo "configure:5201: checking for ELF" >&5 cat > conftest.$ac_ext <<EOF -#line 5174 "configure" +#line 5203 "configure" #include "confdefs.h" #ifdef __ELF__ @@ -5441,17 +5470,17 @@ EOF # that don't grok the -Bexport option. Test that it does. hold_ldflags=$LDFLAGS echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6 -echo "configure:5445: checking for ld accepts -Bexport flag" >&5 +echo "configure:5474: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <<EOF -#line 5448 "configure" +#line 5477 "configure" #include "confdefs.h" int main() { int i; ; return 0; } EOF -if { (eval echo configure:5455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -5497,9 +5526,9 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:5501: checking sys/exec.h" >&5 +echo "configure:5530: checking sys/exec.h" >&5 cat > conftest.$ac_ext <<EOF -#line 5503 "configure" +#line 5532 "configure" #include "confdefs.h" #include <sys/exec.h> int main() { @@ -5517,7 +5546,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -5535,9 +5564,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:5539: checking a.out.h" >&5 +echo "configure:5568: checking a.out.h" >&5 cat > conftest.$ac_ext <<EOF -#line 5541 "configure" +#line 5570 "configure" #include "confdefs.h" #include <a.out.h> int main() { @@ -5555,7 +5584,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -5573,9 +5602,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:5577: checking sys/exec_aout.h" >&5 +echo "configure:5606: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext <<EOF -#line 5579 "configure" +#line 5608 "configure" #include "confdefs.h" #include <sys/exec_aout.h> int main() { @@ -5593,7 +5622,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -5688,7 +5717,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:5692: checking for build with symbols" >&5 +echo "configure:5721: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -5725,17 +5754,17 @@ TCL_DBGX=${DBGX} do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5729: checking for $ac_hdr" >&5 +echo "configure:5758: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5734 "configure" +#line 5763 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5765,17 +5794,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5769: checking for $ac_hdr" >&5 +echo "configure:5798: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5774 "configure" +#line 5803 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5802,7 +5831,7 @@ fi done echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 -echo "configure:5806: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 +echo "configure:5835: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else @@ -5864,7 +5893,7 @@ TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:5868: checking how to build libraries" >&5 +echo "configure:5897: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -5899,7 +5928,7 @@ if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != "" ; then TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}" eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}" if test "x$DL_OBJS" = "xtclLoadAout.o"; then - MAKE_LIB="ar cr \$@ \${OBJS}" + MAKE_LIB="\${STLIB_LD} \$@ \${OBJS}" else MAKE_LIB="\${SHLIB_LD} -o \$@ \${OBJS} ${SHLIB_LD_LIBS}" RANLIB=":" @@ -5919,7 +5948,7 @@ else TCL_SHLIB_CFLAGS="" TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}" eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}" - MAKE_LIB="ar cr \$@ \${OBJS}" + MAKE_LIB="\${STLIB_LD} \$@ \${OBJS}" fi # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed @@ -5986,7 +6015,7 @@ eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" # Replace DBGX with TCL_DBGX eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" -MAKE_STUB_LIB="ar cr \$@ \${STUB_LIB_OBJS}" +MAKE_STUB_LIB="\${STLIB_LD} \$@ \${STUB_LIB_OBJS}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}" @@ -6056,6 +6085,8 @@ TCL_SHARED_BUILD=${SHARED_BUILD} + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -6207,6 +6238,7 @@ s%@TCL_THREADS@%$TCL_THREADS%g s%@LIBOBJS@%$LIBOBJS%g s%@TCL_LIBS@%$TCL_LIBS%g s%@MATH_LIBS@%$MATH_LIBS%g +s%@AR@%$AR%g s%@DL_LIBS@%$DL_LIBS%g s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g diff --git a/unix/configure.in b/unix/configure.in index af18853..1c1d6be 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. AC_INIT(../generic/tcl.h) -# RCS: @(#) $Id: configure.in,v 1.69 2001/06/26 20:28:43 mdejong Exp $ +# RCS: @(#) $Id: configure.in,v 1.70 2001/07/11 00:59:31 mdejong Exp $ TCL_VERSION=8.4 TCL_MAJOR_VERSION=8 @@ -382,7 +382,7 @@ if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != "" ; then TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}" eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}" if test "x$DL_OBJS" = "xtclLoadAout.o"; then - MAKE_LIB="ar cr \[$]@ \${OBJS}" + MAKE_LIB="\${STLIB_LD} \[$]@ \${OBJS}" else MAKE_LIB="\${SHLIB_LD} -o \[$]@ \${OBJS} ${SHLIB_LD_LIBS}" RANLIB=":" @@ -402,7 +402,7 @@ else TCL_SHLIB_CFLAGS="" TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}" eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}" - MAKE_LIB="ar cr \[$]@ \${OBJS}" + MAKE_LIB="\${STLIB_LD} \[$]@ \${OBJS}" fi # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed @@ -469,7 +469,7 @@ eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" # Replace DBGX with TCL_DBGX eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" -MAKE_STUB_LIB="ar cr \[$]@ \${STUB_LIB_OBJS}" +MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \${STUB_LIB_OBJS}" if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}" @@ -510,6 +510,8 @@ AC_SUBST(LDFLAGS_DEFAULT) # FIXME: Should this be TCL_LDFLAGS_DEBUG ? AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) +AC_SUBST(AR) +AC_SUBST(RANLIB) AC_SUBST(MAKE_LIB) AC_SUBST(TCL_SHARED_BUILD) AC_SUBST(SHLIB_CFLAGS) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index fab607f..2e2d6f8 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -450,6 +450,8 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [ # MAKE_LIB - Command to execute to build the Tcl library; # differs depending on whether or not Tcl is being # compiled as a shared library. +# STLIB_LD - Base command to use for combining object files +# into a static library. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). @@ -592,7 +594,10 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" - STLIB_LD="ar cr" +dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. +dnl AC_CHECK_TOOL(AR, ar, :) + AC_CHECK_PROG(AR, ar, ar) + STLIB_LD='${AR} cr' case $system in AIX-5.*) if test "${TCL_THREADS}" = "1" -a "$using_gcc" = "no" ; then |