diff options
author | hobbs <hobbs> | 2002-10-10 07:26:36 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-10-10 07:26:36 (GMT) |
commit | 7e4adcbf1eb38a5473022365dc5dab9e6712b1dd (patch) | |
tree | a1d339bc5609a014510ef371fd0134e9ebad2140 | |
parent | 53620f70e97baed98b6eb26b9130bf33cba6a3a6 (diff) | |
download | tk-7e4adcbf1eb38a5473022365dc5dab9e6712b1dd.zip tk-7e4adcbf1eb38a5473022365dc5dab9e6712b1dd.tar.gz tk-7e4adcbf1eb38a5473022365dc5dab9e6712b1dd.tar.bz2 |
* unix/configure: regen
* unix/tcl.m4: replaced SC_ENABLE_MEMDEBUG with a more intelligent
SC_ENABLE_SYMBOLS that takes yes|no|mem|all as options now.
-rwxr-xr-x | unix/configure | 221 | ||||
-rw-r--r-- | unix/tcl.m4 | 29 |
2 files changed, 143 insertions, 107 deletions
diff --git a/unix/configure b/unix/configure index a96a7f2..b9c245c 100755 --- a/unix/configure +++ b/unix/configure @@ -2986,16 +2986,35 @@ else fi # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' - LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' - DBGX=g - echo "$ac_t""yes" 1>&6 - else + if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" echo "$ac_t""no" 1>&6 + else + CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' + LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' + DBGX=g + 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 + + 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 @@ -3020,12 +3039,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:3024: checking for sin" >&5 +echo "configure:3043: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3029 "configure" +#line 3048 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sin(); below. */ @@ -3048,7 +3067,7 @@ sin(); ; return 0; } EOF -if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -3069,7 +3088,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:3073: checking for main in -lieee" >&5 +echo "configure:3092: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3077,14 +3096,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <<EOF -#line 3081 "configure" +#line 3100 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3107: \"$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 @@ -3115,7 +3134,7 @@ fi libbsd=no if test "`uname -s`" = "AIX" ; then echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:3119: checking for gettimeofday in -lbsd" >&5 +echo "configure:3138: 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 @@ -3123,7 +3142,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 3127 "configure" +#line 3146 "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 @@ -3134,7 +3153,7 @@ int main() { gettimeofday() ; return 0; } EOF -if { (eval echo configure:3138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3157: \"$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 @@ -3165,9 +3184,9 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6 -echo "configure:3169: checking stdlib.h" >&5 +echo "configure:3188: checking stdlib.h" >&5 cat > conftest.$ac_ext <<EOF -#line 3171 "configure" +#line 3190 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3182,7 +3201,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3186 "configure" +#line 3205 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3196,7 +3215,7 @@ fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 3200 "configure" +#line 3219 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3228,16 +3247,16 @@ echo "$ac_t""$tk_ok" 1>&6 #-------------------------------------------------------------------- echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6 -echo "configure:3232: checking fd_set and sys/select" >&5 +echo "configure:3251: checking fd_set and sys/select" >&5 cat > conftest.$ac_ext <<EOF -#line 3234 "configure" +#line 3253 "configure" #include "confdefs.h" #include <sys/types.h> int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:3241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -3249,7 +3268,7 @@ fi rm -f conftest* if test $tk_ok = no; then cat > conftest.$ac_ext <<EOF -#line 3253 "configure" +#line 3272 "configure" #include "confdefs.h" #include <sys/select.h> EOF @@ -3281,12 +3300,12 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3285: checking for ANSI C header files" >&5 +echo "configure:3304: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3290 "configure" +#line 3309 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -3294,7 +3313,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3317: \"$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* @@ -3311,7 +3330,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3315 "configure" +#line 3334 "configure" #include "confdefs.h" #include <string.h> EOF @@ -3329,7 +3348,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3333 "configure" +#line 3352 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3350,7 +3369,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 3354 "configure" +#line 3373 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3361,7 +3380,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3385,12 +3404,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3389: checking for mode_t" >&5 +echo "configure:3408: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3394 "configure" +#line 3413 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3418,12 +3437,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3422: checking for pid_t" >&5 +echo "configure:3441: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3427 "configure" +#line 3446 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3451,12 +3470,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3455: checking for size_t" >&5 +echo "configure:3474: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3460 "configure" +#line 3479 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3484,12 +3503,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3488: checking for uid_t in sys/types.h" >&5 +echo "configure:3507: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3493 "configure" +#line 3512 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -3526,17 +3545,17 @@ for ac_hdr in sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3530: checking for $ac_hdr" >&5 +echo "configure:3549: 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 3535 "configure" +#line 3554 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3559: \"$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* @@ -3563,12 +3582,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3567: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3586: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3572 "configure" +#line 3591 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3577,7 +3596,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3603,16 +3622,16 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:3607: checking pw_gecos in struct pwd" >&5 +echo "configure:3626: checking pw_gecos in struct pwd" >&5 cat > conftest.$ac_ext <<EOF -#line 3609 "configure" +#line 3628 "configure" #include "confdefs.h" #include <pwd.h> int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:3616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tk_ok=yes else @@ -3645,7 +3664,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3649: checking for X" >&5 +echo "configure:3668: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3707,12 +3726,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 3711 "configure" +#line 3730 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3735: \"$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* @@ -3781,14 +3800,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 3785 "configure" +#line 3804 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -3878,12 +3897,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext <<EOF -#line 3882 "configure" +#line 3901 "configure" #include "confdefs.h" #include <X11/XIntrinsic.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3906: \"$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 : @@ -3903,15 +3922,15 @@ rm -f conftest* fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then echo $ac_n "checking for X11 header files""... $ac_c" 1>&6 -echo "configure:3907: checking for X11 header files" >&5 +echo "configure:3926: checking for X11 header files" >&5 XINCLUDES="# no special path needed" cat > conftest.$ac_ext <<EOF -#line 3910 "configure" +#line 3929 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3934: \"$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 : @@ -3947,7 +3966,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:3951: checking for X11 libraries" >&5 +echo "configure:3970: checking for X11 libraries" >&5 XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do @@ -3967,7 +3986,7 @@ echo "configure:3951: checking for X11 libraries" >&5 fi if test "$XLIBSW" = nope ; then echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6 -echo "configure:3971: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:3990: checking for XCreateWindow in -lXwindow" >&5 ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3975,7 +3994,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <<EOF -#line 3979 "configure" +#line 3998 "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 @@ -3986,7 +4005,7 @@ int main() { XCreateWindow() ; return 0; } EOF -if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4009: \"$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 @@ -4071,7 +4090,7 @@ esac #-------------------------------------------------------------------- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:4075: checking for main in -lXbsd" >&5 +echo "configure:4094: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4079,14 +4098,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 4083 "configure" +#line 4102 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4109: \"$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 @@ -4109,12 +4128,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4113: checking for connect" >&5 +echo "configure:4132: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4118 "configure" +#line 4137 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -4137,7 +4156,7 @@ connect(); ; return 0; } EOF -if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4159,7 +4178,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:4163: checking for main in -lsocket" >&5 +echo "configure:4182: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4167,14 +4186,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 4171 "configure" +#line 4190 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4197: \"$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 @@ -4200,12 +4219,12 @@ if test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:4204: checking for accept" >&5 +echo "configure:4223: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4209 "configure" +#line 4228 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char accept(); below. */ @@ -4228,7 +4247,7 @@ accept(); ; return 0; } EOF -if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -4250,12 +4269,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4254: checking for gethostbyname" >&5 +echo "configure:4273: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4259 "configure" +#line 4278 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -4278,7 +4297,7 @@ gethostbyname(); ; return 0; } EOF -if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4296,7 +4315,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:4300: checking for main in -lnsl" >&5 +echo "configure:4319: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4304,14 +4323,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4308 "configure" +#line 4327 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4334: \"$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 @@ -4351,13 +4370,13 @@ LIBS="$LIBS$THREADS_LIBS" if test -d /usr/include/mit ; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6 -echo "configure:4355: checking MIT X libraries" >&5 +echo "configure:4374: checking MIT X libraries" >&5 tk_oldCFlags=$CFLAGS CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" cat > conftest.$ac_ext <<EOF -#line 4361 "configure" +#line 4380 "configure" #include "confdefs.h" #include <X11/Xlib.h> @@ -4368,7 +4387,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -4395,12 +4414,12 @@ fi MATH_LIBS="" echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4399: checking for sin" >&5 +echo "configure:4418: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4404 "configure" +#line 4423 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sin(); below. */ @@ -4423,7 +4442,7 @@ sin(); ; return 0; } EOF -if { (eval echo configure:4427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4444,7 +4463,7 @@ MATH_LIBS="-lm" fi echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6 -echo "configure:4448: checking for main in -lieee" >&5 +echo "configure:4467: checking for main in -lieee" >&5 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4452,14 +4471,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <<EOF -#line 4456 "configure" +#line 4475 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4482: \"$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 @@ -4486,14 +4505,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:4490: checking whether char is unsigned" >&5 +echo "configure:4509: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <<EOF -#line 4497 "configure" +#line 4516 "configure" #include "confdefs.h" #ifdef __CHAR_UNSIGNED__ yes @@ -4515,7 +4534,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 4519 "configure" +#line 4538 "configure" #include "confdefs.h" /* volatile prevents gcc2 from optimizing the test away on sparcs. */ #if !defined(__STDC__) || __STDC__ != 1 @@ -4525,7 +4544,7 @@ main() { volatile char c = 255; exit(c < 0); } EOF -if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -4558,12 +4577,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4562: checking for strtod" >&5 +echo "configure:4581: checking for strtod" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4567 "configure" +#line 4586 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char strtod(); below. */ @@ -4586,7 +4605,7 @@ strtod(); ; return 0; } EOF -if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtod=yes" else @@ -4608,12 +4627,12 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4612: checking for Solaris2.4/Tru64 strtod bugs" >&5 +echo "configure:4631: checking for Solaris2.4/Tru64 strtod bugs" >&5 if test "$cross_compiling" = yes; then tcl_ok=0 else cat > conftest.$ac_ext <<EOF -#line 4617 "configure" +#line 4636 "configure" #include "confdefs.h" extern double strtod(); @@ -4633,7 +4652,7 @@ else exit(0); } EOF -if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then tcl_ok=1 else @@ -4665,7 +4684,7 @@ EOF echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:4669: checking how to build libraries" >&5 +echo "configure:4688: 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" @@ -4986,6 +5005,8 @@ s%@DL_LIBS@%$DL_LIBS%g s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g +s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g +s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g s%@TK_VERSION@%$TK_VERSION%g s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g @@ -5002,8 +5023,6 @@ s%@TK_STUB_FLAGS@%$TK_STUB_FLAGS%g s%@TK_BUILD_EXP_FILE@%$TK_BUILD_EXP_FILE%g s%@TK_EXP_FILE@%$TK_EXP_FILE%g s%@TCL_STUB_FLAGS@%$TCL_STUB_FLAGS%g -s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g -s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g diff --git a/unix/tcl.m4 b/unix/tcl.m4 index aa606b8..a23ebd1 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -448,6 +448,7 @@ AC_DEFUN(SC_ENABLE_THREADS, [ # SC_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used +# Memory (TCL_MEM_DEBUG) debugging can also be enabled. # # Arguments: # none @@ -476,16 +477,32 @@ 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. - if test "$tcl_ok" = "yes"; then - CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' - LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' - DBGX=g - AC_MSG_RESULT([yes]) - else + if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" AC_MSG_RESULT([no]) + else + CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' + LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' + DBGX=g + if test "$tcl_ok" = "yes"; then + AC_MSG_RESULT([yes (standard debugging)]) + fi + fi + 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 ]) |