OSDN Git Service

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