diff configure.in @ 3131:9c5160c83bd2

[project @ 1998-01-29 04:46:33 by jwe]
author jwe
date Thu, 29 Jan 1998 04:46:36 +0000
parents 02766207b74c
children 292ff0bf484b
line wrap: on
line diff
--- a/configure.in	Sun Jan 25 08:27:25 1998 +0000
+++ b/configure.in	Thu Jan 29 04:46:36 1998 +0000
@@ -21,7 +21,7 @@
 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ### 02111-1307, USA. 
 
-AC_REVISION($Revision: 1.294 $)
+AC_REVISION($Revision: 1.295 $)
 AC_PREREQ(2.9)
 AC_INIT(src/octave.cc)
 AC_CONFIG_HEADER(config.h)
@@ -181,8 +181,6 @@
 
 ### Do special things for g++.
 
-ADD_CXX_WALL=false
-
 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \
   sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
 
@@ -192,24 +190,6 @@
 changequote([,])dnl
     AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave])
   ;;
-changequote(,)dnl
-  2.7.[23456789]* | 2.7.[123456789][0123456789]*)
-changequote([,])dnl
-    if test -z "$EXTERN_CXXFLAGS"; then
-      ADD_CXX_WALL=true
-    fi
-  ;;
-changequote(,)dnl
-  2.[89].* | 2.[123456789][0123456789].*)
-changequote([,])dnl
-    if test -z "$EXTERN_CXXFLAGS"; then
-      ADD_CXX_WALL=true
-    fi
-  ;;
-  *)
-    warn_gxx_only="Octave has only been tested with g++, and I can't find it"
-    AC_MSG_WARN($warn_gxx_only)
-  ;;
 esac
 
 CXX_VERSION=
@@ -230,14 +210,10 @@
 
 ### Do special things for gcc.
 
-ADD_CC_WALL=false
 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \
   sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
 case "$gcc_version" in
   2.*)
-    if test -z "$EXTERN_CFLAGS"; then
-      ADD_CC_WALL=true
-    fi
     if test -z "$LDFLAGS"; then
       LDFLAGS="-g"
       AC_MSG_RESULT([defining LDFLAGS to be $LDFLAGS])
@@ -247,10 +223,6 @@
     warn_gcc_version="gcc version $gcc_version is likely to cause problems"
     AC_MSG_WARN($warn_gcc_version)
   ;;
-  *)
-    warn_gcc_only="Octave has only been tested with gcc, and I can't find it"
-    AC_MSG_WARN($warn_gcc_only)
-  ;;
 esac
 
 CC_VERSION=
@@ -271,35 +243,43 @@
 changequote([,])dnl
     OCTAVE_CC_FLAG(-mieee-fp, [
       ieee_fp_flag=-mieee-fp
-      XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp"])
+      XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp"
+      AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])])
 
     OCTAVE_CXX_FLAG(-mieee-fp, [
       ieee_fp_flag=-mieee-fp
-      XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp"])
+      XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp"
+      AC_MSG_RESULT([adding -mieee-fp to XTRA_CXXFLAGS])])
   ;;
   alpha*-*-*)
     OCTAVE_CC_FLAG(-mieee, [
       ieee_fp_flag=-mieee
-      XTRA_CFLAGS="$XTRA_CFLAGS -mieee"])
+      XTRA_CFLAGS="$XTRA_CFLAGS -mieee"
+      AC_MSG_RESULT([adding -mieee to XTRA_CFLAGS])])
+
     OCTAVE_CXX_FLAG(-mieee, [
       ieee_fp_flag=-mieee
-      XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee"])
+      XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee"
+      AC_MSG_RESULT([adding -mieee to XTRA_CXXFLAGS])])
   ;;
 esac
 
 ### Octave doesn't use run-time type identification or exceptions yet,
 ### so disable them for somewhat faster and smaller code.
 
