[PATCH] newlib: libm: move configure into top-level

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
This kills off the last configure script under libm/ and folds it
into the top newlib configure script.  The vast majority of logic
was already in the top configure script, so move the little that
is left into a libm/acinclude.m4 file.
---
 newlib/Makefile.in                      |     6 +-
 newlib/configure                        |  1171 +-
 newlib/configure.ac                     |     4 +-
 newlib/libm/Makefile.am                 |     3 -
 newlib/libm/Makefile.in                 |   128 +-
 newlib/libm/acinclude.m4                |    33 +
 newlib/libm/aclocal.m4                  |  1178 --
 newlib/libm/common/Makefile.in          |    53 +-
 newlib/libm/complex/Makefile.in         |    53 +-
 newlib/libm/configure                   | 14532 ----------------------
 newlib/libm/configure.ac                |    68 -
 newlib/libm/fenv/Makefile.in            |    53 +-
 newlib/libm/machine/aarch64/Makefile.in |    53 +-
 newlib/libm/machine/arm/Makefile.in     |    53 +-
 newlib/libm/machine/i386/Makefile.in    |    53 +-
 newlib/libm/machine/mips/Makefile.in    |    53 +-
 newlib/libm/machine/nds32/Makefile.in   |    53 +-
 newlib/libm/machine/powerpc/Makefile.in |    53 +-
 newlib/libm/machine/pru/Makefile.in     |    53 +-
 newlib/libm/machine/riscv/Makefile.in   |    53 +-
 newlib/libm/machine/sparc/Makefile.in   |    53 +-
 newlib/libm/machine/spu/Makefile.in     |    53 +-
 newlib/libm/machine/x86_64/Makefile.in  |    53 +-
 newlib/libm/math/Makefile.in            |    53 +-
 newlib/libm/mathfp/Makefile.in          |    53 +-
 25 files changed, 1435 insertions(+), 16536 deletions(-)
 create mode 100644 newlib/libm/acinclude.m4
 delete mode 100644 newlib/libm/aclocal.m4
 delete mode 100755 newlib/libm/configure
 delete mode 100644 newlib/libm/configure.ac

diff --git a/newlib/configure.ac b/newlib/configure.ac
index 2e6a80a5f8b3..dece7d09abe0 100644
--- a/newlib/configure.ac
+++ b/newlib/configure.ac
@@ -286,7 +286,9 @@ AC_ARG_ENABLE(newlib-use-gdtoa,
  fi], [newlib_use_gdtoa=yes])dnl
 
 AM_ENABLE_MULTILIB(, ..)
+AC_NO_EXECUTABLES
 NEWLIB_CONFIGURE(.)
+AC_PROG_CPP
 
 dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
 dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
@@ -323,7 +325,7 @@ fi
 AC_SUBST(CC_FOR_NEWLIB)
 
 AC_CONFIG_SUBDIRS(libc)
-AC_CONFIG_SUBDIRS(libm)
+m4_include([libm/acinclude.m4])
 
 if test -z "${with_multisubdir}"; then
   have_multisubdir=no
diff --git a/newlib/libm/Makefile.am b/newlib/libm/Makefile.am
index 6ea7ec04fb19..ea9f501f85ed 100644
--- a/newlib/libm/Makefile.am
+++ b/newlib/libm/Makefile.am
@@ -35,6 +35,3 @@ libm.a: $(SUBLIBS)
 endif
 
 $(SUBLIBS):
