OSDN Git Service

2009-04-16 Ken Werner <ken.werner@de.ibm.com>
[pf3gnuchains/pf3gnuchains3x.git] / newlib / libm / configure.in
1 dnl This is the newlib/libm configure.in file.
2 dnl Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.59)
5 AC_INIT([newlib],[NEWLIB_VERSION])
6 AC_CONFIG_SRCDIR([libm.texinfo])
7
8 AC_ARG_ENABLE(newlib_hw_fp,
9 [  --enable-newlib-hw-fp    Turn on hardware floating point math],
10 [case "${enableval}" in
11    yes) newlib_hw_fp=true ;;
12    no)  newlib_hw_fp=false ;;
13    *) AC_MSG_ERROR(bad value ${enableval} for --enable-newlib-hw-fp) ;;
14  esac],[newlib_hw_fp=false])
15 AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue)
16
17 dnl Autoconf 2.59 doesn't support the AC_TYPE_LONG_DOUBLE macro. Instead of:
18 dnl   AC_TYPE_LONG_DOUBLE
19 dnl   AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
20 dnl we specify our own long double test.
21 AC_CACHE_CHECK([Checking long double support], [acnewlib_cv_type_long_double],
22   [AC_TRY_COMPILE([], [long double foo = 0.0L;],
23     [acnewlib_cv_type_long_double = yes;],
24     [acnewlib_cv_type_long_double = no;])])
25 AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$acnewlib_cv_type_long_double" = x"yes")
26
27 dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
28 AC_CONFIG_AUX_DIR(../..)
29
30 NEWLIB_CONFIGURE(..)
31
32 dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
33 dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
34 dnl line of the macro which fail because appropriate LDFLAGS are not set.
35 _LT_DECL_SED
36 if test "${use_libtool}" = "yes"; then
37 AC_LIBTOOL_WIN32_DLL
38 AM_PROG_LIBTOOL
39 fi
40
41 AC_CONFIG_SUBDIRS(machine)
42
43 LIBM_MACHINE_LIB=
44 if test -n "${libm_machine_dir}"; then
45   if test "${use_libtool}" = "yes"; then
46     LIBM_MACHINE_LIB=machine/${libm_machine_dir}/lib${libm_machine_dir}.${aext}
47   else
48     LIBM_MACHINE_LIB=machine/lib.${aext}
49   fi
50 fi
51
52 AC_SUBST(LIBM_MACHINE_LIB)
53
54 AC_CONFIG_FILES([Makefile math/Makefile mathfp/Makefile common/Makefile])
55 AC_OUTPUT