-OCTAVE_CXX_FLAG(-fno-rtti,
-  [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-rtti"])
+OCTAVE_CXX_FLAG(-fno-rtti, [
+  XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-rtti"
+  AC_MSG_RESULT([adding -fno-rtti to XTRA_CXXFLAGS])])
 
-OCTAVE_CXX_FLAG(-fno-exceptions,
-  [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-exceptions"])
+OCTAVE_CXX_FLAG(-fno-exceptions, [
+  XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-exceptions"
+  AC_MSG_RESULT([adding -fno-exceptions to XTRA_CXXFLAGS])])
 
 ### We do our own template instantiation.
 
-OCTAVE_CXX_FLAG(-fno-implicit-templates,
-  [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates"])
+OCTAVE_CXX_FLAG(-fno-implicit-templates, [
+  XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates"
+  AC_MSG_RESULT([adding -fno-implicit-templates to XTRA_CXXFLAGS])])
 
 AC_SUBST(XTRA_CFLAGS)
 AC_SUBST(XTRA_CXXFLAGS)
@@ -1066,13 +1046,12 @@
 ### Maybe add -Wall to compiler flags now that we're done feature
 ### testing. 
 
-if $ADD_CXX_WALL; then
-  CXXFLAGS="$CXXFLAGS -Wall"
-  AC_MSG_RESULT([adding -Wall to CXXFLAGS])
+if test -z "$EXTERN_CFLAGS"; then
+  OCTAVE_CC_FLAG(-Wall)
 fi
-if $ADD_CC_WALL; then
-  CFLAGS="$CFLAGS -Wall"
-  AC_MSG_RESULT([adding -Wall to CFLAGS])
+
+if test -z "$EXTERN_CXXFLAGS"; then
+  OCTAVE_CXX_FLAG(-Wall)
 fi
 
 ### Someday, maybe include -ansi and even -pedantic in this list...
@@ -1081,36 +1060,22 @@
  -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
  -Wstrict-prototypes -Wwrite-strings"
 
-GXX_PICKY_FLAGS="$GCC_PICKY_FLAGS -fno-nonnull-objects"
+GXX_PICKY_FLAGS="$GCC_PICKY_FLAGS -Weffc++ -Wenum-clash -fno-nonnull-objects"
 
 AC_ARG_ENABLE(picky-flags,
   [  --enable-picky-flags    add picky options to CFLAGS, CXXFLAGS, FFLAGS],
-  [if test "$enableval" = no; then true;
+  [if test "$enableval" = no; then
+     true
    elif test "$enableval" = yes; then
-     if $ADD_CXX_WALL; then
-       CXXFLAGS="$GXX_PICKY_FLAGS $CXXFLAGS"
-       AC_MSG_RESULT([adding picky options to CXXFLAGS])
-     else
-       AC_MSG_WARN([CXX doesn't look like g++ -- not adding picky options])
+     if test -z "$EXTERN_CFLAGS"; then
+       for flag in $GCC_PICKY_FLAGS; do
+	 OCTAVE_CC_FLAG($flag)
+       done
      fi
-     if $ADD_CC_WALL; then
-       CFLAGS="$GCC_PICKY_FLAGS $CFLAGS"
-       AC_MSG_RESULT([adding picky options to CFLAGS])
-     else
-       AC_MSG_WARN([CC doesn't look like gcc -- not adding picky options])
-     fi
-   else
-     if $ADD_CXX_WALL; then
-       CXXFLAGS="$enableval $CXXFLAGS"
-       AC_MSG_RESULT([adding picky options to CXXFLAGS])
-     else
-       AC_MSG_WARN([CXX doesn't look like g++ -- not adding picky options])
-     fi
-     if $ADD_CC_WALL; then
-       CFLAGS="$enableval $CFLAGS"
-       AC_MSG_RESULT([adding picky options to CFLAGS])
-     else
-       AC_MSG_WARN([CC doesn't look like gcc -- not adding picky options])
+     if test -z "$EXTERN_CXXFLAGS"; then
+       for flag in $GXX_PICKY_FLAGS; do
+	 OCTAVE_CXX_FLAG($flag)
+       done
      fi
    fi], [])