-
-ACLOCAL_AMFLAGS = -I .. -I ../.. -I ../../config
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libm/acinclude.m4 b/newlib/libm/acinclude.m4
new file mode 100644
index 000000000000..25054dc8c178
--- /dev/null
+++ b/newlib/libm/acinclude.m4
@@ -0,0 +1,33 @@
+dnl We have to include these unconditionally since machines might want to use
+dnl AM_CONDITIONAL in their subdirs.
+m4_include([libm/machine/nds32/acinclude.m4])
+
+LIBM_MACHINE_LIB=
+if test -n "${libm_machine_dir}"; then
+  case ${libm_machine_dir} in
+    aarch64) AC_CONFIG_FILES([libm/machine/aarch64/Makefile]) ;;
+    arm) AC_CONFIG_FILES([libm/machine/arm/Makefile]) ;;
+    i386) AC_CONFIG_FILES([libm/machine/i386/Makefile]) ;;
+    nds32) AC_CONFIG_FILES([libm/machine/nds32/Makefile]) ;;
+    pru) AC_CONFIG_FILES([libm/machine/pru/Makefile]) ;;
+    spu) AC_CONFIG_FILES([libm/machine/spu/Makefile]) ;;
+    riscv) AC_CONFIG_FILES([libm/machine/riscv/Makefile]) ;;
+    x86_64) AC_CONFIG_FILES([libm/machine/x86_64/Makefile]) ;;
+    powerpc) AC_CONFIG_FILES([libm/machine/powerpc/Makefile]) ;;
+    sparc) AC_CONFIG_FILES([libm/machine/sparc/Makefile]) ;;
+    mips) AC_CONFIG_FILES([libm/machine/mips/Makefile]) ;;
+    *) AC_MSG_ERROR([unsupported libm_machine_dir "${libm_machine_dir}"]) ;;
+  esac
+
+  LIBM_MACHINE_DIR=machine/${libm_machine_dir}
+  if test "${use_libtool}" = "yes"; then
+    LIBM_MACHINE_LIB=${LIBM_MACHINE_DIR}/lib${libm_machine_dir}.${aext}
+  else
+    LIBM_MACHINE_LIB=${LIBM_MACHINE_DIR}/lib.${aext}
+  fi
+fi
+AM_CONDITIONAL(HAVE_LIBM_MACHINE_DIR, test "x${LIBM_MACHINE_DIR}" != x)
+AC_SUBST(LIBM_MACHINE_DIR)
+AC_SUBST(LIBM_MACHINE_LIB)
+
+AC_CONFIG_FILES([libm/Makefile libm/math/Makefile libm/mathfp/Makefile libm/common/Makefile libm/complex/Makefile libm/fenv/Makefile])
diff --git a/newlib/libm/configure.ac b/newlib/libm/configure.ac
deleted file mode 100644
index a03ea3872bd5..000000000000
--- a/newlib/libm/configure.ac
+++ /dev/null
@@ -1,68 +0,0 @@
-dnl This is the newlib/libm configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT([newlib],[NEWLIB_VERSION])
-AC_CONFIG_SRCDIR([libm.texi])
-
-AC_ARG_ENABLE(newlib_hw_fp,
-[  --enable-newlib-hw-fp    Turn on hardware floating point math],
-[case "${enableval}" in
-   yes) newlib_hw_fp=true ;;
-   no)  newlib_hw_fp=false ;;
-   *) AC_MSG_ERROR(bad value ${enableval} for --enable-newlib-hw-fp) ;;
- esac],[newlib_hw_fp=false])
-AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
-AC_CONFIG_AUX_DIR(../..)
-
-AC_NO_EXECUTABLES
-NEWLIB_CONFIGURE(..)
-AC_PROG_CPP
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-_LT_DECL_SED
-_LT_PROG_ECHO_BACKSLASH
-if test "${use_libtool}" = "yes"; then
-LT_INIT([win32-dll])
-fi
-
-AC_TYPE_LONG_DOUBLE
-AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
-
-dnl We have to include these unconditionally since machines might want to use
-dnl AM_CONDITIONAL in their subdirs.
-m4_include([machine/nds32/acinclude.m4])
-
-LIBM_MACHINE_LIB=
-if test -n "${libm_machine_dir}"; then
-  case ${libm_machine_dir} in
-    aarch64) AC_CONFIG_FILES([machine/aarch64/Makefile]) ;;
-    arm) AC_CONFIG_FILES([machine/arm/Makefile]) ;;
-    i386) AC_CONFIG_FILES([machine/i386/Makefile]) ;;
-    nds32) AC_CONFIG_FILES([machine/nds32/Makefile]) ;;
-    pru) AC_CONFIG_FILES([machine/pru/Makefile]) ;;
-    spu) AC_CONFIG_FILES([machine/spu/Makefile]) ;;
-    riscv) AC_CONFIG_FILES([machine/riscv/Makefile]) ;;
-    x86_64) AC_CONFIG_FILES([machine/x86_64/Makefile]) ;;
-    powerpc) AC_CONFIG_FILES([machine/powerpc/Makefile]) ;;
-    sparc) AC_CONFIG_FILES([machine/sparc/Makefile]) ;;
-    mips) AC_CONFIG_FILES([machine/mips/Makefile]) ;;
-    *) AC_MSG_ERROR([unsupported libm_machine_dir "${libm_machine_dir}"]) ;;
-  esac
-
-  LIBM_MACHINE_DIR=machine/${libm_machine_dir}
-  if test "${use_libtool}" = "yes"; then
-    LIBM_MACHINE_LIB=${LIBM_MACHINE_DIR}/lib${libm_machine_dir}.${aext}
-  else
-    LIBM_MACHINE_LIB=${LIBM_MACHINE_DIR}/lib.${aext}
-  fi
-fi
-AM_CONDITIONAL(HAVE_LIBM_MACHINE_DIR, test "x${LIBM_MACHINE_DIR}" != x)
-AC_SUBST(LIBM_MACHINE_DIR)
-AC_SUBST(LIBM_MACHINE_LIB)
-
-AC_CONFIG_FILES([Makefile math/Makefile mathfp/Makefile common/Makefile complex/Makefile fenv/Makefile])
-AC_OUTPUT
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.