comparison configure.in @ 3126:0f6ec7b761a6

[project @ 1998-01-16 05:15:43 by jwe]
author jwe
date Fri, 16 Jan 1998 05:15:44 +0000
parents 38684be52a3e
children d6ebd123170a
comparison
equal deleted inserted replaced
3125:dcc6c985d72d 3126:0f6ec7b761a6
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 AC_REVISION($Revision: 1.291 $) 24 AC_REVISION($Revision: 1.292 $)
25 AC_PREREQ(2.9) 25 AC_PREREQ(2.9)
26 AC_INIT(src/octave.cc) 26 AC_INIT(src/octave.cc)
27 AC_CONFIG_HEADER(config.h) 27 AC_CONFIG_HEADER(config.h)
28 28
29 AC_DEFINE(OCTAVE_SOURCE, 1) 29 AC_DEFINE(OCTAVE_SOURCE, 1)
180 AC_PROG_CXXCPP 180 AC_PROG_CXXCPP
181 181
182 ### Do special things for g++. 182 ### Do special things for g++.
183 183
184 ADD_CXX_WALL=false 184 ADD_CXX_WALL=false
185 NO_IMPLICIT_TEMPLATES=
186 185
187 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ 186 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \
188 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` 187 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
189 188
190 case "$gxx_version" in 189 case "$gxx_version" in
197 2.7.[23456789]* | 2.7.[123456789][0123456789]*) 196 2.7.[23456789]* | 2.7.[123456789][0123456789]*)
198 changequote([,])dnl 197 changequote([,])dnl
199 if test -z "$EXTERN_CXXFLAGS"; then 198 if test -z "$EXTERN_CXXFLAGS"; then
200 ADD_CXX_WALL=true 199 ADD_CXX_WALL=true
201 fi 200 fi
202 NO_IMPLICIT_TEMPLATES="-fno-implicit-templates"
203 AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES])
204 ;; 201 ;;
205 changequote(,)dnl 202 changequote(,)dnl
206 2.[89].* | 2.[123456789][0123456789].*) 203 2.[89].* | 2.[123456789][0123456789].*)
207 changequote([,])dnl 204 changequote([,])dnl
208 if test -z "$EXTERN_CXXFLAGS"; then 205 if test -z "$EXTERN_CXXFLAGS"; then
209 ADD_CXX_WALL=true 206 ADD_CXX_WALL=true
210 fi 207 fi
211 NO_IMPLICIT_TEMPLATES="-fno-implicit-templates"
212 AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES])
213 ;; 208 ;;
214 *) 209 *)
215 warn_gxx_only="Octave has only been tested with g++, and I can't find it" 210 warn_gxx_only="Octave has only been tested with g++, and I can't find it"
216 AC_MSG_WARN($warn_gxx_only) 211 AC_MSG_WARN($warn_gxx_only)
217 ;; 212 ;;
220 CXX_VERSION= 215 CXX_VERSION=
221 if test -n "$gxx_version"; then 216 if test -n "$gxx_version"; then
222 CXX_VERSION="$gxx_version" 217 CXX_VERSION="$gxx_version"
223 fi 218 fi
224 AC_SUBST(CXX_VERSION) 219 AC_SUBST(CXX_VERSION)
225
226 AC_SUBST(HOST_CXXFLAGS)
227 AC_SUBST(NO_IMPLICIT_TEMPLATES)
228 220
229 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL 221 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL
230 222
231 ### See which C compiler to use (we expect to find gcc). 223 ### See which C compiler to use (we expect to find gcc).
232 224
268 AC_SUBST(CC_VERSION) 260 AC_SUBST(CC_VERSION)
269 261
270 ### On Intel systems with gcc, we may need to compile with -mieee-fp to 262 ### On Intel systems with gcc, we may need to compile with -mieee-fp to
271 ### get full support for IEEE floating point. 263 ### get full support for IEEE floating point.
272 ### 264 ###
273 ### On Alpha/OSF systems, wee need -mieee, but that also 265 ### On Alpha/OSF systems, we need -mieee.
274 ### requires gcc 2.8.x or later. 266
275 267 ieee_fp_flag=
276 GCC_IEEE_FP_FLAG=
277 case "$canonical_host_type" in 268 case "$canonical_host_type" in
278 changequote(,)dnl 269 changequote(,)dnl
279 i[3456789]86-*-*) 270 i[3456789]86-*-*)
280 changequote([,])dnl 271 changequote([,])dnl
281 XCFLAGS="$CFLAGS" 272 OCTAVE_CC_FLAG(-mieee-fp, [
282 CFLAGS="$CFLAGS -mieee-fp" 273 ieee_fp_flag=-mieee-fp
283 AC_TRY_LINK([], [], [GCC_IEEE_FP_FLAG="-mieee-fp"], []) 274 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp"])
284 CFLAGS="$XCFLAGS" 275
285 ;; 276 OCTAVE_CXX_FLAG(-mieee-fp, [
286 alpha-dec-osf*) 277 ieee_fp_flag=-mieee-fp
287 case "$gcc_version" in 278 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp"])
288 changequote(,)dnl 279 ;;
289 1.* | 2.[01234567].*) 280 alpha-*-*)
290 changequote([,])dnl 281 OCTAVE_CC_FLAG(-mieee, [
291 ;; 282 ieee_fp_flag=-mieee
292 *) 283 XTRA_CFLAGS="$XTRA_CFLAGS -mieee"])
293 GCC_IEEE_FP_FLAG="-mieee" 284 OCTAVE_CXX_FLAG(-mieee, [
294 ;; 285 ieee_fp_flag=-mieee
295 esac 286 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee"])
296 ;; 287 ;;
297 esac 288 esac
298 if test -n "$GCC_IEEE_FP_FLAG"; then 289
299 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) 290 ### Octave doesn't use exceptions yet, so disable them for somewhat
300 fi 291 ### faster and smaller code.
301 AC_SUBST(GCC_IEEE_FP_FLAG) 292
293 OCTAVE_CXX_FLAG(-fno-exceptions,
294 [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-exceptions"])
295
296 ### We do our own template instantiation.
297
298 OCTAVE_CXX_FLAG(-fno-implicit-templates,
299 [XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates"])
300
301 AC_SUBST(XTRA_CFLAGS)
302 AC_SUBST(XTRA_CXXFLAGS)
302 303
303 ### Use -static if compiling on Alpha OSF/1 1.3 systems. 304 ### Use -static if compiling on Alpha OSF/1 1.3 systems.
304 305
305 case "$canonical_host_type" in 306 case "$canonical_host_type" in
306 alpha-dec-osf1.3) 307 alpha-dec-osf1.3)
400 fi 401 fi
401 if test -z "$FFLAGS"; then 402 if test -z "$FFLAGS"; then
402 FFLAGS="-O" 403 FFLAGS="-O"
403 fi 404 fi
404 case "$canonical_host_type" in 405 case "$canonical_host_type" in
405 alpha-dec-osf*) 406 alpha-*-*)
406 if $f77_is_g77 || test -z "$GCC_IEEE_FP_FLAG"; then 407 if $f77_is_g77 || test -z "$ieee_fp_flag" ; then
407 true 408 true
408 else 409 else
409 FFLAGS="-fpe1 $FFLAGS" 410 FFLAGS="-fpe1 $FFLAGS"
410 fi 411 fi
411 ;; 412 ;;
855 dnl fails, we try again by including math.h and invoking the function 856 dnl fails, we try again by including math.h and invoking the function
856 dnl with an argument. 857 dnl with an argument.
857 858
858 ### Check to see if we have IEEE math functions, and if so, which ones. 859 ### Check to see if we have IEEE math functions, and if so, which ones.
859 ### 860 ###
860 ### For Linux: add -mieee-fp flag to CFLAGS when checking for IEEE FP
861 ### functions, otherwise we may not find them.
862 ###
863 ### Also check for some additional trig functions that aren't ANSI but 861 ### Also check for some additional trig functions that aren't ANSI but
864 ### are often available. If they are missing, we try to replace them 862 ### are often available. If they are missing, we try to replace them
865 ### with functions from the BSD/NET2 math library. 863 ### with functions from the BSD/NET2 math library.
866 864
867 AC_CHECK_LIB(sunmath, quiet_nan, , , -lm) 865 AC_CHECK_LIB(sunmath, quiet_nan, , , -lm)
874 ;; 872 ;;
875 *) 873 *)
876 AC_CHECK_LIB(m, sin) 874 AC_CHECK_LIB(m, sin)
877 ;; 875 ;;
878 esac 876 esac
879
880 XCFLAGS="$CFLAGS"
881 CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG"
882 877
883 ### I am told that Inf and NaN don't work on m68k HP sytems, and that 878 ### I am told that Inf and NaN don't work on m68k HP sytems, and that
884 ### on SCO systems, isnan and isinf don't work, but they can be 879 ### on SCO systems, isnan and isinf don't work, but they can be
885 ### replaced by something that does. 880 ### replaced by something that does.
886 881
901 esac 896 esac
902 897
903 ### Check for nonstandard but common math functions that we need. 898 ### Check for nonstandard but common math functions that we need.
904 899
905 AC_CHECK_FUNCS(acosh asinh atanh erf erfc gamma lgamma) 900 AC_CHECK_FUNCS(acosh asinh atanh erf erfc gamma lgamma)
906
907 CFLAGS="$XCFLAGS"
908 901
909 ### Checks for OS specific cruft. 902 ### Checks for OS specific cruft.
910 903
911 AC_STRUCT_ST_BLKSIZE 904 AC_STRUCT_ST_BLKSIZE
912 AC_STRUCT_ST_BLOCKS 905 AC_STRUCT_ST_BLOCKS
1207 libcruft/specfun/Makefile libcruft/slatec-fn/Makefile 1200 libcruft/specfun/Makefile libcruft/slatec-fn/Makefile
1208 libcruft/slatec-err/Makefile libcruft/villad/Makefile) 1201 libcruft/slatec-err/Makefile libcruft/villad/Makefile)
1209 1202
1210 ### Print a summary so that important information isn't missed. 1203 ### Print a summary so that important information isn't missed.
1211 1204
1212 CXX_EXTRAS="$HOST_CXXFLAGS $NO_IMPLICIT_TEMPLATES $GCC_IEEE_FP_FLAG"
1213
1214 if test -z "$F77"; then 1205 if test -z "$F77"; then
1215 FORT="$F2C $F2CFLAGS" 1206 FORT="$F2C $F2CFLAGS"
1216 else 1207 else
1217 FORT="$F77 $FFLAGS" 1208 FORT="$F77 $FFLAGS"
1218 fi 1209 fi
1221 1212
1222 Octave is now configured for $canonical_host_type 1213 Octave is now configured for $canonical_host_type
1223 1214
1224 Source directory: $srcdir 1215 Source directory: $srcdir
1225 Installation prefix: $prefix 1216 Installation prefix: $prefix
1226 C compiler: $CC $GCC_IEEE_FP_FLAG $CFLAGS 1217 C compiler: $CC $XTRA_CFLAGS $CFLAGS
1227 C++ compiler: $CXX $CXX_EXTRAS $CXXFLAGS 1218 C++ compiler: $CXX $XTRA_CXXFLAGS $CXXFLAGS
1228 Fortran compiler: $FORT 1219 Fortran compiler: $FORT
1229 Fortran libraries: $FLIBS 1220 Fortran libraries: $FLIBS
1230 Use GNU readline: $USE_READLINE 1221 Use GNU readline: $USE_READLINE
1231 Use GNU info reader: $USE_GNU_INFO 1222 Use GNU info reader: $USE_GNU_INFO
1232 Default pager: $DEFAULT_PAGER 1223 Default pager: $DEFAULT_PAGER