]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/configure.in
Makefile.am (LIBIO_INCLUDES): Set to -I$(top_srcdir)/libio even if GLIBCPP_NEED_LIBIO...
[thirdparty/gcc.git] / libstdc++-v3 / configure.in
CommitLineData
b2dad0e3 1# Process this file with autoconf to produce a configure script, like so:
d94611f1 2# aclocal, autoconf, autoheader, automake
b2dad0e3
BK
3
4AC_PREREQ(2.13)
5AC_INIT(src/complex.cc)
6AC_CONFIG_AUX_DIR(..)
7
8# Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
9AC_CANONICAL_SYSTEM
10
11# We use these options to decide which functions to include.
12AC_ARG_WITH(target-subdir,
13[ --with-target-subdir=SUBDIR
14 configuring in a subdirectory])
15AC_ARG_WITH(cross-host,
16[ --with-cross-host=HOST configuring with a cross compiler])
17
18GLIBCPP_CONFIGURE(.)
19AC_LIBTOOL_DLOPEN
29bd52c8
PE
20GLIBCPP_CHECK_GNU_MAKE
21 if test "x$_cv_gnu_make_command" = "x"; then
99b51359 22 AC_MSG_ERROR([GNU make not found. Please install it or correct your path.])
29bd52c8 23 fi
b2dad0e3
BK
24AM_PROG_LIBTOOL
25AM_CONFIG_HEADER(config.h)
26
27# Check for c++ or library specific bits that don't require linking.
28GLIBCPP_CHECK_COMPILER_VERSION
29GLIBCPP_CHECK_CPU
30
31# Enable all the crazy c++ stuff.
32GLIBCPP_ENABLE_DEBUG
33GLIBCPP_ENABLE_CSTDIO
5b80666b 34GLIBCPP_ENABLE_LONG_LONG(yes)
99246c90 35GLIBCPP_ENABLE_SHADOW(no)
b2dad0e3 36GLIBCPP_ENABLE_THREADS
b2dad0e3 37#GLIBCPP_ENABLE_RELIBGCC([../..])
32a4595e 38GLIBCPP_ENABLE_CXX_FLAGS([none])
b2dad0e3 39
cde28f0d 40
b2dad0e3
BK
41if test -n "$with_cross_host"; then
42
43 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
44 # may not work correctly, because the compiler may not be able to
45 # link executables.
46
47 xcompiling=1
48 NATIVE=no
49 # If Canadian cross, then don't pick up tools from the build
50 # directory.
51 if test "$build" != "$with_cross_host"; then
52 CANADIAN=yes
53 NULL_TARGET=yes
54 else
55 CANADIAN=no
56 NULL_TARGET=no
57 fi
58
59 case "$target_alias" in
60 *-wince-*)
61 # Configure for Microsoft Windows CE, or whatever they are
62 # currently calling it.
63 AC_DEFINE(HAVE_FLOAT_H)
64
65 AC_DEFINE(HAVE__FINITE)
66 AC_DEFINE(HAVE__ISNAN)
67 AC_DEFINE(HAVE__COPYSIGN)
68 AC_DEFINE(HAVE__FPCLASS)
69 AC_DEFINE(HAVE_MODF)
70
71 ctype_include_dir="config/wince"
72 AC_SUBST(ctype_include_dir)
73
74 AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
75
76 AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
77 AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
78 ;;
79 *)
80 # We assume newlib. This lets us hard-code the functions we know
81 # we'll have.
82 AC_DEFINE(HAVE_FINITE)
83 AC_DEFINE(HAVE_ISNAN)
84 AC_DEFINE(HAVE_ISNANF)
85 AC_DEFINE(HAVE_ISINF)
86 AC_DEFINE(HAVE_ISINFF)
87
88 ctype_include_dir="config/newlib"
89 AC_SUBST(ctype_include_dir)
90
91 AC_DEFINE(_GLIBCPP_NEED_MBSTATE_T)
92
93 AC_DEFINE(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
94 AC_DEFINE(_GLIBCPP_BUGGY_COMPLEX)
95 # need to ceck for faster f versions of math functions, ie sinf?
96 ;;
97 esac
98else
99
100 # We are being configured natively. We can do more elaborate tests
101 # that include AC_TRY_COMPILE now, as the linker is assumed to be
102 # working.
103
104 xcompiling=0
105 NATIVE=yes
106 CANADIAN=no
107 NULL_TARGET=no
108
109 # Check for available headers.
110 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
111 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h])
112
c470c17d
BK
113 GLIBCPP_CHECK_COMPILER_FEATURES
114 GLIBCPP_CHECK_LINKER_FEATURES
b2dad0e3
BK
115 GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
116 GLIBCPP_CHECK_MATH_SUPPORT
2f103494
BK
117 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
118 GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT
b2dad0e3
BK
119 GLIBCPP_CHECK_WCHAR_T_SUPPORT
120 GLIBCPP_CHECK_CTYPE
121
122 AC_FUNC_MMAP
123fi
124
125AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
126AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
127AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
128AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
129
130AC_LC_MESSAGES
131
132
b2dad0e3
BK
133if test "${multilib}" = "yes"; then
134 multilib_arg="--enable-multilib"
135else
136 multilib_arg=
137fi
138
139
140# Generate the various Makefiles, include files, and scripts.
141
142# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
143# so that multilib installs will end up installed in the correct
144# place. To work around this not being passed down from config-ml.in
145# -> top_srcdir/Makefile.am -> top_srcdir/src/Makefile.am, manually
146# append it here.
147
148AC_OUTPUT(mkcheck Makefile src/Makefile math/Makefile libio/Makefile,
149[if test -n "$CONFIG_FILES"; then
150 ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
151 grep '^MULTISUBDIR =' Makefile >> src/Makefile
152fi],
153srcdir=${srcdir}
154host=${host}
155target=${target}
156with_multisubdir=${with_multisubdir}
157ac_configure_args="${multilib_arg} ${ac_configure_args}"
158CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
159glibcpp_basedir=${glibcpp_basedir}
160CC="${CC}"
161CXX="${CXX}"
162)
163
164
165blddir=`pwd`
b2dad0e3
BK
166# Generate bits/c++config.h
167# NB: This must be the first generated file as others include it. . .
168AC_OUTPUT_COMMANDS([$srcdir/mkc++config $blddir $srcdir])
169
170# Generate bits/std_limits.h and src/limitsMEMBERS.cc
171AC_OUTPUT_COMMANDS([$srcdir/mknumeric_limits $blddir $srcdir $xcompiling])
29bd52c8
PE
172
173
174# Sanity checking & User-visible messages.
175# Checks down here, otherwise they get scrolled off before
176# the user will notice.
177if test "$enable_namespaces" = "yes" && test "$enable_libgcc_rebuild" = "no"
178then
179 AC_MSG_WARN([libgcc.a will not match mangled symbols unless it is rebuilt])
180fi
181if test "$enable_namespaces" = "no" && test "$enable_libgcc_rebuild" != "no"
182then
183 # Other things besides namespaces can make this true as well, but none
184 # of them are done automatically... yet
185 AC_MSG_WARN([no point in rebuilding libgcc.a if namespaces aren't used])
186fi
187
188# Trying to get more people to read documentation. Possibly remove check
189# and warn all the time.
99b51359
BK
190if test ! -f stamp-sanity-warned; then
191 touch stamp-sanity-warned
29bd52c8
PE
192 # There is no "informational" AC_MSG_ macro, so these are going to be
193 # printed even when --quiet/--silent is given.
194 echo ''
195 echo 'Please make certain that you read the installation information here:'
196 echo " faster => ${srcdir}/docs/install.html"
197 echo ' slower => <URL:http://sources.redhat.com/libstdc++/install.html>'
198 echo ''
199 echo 'and the configuration information here:'
200 echo " faster => ${srcdir}/docs/configopts.html"
201 echo ' slower => <URL:http://sources.redhat.com/libstdc++/configopts.html>'
202 echo ''
203 echo 'before proceeding with "make".'
204 echo ''
205fi
206
207