source: trunk/libs/newlib/src/newlib/libm/configure.in @ 543

Last change on this file since 543 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.0 KB
Line 
1dnl This is the newlib/libm configure.in file.
2dnl Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT([newlib],[NEWLIB_VERSION])
6AC_CONFIG_SRCDIR([libm.texinfo])
7
8AC_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])
15AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue)
16
17dnl Autoconf 2.59 doesn't support the AC_TYPE_LONG_DOUBLE macro. Instead of:
18dnl   AC_TYPE_LONG_DOUBLE
19dnl   AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
20dnl we specify our own long double test.
21AC_CACHE_CHECK([Checking long double support], [acnewlib_cv_type_long_double],[dnl
22cat > conftest.c <<EOF
23int main() {
24long double x = 0.0L;
25return 0;
26}
27EOF
28if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c conftest.c 1>&AS_MESSAGE_LOG_FD])
29then
30  acnewlib_cv_type_long_double=yes
31else
32  acnewlib_cv_type_long_double=no
33fi
34rm -f conftest*])
35AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$acnewlib_cv_type_long_double" = x"yes")
36
37dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
38AC_CONFIG_AUX_DIR(../..)
39
40NEWLIB_CONFIGURE(..)
41
42dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
43dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
44dnl line of the macro which fail because appropriate LDFLAGS are not set.
45_LT_DECL_SED
46_LT_PROG_ECHO_BACKSLASH
47if test "${use_libtool}" = "yes"; then
48AC_LIBTOOL_WIN32_DLL
49AM_PROG_LIBTOOL
50fi
51
52AC_CONFIG_SUBDIRS(machine)
53
54LIBM_MACHINE_LIB=
55if test -n "${libm_machine_dir}"; then
56  if test "${use_libtool}" = "yes"; then
57    LIBM_MACHINE_LIB=machine/${libm_machine_dir}/lib${libm_machine_dir}.${aext}
58  else
59    LIBM_MACHINE_LIB=machine/lib.${aext}
60  fi
61fi
62
63AC_SUBST(LIBM_MACHINE_LIB)
64
65AC_CONFIG_FILES([Makefile math/Makefile mathfp/Makefile common/Makefile complex/Makefile])
66AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.