4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-03 13:00:39 +08:00
Mike Frysinger 2e9aa5f56c newlib: update preprocessor configure checks
The nds32 & spu dirs are using compile tests to look for some
preprocessor defines, but we don't need to compile the code,
just preprocess it.  So switch to AC_PREPROC_IFELSE.

The sh dir is using a preprocessor test via grep, but let's
switch it to AC_PREPROC_IFELSE too to be consistent.

This should allow us to drop the uncommon AC_NO_EXECUTABLES call.
2022-01-23 22:35:21 -05:00

30 lines
914 B
Plaintext

dnl This is the newlib/libm/machine/nds32 configure.in file.
dnl Process this file with autoconf to produce a configure script.
AC_INIT([newlib],[NEWLIB_VERSION])
AC_CONFIG_SRCDIR([Makefile.am])
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
AC_CONFIG_AUX_DIR(../../../..)
NEWLIB_CONFIGURE(../../..)
dnl Use builtin macro to detect if FPU extension support is on.
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
[[#if (__NDS32_EXT_FPU_SP__)
# error "Has nds32 FPU SP extension support"
#endif
]])], [has_nds32_fpu_sp="no"], [has_nds32_fpu_sp="yes"])
AM_CONDITIONAL(HAS_NDS32_FPU_SP, test "$has_nds32_fpu_sp" = "yes")
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
[[#if (__NDS32_EXT_FPU_DP__)
# error "Has nds32 FPU DP extension support"
#endif
]])], [has_nds32_fpu_dp="no"], [has_nds32_fpu_dp="yes"])
AM_CONDITIONAL(HAS_NDS32_FPU_DP, test "$has_nds32_fpu_dp" = "yes")
AC_CONFIG_FILES([Makefile])
AC_OUTPUT