configure.ac 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # configure.ac for libdecnumber -*- Autoconf -*-
  2. # Process this file with autoconf to generate a configuration script.
  3. # Copyright (C) 2005-2022 Free Software Foundation, Inc.
  4. # This file is part of GCC.
  5. # GCC is free software; you can redistribute it and/or modify it under
  6. # the terms of the GNU General Public License as published by the Free
  7. # Software Foundation; either version 3, or (at your option) any
  8. # later #version.
  9. # GCC is distributed in the hope that it will be useful, but WITHOUT
  10. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. # License #for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with GCC; see the file COPYING3. If not see
  15. # <http://www.gnu.org/licenses/>.
  16. AC_INIT(libdecnumber, [ ], gcc-bugs@gcc.gnu.org, libdecnumber)
  17. AC_CONFIG_SRCDIR(decNumber.h)
  18. AC_CONFIG_MACRO_DIR(../config)
  19. AC_CONFIG_AUX_DIR(..)
  20. # Checks for programs.
  21. AC_PROG_MAKE_SET
  22. AC_PROG_CC
  23. AC_PROG_RANLIB
  24. AC_CHECK_TOOL(AR, ar)
  25. MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
  26. AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
  27. AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
  28. AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
  29. # Figure out what compiler warnings we can enable.
  30. # See config/warnings.m4 for details.
  31. ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
  32. -Wmissing-prototypes -Wold-style-definition \
  33. -Wmissing-format-attribute -Wcast-qual])
  34. ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
  35. ACX_PROG_CC_WARNING_OPTS([-fno-lto], [nolto_flags])
  36. # Only enable with --enable-werror-always until existing warnings are
  37. # corrected.
  38. ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
  39. # Checks for header files.
  40. AC_CHECK_HEADERS(ctype.h stddef.h string.h stdio.h)
  41. GCC_HEADER_STDINT(gstdint.h)
  42. # Checks for typedefs, structures, and compiler characteristics.
  43. AC_C_CONST
  44. AC_TYPE_OFF_T
  45. AC_CHECK_SIZEOF(int)
  46. AC_CHECK_SIZEOF(long)
  47. # Checks for library functions.
  48. AC_HEADER_STDC
  49. AC_ARG_ENABLE(maintainer-mode,
  50. [ --enable-maintainer-mode enable rules only needed by maintainers],,
  51. enable_maintainer_mode=no)
  52. if test "x$enable_maintainer_mode" = xno; then
  53. MAINT='#'
  54. else
  55. MAINT=
  56. fi
  57. AC_SUBST(MAINT)
  58. AC_CANONICAL_TARGET
  59. # Default decimal format
  60. # If you change the defaults here, be sure to change them in the GCC directory also
  61. AC_MSG_CHECKING([for decimal floating point])
  62. GCC_AC_ENABLE_DECIMAL_FLOAT([$target])
  63. # Use default_decimal_float for dependency.
  64. enable_decimal_float=$default_decimal_float
  65. # If BID is being used, additional objects should be linked in.
  66. if test x$enable_decimal_float = xbid; then
  67. ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(bid_OBJS)"
  68. else
  69. ADDITIONAL_OBJS=
  70. fi
  71. AC_MSG_RESULT($enable_decimal_float)
  72. AC_SUBST(enable_decimal_float)
  73. AC_SUBST(ADDITIONAL_OBJS)
  74. AC_C_BIGENDIAN
  75. # Enable --enable-host-shared.
  76. AC_ARG_ENABLE(host-shared,
  77. [AS_HELP_STRING([--enable-host-shared],
  78. [build host code as shared libraries])],
  79. [PICFLAG=-fPIC], [PICFLAG=])
  80. AC_SUBST(PICFLAG)
  81. # Enable Intel CET on Intel CET enabled host if jit is enabled.
  82. GCC_CET_HOST_FLAGS(CET_HOST_FLAGS)
  83. case x$enable_languages in
  84. *jit*)
  85. ;;
  86. *)
  87. CET_HOST_FLAGS=
  88. ;;
  89. esac
  90. AC_SUBST(CET_HOST_FLAGS)
  91. # Output.
  92. AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
  93. AC_CONFIG_FILES(Makefile)
  94. AC_OUTPUT