Branch: Tag:

2002-12-11

2002-12-11 10:46:02 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

added warnings and notices to config.info using PIKE_MSG_WARN
made --without-copts only remove -O* optimizations
added warning to --with-valgrind about using --without-copts too

Rev: src/configure.in:1.657

1: - AC_REVISION("$Id: configure.in,v 1.656 2002/12/10 10:20:41 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.657 2002/12/11 10:46:02 mirar Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)    -  + rm -f config.warnings 2>/dev/null +    if test "0`echo 'if(AC_ACVERSION >= 2.50)1'|bc`" = "01"; then -  AC_MSG_WARN([configure script has been generated with autoconf 2.50 or later.]) +  PIKE_MSG_WARN([configure script has been generated with autoconf 2.50 or later.])    if test "x$cache_file" = "x/dev/null"; then    cache_file=./config.cache    if test -r "$cache_file"; then
23:    *)    oldsrcdir="$srcdir"    srcdir="`cd \"$srcdir\";pwd`" -  AC_MSG_WARN([ Converted $oldsrcdir to $srcdir, - If this does not work, please use an absolute path to the configure script. ]) +  AC_MSG_WARN([ + Converted $oldsrcdir to $srcdir, + If this does not work, please use an absolute path to the configure script. + ])    ;;   esac   
34:   if test "x$CONFIG_SHELL" = "x"; then    AC_PATH_PROG(bash_prog, bash, no)    if test "x$ac_cv_path_bash_prog" = "xno"; then :; else -  AC_MSG_WARN([Found bash as $ac_cv_path_bash_prog. +  AC_MSG_WARN([ + Found bash as $ac_cv_path_bash_prog.   Will attempt to restart configure with bash for performance. -  +    If this fails, please set CONFIG_SHELL to /bin/sh before starting configure. -  +    ])    CONFIG_SHELL="$ac_cv_path_bash_prog"    export CONFIG_SHELL
89:      for ac_site_file in $CONFIG_SITE; do    if test -r "$ac_site_file"; then -  AC_MSG_WARN([You are using a site file to initialize configure, please +  PIKE_MSG_WARN([You are using a site file to initialize configure, please   note that this can lead to problems if anything in   $ac_site_file is not correct. If Pike does not compile, or   does not run, please try this to compile Pike again:
102:    [], [enable_binary=yes])      if test "x$enable_binary" = "xno"; then -  AC_MSG_WARN([ +  PIKE_MSG_WARN([      Short-circuiting configure tests for binary building. Only some   targets in the Makefile can be used, typically those that only
114:       if test ! -z "$pike_cv_prog_CC_save" -a ! -z "$CC" -a "$CC" != "$pike_cv_prog_CC_save"    then -  AC_MSG_WARN([CC is different than last time Pike was compiled, +  PIKE_MSG_WARN([CC is different than last time Pike was compiled,    It is probably best to delete ./config.cache before proceeding])    fi   
294:    if test -f "`pwd`/data-segment.$ac_objext"; then    pike_cv_datasegemnt_file="`pwd`/data-segment.$ac_objext"    else -  AC_MSG_WARN(Lost track of data-segment kludge-file.) +  PIKE_MSG_WARN(Lost track of data-segment kludge-file.)    fi    else -  AC_MSG_WARN(Failed to rename data-segment kludge-file.) +  PIKE_MSG_WARN(Failed to rename data-segment kludge-file.)    fi    else -  AC_MSG_WARN(Can not find data-segment kludgefile.) +  PIKE_MSG_WARN(Can not find data-segment kludgefile.)    fi    else -  AC_MSG_WARN(Failed to compile data-segment kludge.) +  PIKE_MSG_WARN(Failed to compile data-segment kludge.)    fi    if test "x$pike_cv_datasegment_file" = "xno"; then -  AC_MSG_WARN(Some tests may yield false results.) +  PIKE_MSG_WARN(Some tests may yield false results.)    else    LIBS="$pike_cv_datasegment_file $LIBS"    export LIBS -  AC_MSG_WARN(Data-segment kludge applied.) +  PIKE_MSG_WARN(Data-segment kludge applied.)    fi    else    AC_MSG_RESULT(yes)
747:    SMARTBUILDCC="${REALCC-cc}"       if echo foo "$CC" | egrep 'rntc.|rnt.cl' >/dev/null; then -  AC_MSG_WARN([rntcc/rntcl/rnticl/rntecl detected.]) +  PIKE_MSG_WARN([rntcc/rntcl/rnticl/rntecl detected.])    AC_PATH_PROGS(SMARTBUILDCC,gcc cc egcs,gcc, $PATH:$EXTRA_PATH)    echo Using $SMARTBUILDCC to compile smartlink.    else    if test "x$ac_cv_prog_cc_cross" = "xyes"; then -  AC_MSG_WARN([Crosscompiler detected.]) +  PIKE_MSG_WARN([Crosscompiler detected.])    AC_PATH_PROGS(SMARTBUILDCC, gcc cc egcs, gcc, /usr/bin:/bin/:/usr/ccs/bin:/usr/local/bin:$PATH:$EXTRA_PATH)    echo Using $SMARTBUILDCC to compile smartlink.    fi
888:    if test "x$gcc_ld_path" = "x"; then :; else    if test -d "$gcc_ld_path/."; then    if "$gcc_ld_path/ld" -v 2>&1 | grep -i GNU >/dev/null; then -  AC_MSG_WARN([GNU ld found on Solaris sparc system ($gcc_ld_path/ld).]) -  AC_MSG_WARN([This may cause the dynamic module support to fail.]) +  PIKE_MSG_WARN([GNU ld found on Solaris sparc system ($gcc_ld_path/ld).]) +  PIKE_MSG_WARN([This may cause the dynamic module support to fail.])    else :; fi    else :; fi    fi
950:    ])    AC_MSG_RESULT($pike_cv_ac_r_sparc_ua32)    if test "$pike_cv_ac_r_sparc_ua32" = "yes"; then -  AC_MSG_WARN([Your gcc/as combo may generate R_SPARC_UA32 relocations.]) -  AC_MSG_WARN([R_SPARC_UA32 relocations are unsupported in Solaris >= 2.3,]) -  AC_MSG_WARN([and have broken support in Solaris 7.]) +  PIKE_MSG_WARN([Your gcc/as combo may generate R_SPARC_UA32 relocations.]) +  PIKE_MSG_WARN([R_SPARC_UA32 relocations are unsupported in Solaris >= 2.3,]) +  PIKE_MSG_WARN([and have broken support in Solaris 7.])       if test "x$with_patch_gcc$with_force_ua32" = "xnono"; then    if test -d "/var/sadm/patch/107058-01/."; then -  AC_MSG_WARN([Back out patch 107058-01, or]) -  AC_MSG_WARN([recompile gcc with a modified config/sparc/sol2.h.]) +  PIKE_MSG_WARN([Back out patch 107058-01, or]) +  PIKE_MSG_WARN([recompile gcc with a modified config/sparc/sol2.h.])    else -  AC_MSG_WARN([Recompile gcc with a modified config/sparc/sol2.h.]) +  PIKE_MSG_WARN([Recompile gcc with a modified config/sparc/sol2.h.])    fi    -  AC_MSG_WARN([]) -  AC_MSG_WARN([You may want to try binary patching gcc.]) -  AC_MSG_WARN([In that case rerun configure with --with-patch-gcc.]) -  AC_MSG_WARN([NOTE: Binary patching is highly experimental and risky,]) -  AC_MSG_WARN([ and may break your existing gcc even more.]) -  AC_MSG_WARN([]) -  AC_MSG_WARN([R_SPARC_UA32 relocations are supported on some versions]) -  AC_MSG_WARN([of Solaris. If you want to try a binary with R_SPARC_UA32]) -  AC_MSG_WARN([relocations, rerun configure with --with-force-ua32.]) -  AC_MSG_WARN([]) +  PIKE_MSG_WARN([]) +  PIKE_MSG_WARN([You may want to try binary patching gcc.]) +  PIKE_MSG_WARN([In that case rerun configure with --with-patch-gcc.]) +  PIKE_MSG_WARN([NOTE: Binary patching is highly experimental and risky,]) +  PIKE_MSG_WARN([ and may break your existing gcc even more.]) +  PIKE_MSG_WARN([]) +  PIKE_MSG_WARN([R_SPARC_UA32 relocations are supported on some versions]) +  PIKE_MSG_WARN([of Solaris. If you want to try a binary with R_SPARC_UA32]) +  PIKE_MSG_WARN([relocations, rerun configure with --with-force-ua32.]) +  PIKE_MSG_WARN([])    exit 1    fi       if test "x$with_patch_gcc" = "xno"; then :; else -  AC_MSG_WARN([Will attempt to patch gcc.]) +  PIKE_MSG_WARN([Will attempt to patch gcc.])       AC_MSG_CHECKING([for cc1])    if test "x$with_patch_gcc" = "xyes"; then
1041:       AC_MSG_RESULT(yes)    -  AC_MSG_WARN(Activating the patched cc1.) -  AC_MSG_WARN(NOTE: Entering critical section.) -  AC_MSG_WARN(If configure fails at this point a broken gcc my result.) +  PIKE_MSG_WARN(Activating the patched cc1.) +  PIKE_MSG_WARN(NOTE: Entering critical section.) +  PIKE_MSG_WARN(If configure fails at this point a broken gcc my result.)    if /usr/bin/mv -f "$cc1" "$cc1.orig"; then    -  AC_MSG_WARN(Moved $cc1 to $cc1.orig.) +  PIKE_MSG_WARN(Moved $cc1 to $cc1.orig.)       if /usr/bin/mv -f "$cc1.patched" "$cc1"; then -  AC_MSG_WARN(Patching seems to have succeeded.) -  AC_MSG_WARN(Please rerun configure.) +  PIKE_MSG_WARN(Patching seems to have succeeded.) +  PIKE_MSG_WARN(Please rerun configure.)    exit 1    fi    -  AC_MSG_WARN(Moving the patched cc1 into place failed.) -  AC_MSG_WARN(Will try to restore the old cc1.) +  PIKE_MSG_WARN(Moving the patched cc1 into place failed.) +  PIKE_MSG_WARN(Will try to restore the old cc1.)       if /usr/bin/mv -f "$cc1.orig" "$cc1"; then -  AC_MSG_WARN(The old cc1 has been restored.) +  PIKE_MSG_WARN(The old cc1 has been restored.)    exit 1    fi   
1106:    with_root=""    ;;    *) -  AC_MSG_WARN([Root path $with_root is not absolute. Ignored.]) +  PIKE_MSG_WARN([Root path $with_root is not absolute. Ignored.])    with_root=""    ;;    esac
1166:    case "$pike_cv_sys_os:$GCC" in    Solaris:no)    # Solaris/cc has problems with combining optimizations and debuginfo. -  AC_MSG_WARN([Defaulting to --without-cdebug since the OS is Solaris, +  PIKE_MSG_WARN([Defaulting to --without-cdebug since the OS is Solaris,   and gcc is not being used.])    with_cdebug=no    ;;
1174:    # HP-UX/cc has problems with combining optimizations and debuginfo.    #    # cc: internal panic 7815: Malloc: underflow detected in free(). (7815) -  AC_MSG_WARN([Defaulting to --without-cdebug since the OS is HP-UX, +  PIKE_MSG_WARN([Defaulting to --without-cdebug since the OS is HP-UX,   and gcc is not being used.])    with_cdebug=no    ;;
1189:    case "x$pike_cv_sys_os" in    xFreeBSD*)    if test "`uname -r|sed -e 's/\([[0-9]]*\).*/\1/'`" -lt 4; then -  AC_MSG_WARN([ +  PIKE_MSG_WARN([   FreeBSD <= 3.x detected, disabling threads.   Use --with-threads to force threads support.   ])
1233:    if test "x$with_valgrind" = "xyes"; then    AC_PATH_PROG(with_valgrind, valgrind, no)    if test "x$with_valgrind" = "xno"; then -  AC_MSG_WARN(valgrind not found, disabled.) +  PIKE_MSG_WARN(valgrind not found, disabled.)    else :; fi    else :; fi   ], [with_valgrind=no])
1251:    # Neither --with-poll nor --without-poll was specified    case "$pike_cv_sys_os" in    Solaris|HP-UX|OSF1|IRIX|Linux|UnixWare|OpenUNIX) -  AC_MSG_WARN([Defaulting to --with-poll since the OS is $pike_cv_sys_os.]) +  PIKE_MSG_WARN([Defaulting to --with-poll since the OS is $pike_cv_sys_os.])    with_poll=yes    ;;    AIX)
1263:    else :; fi    fi    if test "$with_poll" = "yes" ; then -  AC_MSG_WARN([Defaulting to --with-poll since the OS is AIX 4.2 or later.]) +  PIKE_MSG_WARN([Defaulting to --with-poll since the OS is AIX 4.2 or later.])    else :; fi    ;;    esac
1331:    [disable struct pike_type (IGNORED).]))      if test "x$with_pike_type" = "xno"; then -  AC_MSG_WARN([Disabling of USE_PIKE_TYPE is no longer supported.]) +  PIKE_MSG_WARN([Disabling of USE_PIKE_TYPE is no longer supported.])   fi      if test "x$with_oob" = "xno"; then :; else
1368:    # Make valgrind a bit silent by default.    VALGRINDARGS=-q    AC_DEFINE(USE_VALGRIND) +  +  if test "x$with_copt" != "xno"; then +  PIKE_MSG_WARN([--without-copt is advisable when using valgrind!])    fi -  + fi   export VALGRIND VALGRINDARGS   AC_SUBST(VALGRIND)   AC_SUBST(VALGRINDARGS)
1407:   #   if test "x$with_dmalloc" = "x"; then :; else    if test "x$with_rtldebug" = "xyes"; then :; else -  AC_MSG_WARN([Debug malloc requires rtldebug. Enabling rtldebug.]) +  PIKE_MSG_WARN([Debug malloc requires rtldebug. Enabling rtldebug.])    with_rtldebug=yes    fi   fi
1782:    else :; fi       if test x$with_dynamic_modules = xno ; then :; else -  AC_MSG_WARN([Enabling dynamic modules for Win32]) +  PIKE_MSG_WARN([Enabling dynamic modules for Win32])   # EXTRA_MODULE_REQUIREMENTS="${EXTRA_MODULE_REQUIREMENTS} import_functions.h"    EXTRA_OBJS="${EXTRA_OBJS} dlopen.o"    pike_cv_sys_dynamic_loading=yes
2005:   #############################################################################      if test ! -f confdefs.h ; then -  AC_MSG_WARN([Warning, lost confdefs.h, testing will be flawed!! +  PIKE_MSG_WARN([Warning, lost confdefs.h, testing will be flawed!!   You might need to use bash instead of /bin/sh to get correct results.   To do this, please type the following at an sh prompt:    \$ rm ./config.cache
2231:   ])   if test "x$pike_cv___yy_memcpy_count_type" = "xunknown"; then    AC_MSG_RESULT($pike_cv___yy_memcpy_count_type) -  AC_MSG_WARN([Defaulting to unsigned int.]) +  PIKE_MSG_WARN([Defaulting to unsigned int.])    YY_COUNT_TYPE="unsigned int"    YY_FROM_CONST=""   else
2455:      if test "${pike_cv_sys_os}" = "Linux"; then    if test "${ac_cv_lib_m_floor}" = "no"; then -  AC_MSG_WARN(I will compensate for this by adding -lc -lm) +  PIKE_MSG_WARN(I will compensate for this by adding -lc -lm)    LIBS="${LIBS} -lc -lm"    fi   
2477:    ])    AC_MSG_RESULT($pike_cv_broken_sched_h)    if test "$pike_cv_broken_sched_h" = "yes"; then -  AC_MSG_WARN(Applying workaround) +  PIKE_MSG_WARN(Applying workaround)    CPPFLAGS="$CPPFLAGS -D_P=__P"    fi    fi
3631:    ], [ pike_cv_hardware_stack_direction=down    ], [ pike_cv_hardware_stack_direction=up    ], [ -  AC_MSG_WARN([defaulting to down.]) +  PIKE_MSG_WARN([defaulting to down.])    pike_cv_hardware_stack_direction=down    ])   ])
4515:    fi    fi    else -  AC_MSG_WARN([Object file not found.]) +  PIKE_MSG_WARN([Object file not found.])    pike_cv_float_type=not_ieee    fi    else
4568:    fi    fi    else -  AC_MSG_WARN([Object file not found.]) +  PIKE_MSG_WARN([Object file not found.])    pike_cv_float_type=not_ieee    fi    else
4979:    ])    AC_MSG_RESULT($pike_cv_gcc_computed_goto)    if test "x$pike_cv_gcc_computed_goto" = "xyes"; then -  AC_MSG_WARN([Enabling computed goto (EXPERIMENTAL).]) +  PIKE_MSG_WARN([Enabling computed goto (EXPERIMENTAL).])    AC_DEFINE(HAVE_COMPUTED_GOTO)    else :; fi   else :; fi
5982:   # (because otherwise the tests will not be accurate) we have to remove all   # OPTIMIZE flags from the regular CFLAGS...    + OPT_GOT_OFLAG=no   NEW_CFLAGS= -  + OPT_NOT_USED=   for opt in ${CFLAGS-}   do    case " $OPTIMIZE " in    *\ $opt\ *) ;;    *)    case "$opt" in -  -O2|-pipe|-O) OPTIMIZE="${OPTIMIZE-} $opt" ;; -  *) NEW_CFLAGS="$NEW_CFLAGS $opt" ;; +  -O*) +  if test "x$OPT_GOT_OFLAG" = "xno"; then +  # only use the first -O flag (from make.conf etc) +  OPT_GOT_OFLAG=yes +  if test "x$with_copt" != xno; then +  OPTIMIZE="${OPTIMIZE-} $opt" +  else +  OPT_NOT_USED="${OPT_NOT_USED-} $opt" +  fi +  fi +  ;; +  -pipe) +  OPTIMIZE="${OPTIMIZE-} $opt" +  ;; +  *) +  NEW_CFLAGS="$NEW_CFLAGS $opt" +  ;;    esac    ;;    esac   done   CFLAGS="$NEW_CFLAGS"    -  + unset NEW_CFLAGS + unset OPT_GOT_OFLAG +    ############################################################################# - if test "x$with_copt" = xno ; then -  OPTIMIZE= + dnl handled above in the CFLAGS/OPTIMIZE split + dnl if test "x$with_copt" = xno ; then + dnl OPTIMIZE=      dnl The unused code below can be used to implement a good/bad-list   dnl to determine when to zap the -O2 for buggy gccs...
6013:   dnl esac   dnl fi    - fi + dnl fi      #############################################################################   
6130:    with_mmx=no   fi    + if test "x$with_copt" = xno ; then +  opt_reasons=" ($OPT_NOT_USED turned off with --without-copt)" + else +  opt_reasons= + fi +    rm config.info 2>/dev/null      cat >>config.info <<EOF
6167:   shared object... .$SO   libs............ $LIBS   cross-compiled.. $cross_compiling - CPPFLAGS........ $CPPFLAGS - CFLAGS (opt).... $OPTIMIZE - CFLAGS (warn)... $WARN - CFLAGS (misc)... $CFLAGS $OSFLAGS $PROFIL - LDFLAGS......... $LDFLAGS $LINKFORSHARED $EXTRALDFLAGS + CPPFLAGS........$CPPFLAGS + CFLAGS (opt)....$OPTIMIZE$opt_reasons + CFLAGS (warn)...$WARN + CFLAGS (misc)...$CFLAGS $OSFLAGS $PROFIL + LDFLAGS.........$LDFLAGS $LINKFORSHARED $EXTRALDFLAGS + EOF    -  + # insert information about debugging tools here, if they are turned on + if test "x$with_valgrind" != xno ; then +  cat >>config.info <<EOF + valgrind........ yes, using $VALGRIND $VALGRINDARGS + EOF + fi +    features:   PAD_FEATURE([dynamic loading])$pike_cv_sys_dynamic_loading   PAD_FEATURE([threads])$using_threads
6241:   ls -1 pike_*.feature 2>/dev/null | xargs cat | sort >>config.info   ls -1 post_modules/*/pike_*.feature modules/*/pike_*.feature 2>/dev/null | xargs cat | sort >>config.info    + if test -f config.warnings; then +  echo >>config.info +  echo 'Warnings and notes summary:' >>config.info +  cat config.warnings >>config.info + fi +  + echo +    echo "=========================================================" >>config.info      cat config.info