1 dnl configure.in for libgfor
2 dnl Copyright Free Software Foundation
3 dnl Released under the LGPL
5 dnl The rest of gcc uses autoconf 2.13, but we really need more, hence:
8 AC_INIT([GNU Fortran Runtime Library], 0.2,,[libgfortran])
10 AM_CONFIG_HEADER(config.h)
13 AC_SUBST(enable_shared)
14 AC_SUBST(enable_static)
18 dnl Add -Wall if using gcc
19 if test "x$GCC" = "xyes"; then
20 CFLAGS="$CFLAGS -Wall"
23 # We need gfortran to compile parts of the library
24 # We can't use AC_PROG_F77 because it expects a fully working gfortran.
25 #AC_PROG_F77(gfortran)
28 FFLAGS="$FFLAGS -Wall -fno-repack-arrays -fno-underscoring"
38 AC_HAVE_HEADERS(stdlib.h stdio.h string.h stddef.h math.h unistd.h)
39 AC_CHECK_HEADERS(time.h sys/params.h sys/time.h sys/times.h sys/resource.h)
40 AC_CHECK_HEADER([complex.h],[AC_DEFINE([HAVE_COMPLEX_H], [1], [complex.h exists])])
41 # Check for complex math functions
42 AC_CHECK_LIB([m],[csin],[need_math="no"],[need_math="yes"])
44 # Check for complex math functions in -lmx also
45 AC_CHECK_LIB([mx],[csin],[need_math="no"],[need_math="yes"])
47 dnl Checks for library functions.
48 AC_CHECK_FUNCS(getrusage times)
50 # Let the user override this
52 AC_HELP_STRING([--enable-cmath],[Include complex math functions]),
53 [need_math=$enableval])
54 if test "$need_math" = "yes"; then
55 AC_MSG_NOTICE([Including complex math functions in libgfor]);
56 extra_math_obj='$(gfor_cmath_obj)'
59 AC_SUBST([MATH_OBJ],["$extra_math_obj"])
61 dnl The standard autoconf HAVE_STRUCT_TIMEZONE doesn't actually check
62 dnl for struct timezone, as you might think. We also need to check how
63 dnl to call gettimeofday if we have it.
66 dnl These should be inherited in the recursive make, but ensure they are
70 if test "$RANLIB"; then :
76 dnl Don't pull is system libtool.m4, it conflicts with the gcc version.
77 dnl if test "$LIBTOOL"; then :