From 0892a022dbb2d6aaff7464cc7c7f15be94cccccc Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Tue, 15 Oct 2002 18:56:30 +0000 Subject: [PATCH] * tclconfig/tcl.m4: * configure: * configure.in: move the CFLAGS definition into TEA_ENABLE_SHARED and make it pick up the env CFLAGS at configure time. --- ChangeLog | 7 ++ configure | 277 +++++++++++++++++++++++------------------------ configure.in | 7 -- tclconfig/tcl.m4 | 67 ++++++++---- 4 files changed, 187 insertions(+), 171 deletions(-) diff --git a/ChangeLog b/ChangeLog index 728dc85..fe7d3c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-10-15 Jeff Hobbs + + * tclconfig/tcl.m4: + * configure: + * configure.in: move the CFLAGS definition into TEA_ENABLE_SHARED + and make it pick up the env CFLAGS at configure time. + 2002-09-25 Jeff Hobbs * Makefile.in: replace the ancient build system diff --git a/configure b/configure index 423906e..8ce60ed 100755 --- a/configure +++ b/configure @@ -23,8 +23,6 @@ ac_help="$ac_help --enable-64bit enable 64bit support (where applicable)" ac_help="$ac_help --enable-64bit-vis enable 64bit Sparc VIS support" -ac_help="$ac_help - --enable-memdebug build with memory debugging [--disable-memdebug]" ac_help="$ac_help --disable-load disallow dynamic loading and "load" command" ac_help="$ac_help @@ -592,7 +590,7 @@ EOF echo $ac_n "checking for correct TEA configuration""... $ac_c" 1>&6 -echo "configure:596: checking for correct TEA configuration" >&5 +echo "configure:594: checking for correct TEA configuration" >&5 if test x"${PACKAGE}" = x ; then { echo "configure: error: The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; } @@ -600,11 +598,11 @@ The PACKAGE variable must be defined by your TEA configure.in" 1>&2; exit 1; } echo "$ac_t""ok" 1>&6 TEA_INITED=ok case "`uname -s`" in - *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*|*CYGWIN_ME*|*MINGW32_*) + *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:608: checking for $ac_word" >&5 +echo "configure:606: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -666,7 +664,7 @@ if test "${with_tcl+set}" = set; then fi echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6 -echo "configure:670: checking for Tcl configuration" >&5 +echo "configure:668: checking for Tcl configuration" >&5 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -739,7 +737,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:743: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:741: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -819,12 +817,12 @@ echo "configure:743: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:823: checking for Cygwin environment" >&5 +echo "configure:821: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -852,19 +850,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:856: checking for mingw32 environment" >&5 +echo "configure:854: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -890,7 +888,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:894: checking for $ac_word" >&5 +echo "configure:892: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -920,7 +918,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:924: checking for $ac_word" >&5 +echo "configure:922: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -971,7 +969,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:975: checking for $ac_word" >&5 +echo "configure:973: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1003,7 +1001,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1007: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1014,12 +1012,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1018 "configure" +#line 1016 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1045,12 +1043,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1049: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1054: checking whether we are using GNU C" >&5 +echo "configure:1052: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1059,7 +1057,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1078,7 +1076,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1082: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1080: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1117,18 +1115,18 @@ fi if test -z "$no_pipe" -a -n "$GCC"; then echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:1121: checking if the compiler understands -pipe" >&5 +echo "configure:1119: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1153,7 +1151,7 @@ rm -f conftest* # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1157: checking for a BSD compatible install" >&5 +echo "configure:1155: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1211,7 +1209,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' #-------------------------------------------------------------------- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1215: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1213: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1245,7 +1243,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1249: checking for $ac_word" >&5 +echo "configure:1247: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1278,13 +1276,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1282: checking for object suffix" >&5 +echo "configure:1280: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1304,7 +1302,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1308: checking for executable suffix" >&5 +echo "configure:1306: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1314,7 +1312,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1338,7 +1336,7 @@ ac_exeext=$EXEEXT echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6 -echo "configure:1342: checking for Tcl public headers" >&5 +echo "configure:1340: checking for Tcl public headers" >&5 # Check whether --with-tclinclude or --without-tclinclude was given. if test "${with_tclinclude+set}" = set; then @@ -1456,7 +1454,7 @@ EOF EOF echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1460: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:1458: checking for pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1464,7 +1462,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1477: \"$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 @@ -1504,7 +1502,7 @@ fi # libpthread really doesn't exist, like AIX 4.2. # [Bug: 4359] echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1508: checking for __pthread_mutex_init in -lpthread" >&5 +echo "configure:1506: checking for __pthread_mutex_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1512,7 +1510,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1525: \"$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 @@ -1551,7 +1549,7 @@ fi THREADS_LIBS=" -lpthread" else echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:1555: checking for pthread_mutex_init in -lpthreads" >&5 +echo "configure:1553: checking for pthread_mutex_init in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1559,7 +1557,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1572: \"$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 @@ -1596,7 +1594,7 @@ fi THREADS_LIBS=" -lpthreads" else echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 -echo "configure:1600: checking for pthread_mutex_init in -lc" >&5 +echo "configure:1598: checking for pthread_mutex_init in -lc" >&5 ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1604,7 +1602,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1617: \"$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 @@ -1638,7 +1636,7 @@ fi if test "$tcl_ok" = "no"; then echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 -echo "configure:1642: checking for pthread_mutex_init in -lc_r" >&5 +echo "configure:1640: checking for pthread_mutex_init in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1646,7 +1644,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1659: \"$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 @@ -1694,12 +1692,12 @@ fi for ac_func in pthread_attr_setstacksize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1698: checking for $ac_func" >&5 +echo "configure:1696: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1752,7 +1750,7 @@ done fi # Do checking message here to not mess up interleaved configure output echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:1756: checking for building with threads" >&5 +echo "configure:1754: checking for building with threads" >&5 if test "${TCL_THREADS}" = "1"; then cat >> confdefs.h <<\EOF #define TCL_THREADS 1 @@ -1785,7 +1783,7 @@ EOF echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1789: checking how to build libraries" >&5 +echo "configure:1787: 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" @@ -1814,9 +1812,17 @@ EOF fi + # These are escaped so that only CFLAGS is picked up at configure time. + # The other values will be substituted at make time. + CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" + if test "${SHARED_BUILD}" = "1" ; then + CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1820: checking how to run the C preprocessor" >&5 +echo "configure:1826: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1831,13 +1837,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1847: \"$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 : @@ -1848,13 +1854,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1864: \"$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 : @@ -1865,13 +1871,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1881: \"$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 : @@ -1904,7 +1910,7 @@ echo "$ac_t""$CPP" 1>&6 # Step 0: Enable 64 bit support? echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6 -echo "configure:1908: checking if 64bit support is enabled" >&5 +echo "configure:1914: checking if 64bit support is enabled" >&5 # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then enableval="$enable_64bit" @@ -1918,7 +1924,7 @@ fi # Step 0.b: Enable Solaris 64 bit VIS support? echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:1922: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:1928: checking if 64bit Sparc VIS support is requested" >&5 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then enableval="$enable_64bit_vis" @@ -1934,34 +1940,12 @@ fi do64bit=yes fi - # Step 0.c: Enable memory debugging? (TCL_MEM_DEBUG) - - echo $ac_n "checking if memory debugging is requested""... $ac_c" 1>&6 -echo "configure:1941: checking if memory debugging is requested" >&5 - # Check whether --enable-memdebug or --disable-memdebug was given. -if test "${enable_memdebug+set}" = set; then - enableval="$enable_memdebug" - doMemDebug=$enableval -else - doMemDebug=no -fi - - if test "$doMemDebug" = "yes"; then - cat >> confdefs.h <<\EOF -#define TCL_MEM_DEBUG 1 -EOF - - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no" 1>&6 - fi - # Step 1: set the variable "system" to hold the name and version number # for the system. This can usually be done via the "uname" command, but # there are a few systems, like Next, where this doesn't work. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -echo "configure:1965: checking system version (for dynamic loading)" >&5 +echo "configure:1949: checking system version (for dynamic loading)" >&5 if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else @@ -1990,7 +1974,7 @@ echo "configure:1965: checking system version (for dynamic loading)" >&5 # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1994: checking for dlopen in -ldl" >&5 +echo "configure:1978: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1998,7 +1982,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1997: \"$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 @@ -2053,7 +2037,7 @@ fi # 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:2057: checking for $ac_word" >&5 +echo "configure:2041: 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 @@ -2207,7 +2191,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2211: checking for gettimeofday in -lbsd" >&5 +echo "configure:2195: 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 @@ -2215,7 +2199,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2214: \"$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 @@ -2255,14 +2239,17 @@ EOF fi - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then + # Check to enable 64-bit flags for compiler/linker on AIX 4+ + if test "$do64bit" = "yes" -o "`uname -v`" -gt "3" ; 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_LDFLAGS="-b64" fi fi ;; @@ -2305,7 +2292,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2309: checking for shl_load in -ldld" >&5 +echo "configure:2296: 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 @@ -2313,7 +2300,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2315: \"$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 @@ -2348,7 +2335,7 @@ fi if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='{$LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="-Wl,-E" @@ -2384,7 +2371,7 @@ fi HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2388: checking for shl_load in -ldld" >&5 +echo "configure:2375: 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 @@ -2392,7 +2379,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2394: \"$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 @@ -2523,17 +2510,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2527: checking for dld.h" >&5 +echo "configure:2514: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2524: \"$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* @@ -2590,17 +2577,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2594: checking for dld.h" >&5 +echo "configure:2581: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2591: \"$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* @@ -2655,17 +2642,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:2659: checking for dlfcn.h" >&5 +echo "configure:2646: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2656: \"$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* @@ -2692,9 +2679,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:2696: checking for ELF" >&5 +echo "configure:2683: checking for ELF" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3033: checking for ld accepts -Bexport flag" >&5 +echo "configure:3020: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -3085,9 +3072,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:3089: checking sys/exec.h" >&5 +echo "configure:3076: checking sys/exec.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3105,7 +3092,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3123,9 +3110,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3127: checking a.out.h" >&5 +echo "configure:3114: checking a.out.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3143,7 +3130,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3161,9 +3148,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3165: checking sys/exec_aout.h" >&5 +echo "configure:3152: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3181,7 +3168,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3304,7 +3291,7 @@ fi fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3308: checking for build with symbols" >&5 +echo "configure:3295: 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" @@ -3313,30 +3300,40 @@ else tcl_ok=no fi - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' - LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' - DBGX=${tcl_dbgx} - TCL_DBGX=${tcl_dbgx} - echo "$ac_t""yes" 1>&6 - else + if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" TCL_DBGX="" echo "$ac_t""no" 1>&6 + else + CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' + LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' + DBGX=${tcl_dbgx} + TCL_DBGX=${tcl_dbgx} + if test "$tcl_ok" = "yes"; then + echo "$ac_t""yes (standard debugging)" 1>&6 + fi fi + if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then + cat >> confdefs.h <<\EOF +#define TCL_MEM_DEBUG 1 +EOF -if test "${SHARED_BUILD}" = "1" ; then - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' -else - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' -fi + fi + + if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then + if test "$tcl_ok" = "all"; then + echo "$ac_t""enabled symbols mem debugging" 1>&6 + else + echo "$ac_t""enabled $tcl_ok debugging" 1>&6 + fi + fi cat >> confdefs.h <<\EOF @@ -3405,7 +3402,7 @@ EOF echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:3409: checking for tclsh" >&5 +echo "configure:3406: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3615,6 +3612,7 @@ s%@OBJEXT@%$OBJEXT%g s%@TCL_INCLUDES@%$TCL_INCLUDES%g s%@CLEANFILES@%$CLEANFILES%g s%@TCL_THREADS@%$TCL_THREADS%g +s%@SHARED_BUILD@%$SHARED_BUILD%g s%@AR@%$AR%g s%@CPP@%$CPP%g s%@DL_LIBS@%$DL_LIBS%g @@ -3632,7 +3630,6 @@ s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g s%@TCL_DBGX@%$TCL_DBGX%g s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g -s%@SHARED_BUILD@%$SHARED_BUILD%g s%@MAKE_LIB@%$MAKE_LIB%g s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g diff --git a/configure.in b/configure.in index 837f4a3..a58fc5f 100644 --- a/configure.in +++ b/configure.in @@ -88,13 +88,6 @@ TEA_CONFIG_CFLAGS TEA_ENABLE_SYMBOLS -if test "${SHARED_BUILD}" = "1" ; then - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' -else - CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' -fi -AC_SUBST(SHARED_BUILD) - AC_DEFINE(USE_TCL_STUBS) TEA_MAKE_LIB diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4 index 94cb390..01d318e 100644 --- a/tclconfig/tcl.m4 +++ b/tclconfig/tcl.m4 @@ -393,6 +393,14 @@ AC_DEFUN(TEA_ENABLE_SHARED, [ SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD) fi + + # These are escaped so that only CFLAGS is picked up at configure time. + # The other values will be substituted at make time. + CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}" + if test "${SHARED_BUILD}" = "1" ; then + CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}" + fi + AC_SUBST(SHARED_BUILD) ]) #------------------------------------------------------------------------ @@ -508,6 +516,7 @@ AC_DEFUN(TEA_ENABLE_THREADS, [ # TEA_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used +# Memory (TCL_MEM_DEBUG) debugging can also be enabled. # # Arguments: # none @@ -546,23 +555,37 @@ AC_DEFUN(TEA_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]) - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' - LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' - DBGX=${tcl_dbgx} - TCL_DBGX=${tcl_dbgx} - AC_MSG_RESULT([yes]) - else + if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" TCL_DBGX="" AC_MSG_RESULT([no]) + else + CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' + LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' + DBGX=${tcl_dbgx} + TCL_DBGX=${tcl_dbgx} + if test "$tcl_ok" = "yes"; then + AC_MSG_RESULT([yes (standard debugging)]) + fi fi AC_SUBST(TCL_DBGX) AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) + + if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then + AC_DEFINE(TCL_MEM_DEBUG) + fi + + if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then + if test "$tcl_ok" = "all"; then + AC_MSG_RESULT([enabled symbols mem debugging]) + else + AC_MSG_RESULT([enabled $tcl_ok debugging]) + fi + fi ]) #------------------------------------------------------------------------ @@ -690,7 +713,7 @@ AC_DEFUN(TEA_ENABLE_LANGINFO, [ # # STLIB_LD # SHLIB_LD -# SHLIB_CFAGS +# SHLIB_CFLAGS # SHLIB_LDFLAGS # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE @@ -719,17 +742,6 @@ AC_DEFUN(TEA_CONFIG_CFLAGS, [ do64bit=yes fi - # Step 0.c: Enable memory debugging? (TCL_MEM_DEBUG) - - AC_MSG_CHECKING([if memory debugging is requested]) - AC_ARG_ENABLE(memdebug, [ --enable-memdebug build with memory debugging [--disable-memdebug]], [doMemDebug=$enableval], [doMemDebug=no]) - if test "$doMemDebug" = "yes"; then - AC_DEFINE(TCL_MEM_DEBUG) - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - # Step 1: set the variable "system" to hold the name and version number # for the system. This can usually be done via the "uname" command, but # there are a few systems, like Next, where this doesn't work. @@ -919,14 +931,17 @@ dnl AC_CHECK_TOOL(AR, ar, :) AC_DEFINE(USE_DELTA_FOR_TZ) fi - # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes" ; then + # Check to enable 64-bit flags for compiler/linker on AIX 4+ + if test "$do64bit" = "yes" -o "`uname -v`" -gt "3" ; 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_LDFLAGS="-b64" fi fi ;; @@ -969,7 +984,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" - SHLIB_LD_LIBS="" + SHLIB_LD_LIBS='{$LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="-Wl,-E" @@ -1880,14 +1895,18 @@ closedir(d); # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # +# This should be called after TEA_CONFIG_CFLAGS as setting the +# LIBS line can confuse some configure macro magic. +# # Arguments: # none # # Results: # -# Sets the the following vars: +# Sets the following vars: # XINCLUDES # XLIBSW +# LIBS (appends to) # #-------------------------------------------------------------------- @@ -2398,7 +2417,7 @@ The PACKAGE variable must be defined by your TEA configure.in]) AC_MSG_RESULT([ok]) TEA_INITED=ok case "`uname -s`" in - *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*|*CYGWIN_ME*|*MINGW32_*) + *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*) AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo) EXEEXT=".exe" TEA_PLATFORM="windows" -- 2.23.0