configure.ac 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # configure.ac for libdecnumber -*- Autoconf -*-
  2. # Process this file with autoconf to generate a configuration script.
  3. # Copyright (C) 2005-2018 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. MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
  25. AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
  26. AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
  27. AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
  28. # Figure out what compiler warnings we can enable.
  29. # See config/warnings.m4 for details.
  30. ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
  31. -Wmissing-prototypes -Wold-style-definition \
  32. -Wmissing-format-attribute -Wcast-qual])
  33. ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
  34. ACX_PROG_CC_WARNING_OPTS([-fno-lto], [nolto_flags])
  35. # Only enable with --enable-werror-always until existing warnings are
  36. # corrected.
  37. ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
  38. # Checks for header files.
  39. AC_CHECK_HEADERS(ctype.h stddef.h string.h stdio.h)
  40. GCC_HEADER_STDINT(gstdint.h)
  41. # Checks for typedefs, structures, and compiler characteristics.
  42. AC_C_CONST
  43. AC_TYPE_OFF_T
  44. AC_CHECK_SIZEOF(int)
  45. AC_CHECK_SIZEOF(long)
  46. # Checks for library functions.
  47. AC_HEADER_STDC
  48. AC_ARG_ENABLE(maintainer-mode,
  49. [ --enable-maintainer-mode enable rules only needed by maintainers],,
  50. enable_maintainer_mode=no)
  51. if test "x$enable_maintainer_mode" = xno; then
  52. MAINT='#'
  53. else
  54. MAINT=
  55. fi
  56. AC_SUBST(MAINT)
  57. AC_CANONICAL_TARGET
  58. # Default decimal format
  59. # If you change the defaults here, be sure to change them in the GCC directory also
  60. AC_MSG_CHECKING([for decimal floating point])
  61. GCC_AC_ENABLE_DECIMAL_FLOAT([$target])
  62. # Use default_decimal_float for dependency.
  63. enable_decimal_float=$default_decimal_float
  64. # If BID is being used, additional objects should be linked in.
  65. if test x$enable_decimal_float = xbid; then
  66. ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(bid_OBJS)"
  67. else
  68. ADDITIONAL_OBJS=
  69. fi
  70. AC_MSG_RESULT($enable_decimal_float)
  71. AC_SUBST(enable_decimal_float)
  72. AC_SUBST(ADDITIONAL_OBJS)
  73. AC_C_BIGENDIAN
  74. # Enable --enable-host-shared.
  75. AC_ARG_ENABLE(host-shared,
  76. [AS_HELP_STRING([--enable-host-shared],
  77. [build host code as shared libraries])],
  78. [PICFLAG=-fPIC], [PICFLAG=])
  79. AC_SUBST(PICFLAG)
  80. # Output.
  81. AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
  82. AC_CONFIG_FILES(Makefile)
  83. AC_OUTPUT