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