comparison configure.in @ 4587:7b957b442818

[project @ 2003-11-10 15:50:39 by jwe]
author jwe
date Mon, 10 Nov 2003 15:50:40 +0000
parents 6f3382e08a52
children 59e180c8cb61
comparison
equal deleted inserted replaced
4586:7e08de0d1a98 4587:7b957b442818
19 ### You should have received a copy of the GNU General Public License 19 ### You should have received a copy of the GNU General Public License
20 ### along with Octave; see the file COPYING. If not, write to the Free 20 ### along with Octave; see the file COPYING. If not, write to the Free
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 ### 02111-1307, USA. 22 ### 02111-1307, USA.
23 23
24 ### Preserve CFLAGS and CXXFLAGS from the environment before doing
25 ### anything else because we don't know which macros might call
26 ### AC_PROG_CC or AC_PROG_CXX.
27
28 EXTERN_CFLAGS="$CFLAGS"
29 EXTERN_CXXFLAGS="$CXXFLAGS"
30
24 AC_INIT 31 AC_INIT
25 AC_REVISION($Revision: 1.435 $) 32 AC_REVISION($Revision: 1.436 $)
26 AC_PREREQ(2.57) 33 AC_PREREQ(2.57)
27 AC_CONFIG_SRCDIR([src/octave.cc]) 34 AC_CONFIG_SRCDIR([src/octave.cc])
28 AC_CONFIG_HEADER(config.h) 35 AC_CONFIG_HEADER(config.h)
29 36
30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) 37 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.])
159 AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) 166 AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function])
160 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) 167 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.])
161 168
162 ### See which C++ compiler to use (we expect to find g++). 169 ### See which C++ compiler to use (we expect to find g++).
163 170
164 EXTERN_CXXFLAGS="$CXXFLAGS"
165
166 AC_PROG_CXX 171 AC_PROG_CXX
167 AC_PROG_CXXCPP 172 AC_PROG_CXXCPP
168 173
169 ### Do special things for g++. 174 ### Do special things for g++.
170 175
190 # code. Currently supported ABIs are GNU v2, GNU v3 and Sun Workshop. 195 # code. Currently supported ABIs are GNU v2, GNU v3 and Sun Workshop.
191 196
192 OCTAVE_CXX_ABI 197 OCTAVE_CXX_ABI
193 198
194 ### See which C compiler to use (we expect to find gcc). 199 ### See which C compiler to use (we expect to find gcc).
195
196 EXTERN_CFLAGS="$CFLAGS"
197 200
198 AC_PROG_CC 201 AC_PROG_CC
199 AC_PROG_CPP 202 AC_PROG_CPP
200 AC_PROG_GCC_TRADITIONAL 203 AC_PROG_GCC_TRADITIONAL
201 204
1273 ;; 1276 ;;
1274 esac 1277 esac
1275 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS]) 1278 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS])
1276 AC_SUBST(UGLY_DEFS) 1279 AC_SUBST(UGLY_DEFS)
1277 1280
1278 ### Maybe add -Wall to compiler flags now that we're done feature 1281 ### Maybe add -Wall and -Wshadow to compiler flags now that we're
1279 ### testing. 1282 ### done feature testing.
1280 1283
1281 if test -z "$EXTERN_CFLAGS"; then 1284 if test -z "$EXTERN_CFLAGS"; then
1282 OCTAVE_CC_FLAG(-Wall) 1285 OCTAVE_CC_FLAG(-Wall)
1286 OCTAVE_CC_FLAG(-Wshadow)
1283 fi 1287 fi
1284 1288
1285 if test -z "$EXTERN_CXXFLAGS"; then 1289 if test -z "$EXTERN_CXXFLAGS"; then
1286 OCTAVE_CXX_FLAG(-Wall) 1290 OCTAVE_CXX_FLAG(-Wall)
1291 OCTAVE_CXX_FLAG(-Wshadow)
1287 fi 1292 fi
1288 1293
1289 ### Someday, maybe include -ansi and even -pedantic in this list... 1294 ### Someday, maybe include -ansi and even -pedantic in this list...
1290 1295
1291 GCC_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wid-clash-31 \ 1296 GCC_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wid-clash-31 \