| 1 | # Process this file with autoconf to produce a configure script, like so:
|
|---|
| 2 | # aclocal && autoconf && autoheader && automake
|
|---|
| 3 |
|
|---|
| 4 | AC_PREREQ(2.13)
|
|---|
| 5 | AC_INIT(src/ios.cc)
|
|---|
| 6 |
|
|---|
| 7 | # This works around the fact that libtool configuration may change LD
|
|---|
| 8 | # for this particular configuration, but some shells, instead of
|
|---|
| 9 | # keeping the changes in LD private, export them just because LD is
|
|---|
| 10 | # exported. Only used at the end of this file.
|
|---|
| 11 | ORIGINAL_LD_FOR_MULTILIBS=$LD
|
|---|
| 12 |
|
|---|
| 13 | PACKAGE=libstdc++
|
|---|
| 14 | AC_SUBST(PACKAGE)
|
|---|
| 15 | # For libtool versioning info, format is CURRENT:REVISION:AGE
|
|---|
| 16 | libtool_VERSION=5:7:0
|
|---|
| 17 | AC_SUBST(libtool_VERSION)
|
|---|
| 18 |
|
|---|
| 19 | GLIBCPP_TOPREL_CONFIGURE
|
|---|
| 20 |
|
|---|
| 21 | # Gets build, host, target, *_vendor, *_cpu, *_os, etc.
|
|---|
| 22 | #
|
|---|
| 23 | # You will slowly go insane if you do not grok the following fact: when
|
|---|
| 24 | # building v3 as part of the compiler, the top-level /target/ becomes the
|
|---|
| 25 | # library's /host/. `configure' then causes --target to default to --host,
|
|---|
| 26 | # exactly like any other package using autoconf. Therefore, 'target' and
|
|---|
| 27 | # 'host' will always be the same. This makes sense both for native and
|
|---|
| 28 | # cross compilers, just think about it for a little while. :-)
|
|---|
| 29 | #
|
|---|
| 30 | # Also, if v3 is being configured as part of a cross compiler, the top-level
|
|---|
| 31 | # configure script will pass the "real" host as $with_cross_host.
|
|---|
| 32 | #
|
|---|
| 33 | # AC 2.5x sets target_alias iff the user specified --target, but we use it
|
|---|
| 34 | # everywhere, so we set it here just to be sure. In AC 2.13
|
|---|
| 35 | # AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
|
|---|
| 36 | AC_CANONICAL_SYSTEM
|
|---|
| 37 | target_alias=${target_alias-$target}
|
|---|
| 38 | AC_SUBST(target_alias)
|
|---|
| 39 |
|
|---|
| 40 | # Runs configure.target, finds CC, CXX and assorted other critical bits.
|
|---|
| 41 | # Must run this before the GLIBCPP_ENABLE_* macros below.
|
|---|
| 42 | GLIBCPP_CONFIGURE(.)
|
|---|
| 43 |
|
|---|
| 44 | AM_INIT_AUTOMAKE($PACKAGE, $gcc_version)
|
|---|
| 45 | AM_CONFIG_HEADER(config.h)
|
|---|
| 46 |
|
|---|
| 47 | AC_LIBTOOL_DLOPEN
|
|---|
| 48 | AM_PROG_LIBTOOL
|
|---|
| 49 | AC_SUBST(enable_shared)
|
|---|
| 50 | AC_SUBST(enable_static)
|
|---|
| 51 |
|
|---|
| 52 | # Check for c++ or library specific bits that don't require linking.
|
|---|
| 53 | #GLIBCPP_CHECK_COMPILER_VERSION
|
|---|
| 54 | GLIBCPP_CHECK_GNU_MAKE
|
|---|
| 55 |
|
|---|
| 56 | # Enable all the variable C++ stuff. C_MBCHAR must come early.
|
|---|
| 57 | GLIBCPP_ENABLE_CSTDIO
|
|---|
| 58 | GLIBCPP_ENABLE_CLOCALE
|
|---|
| 59 | GLIBCPP_ENABLE_CHEADERS([$c_model])
|
|---|
| 60 | GLIBCPP_ENABLE_C_MBCHAR([yes])
|
|---|
| 61 | GLIBCPP_ENABLE_C99([yes])
|
|---|
| 62 | GLIBCPP_ENABLE_LONG_LONG([yes])
|
|---|
| 63 | GLIBCPP_ENABLE_THREADS
|
|---|
| 64 | GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
|
|---|
| 65 | GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
|
|---|
| 66 | GLIBCPP_ENABLE_CONCEPT_CHECKS
|
|---|
| 67 | GLIBCPP_ENABLE_CXX_FLAGS
|
|---|
| 68 | GLIBCPP_ENABLE_DEBUG([no])
|
|---|
| 69 | GLIBCPP_ENABLE_DEBUG_FLAGS([none])
|
|---|
| 70 |
|
|---|
| 71 | # Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
|
|---|
| 72 | AC_CHECK_HEADERS(string.h stdlib.h)
|
|---|
| 73 |
|
|---|
| 74 | # No surprises, no surprises...
|
|---|
| 75 | if test $ATOMICITYH = cpu/generic ; then
|
|---|
| 76 | AC_MSG_WARN([No native atomic operations are provided yet for this platform.])
|
|---|
| 77 | if test $target_thread_file = single; then
|
|---|
| 78 | AC_MSG_WARN([They cannot be faked when thread support is disabled.])
|
|---|
| 79 | AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
|
|---|
| 80 | else
|
|---|
| 81 | AC_MSG_WARN([They will be faked using a mutex.])
|
|---|
| 82 | AC_MSG_WARN([Performance of certain classes will degrade as a result.])
|
|---|
| 83 | fi
|
|---|
| 84 | fi
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 | if test -n "$with_cross_host" || test x"$build" != x"$host"; then
|
|---|
| 88 |
|
|---|
| 89 | # We are being configured with some form of cross compiler.
|
|---|
| 90 | GLIBCPP_IS_CROSS_COMPILING=true
|
|---|
| 91 |
|
|---|
| 92 | # This lets us hard-code the functionality we know we'll have in the cross
|
|---|
| 93 | # target environment. "Let" is a sugar-coated word placed on an especially
|
|---|
| 94 | # dull and tedious hack, actually.
|
|---|
| 95 | #
|
|---|
| 96 | # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
|
|---|
| 97 | # that involve linking, can't be used:
|
|---|
| 98 | # "cannot open sim-crt0.o"
|
|---|
| 99 | # "cannot open crt0.o"
|
|---|
| 100 | # etc. All this is because there currently exists no unified, consistent
|
|---|
| 101 | # way for top level CC information to be passed down to target directories:
|
|---|
| 102 | # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
|
|---|
| 103 | # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
|
|---|
| 104 | # crosses can be removed.
|
|---|
| 105 |
|
|---|
| 106 | # If Canadian cross, then don't pick up tools from the build directory.
|
|---|
| 107 | # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
|
|---|
| 108 | if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
|
|---|
| 109 | CANADIAN=yes
|
|---|
| 110 | else
|
|---|
| 111 | CANADIAN=no
|
|---|
| 112 | fi
|
|---|
| 113 |
|
|---|
| 114 | # Construct crosses by hand, eliminating bits that need ld...
|
|---|
| 115 | # GLIBCPP_CHECK_COMPILER_FEATURES
|
|---|
| 116 | # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
|
|---|
| 117 | # GLIBCPP_CHECK_MATH_SUPPORT
|
|---|
| 118 |
|
|---|
| 119 | case "$target" in
|
|---|
| 120 | *-linux*)
|
|---|
| 121 | os_include_dir="os/gnu-linux"
|
|---|
| 122 | AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
|
|---|
| 123 | machine/endian.h machine/param.h sys/machine.h sys/types.h \
|
|---|
| 124 | fp.h locale.h float.h inttypes.h])
|
|---|
| 125 | SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|---|
| 126 | AC_SUBST(SECTION_FLAGS)
|
|---|
| 127 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 128 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 129 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 130 |
|
|---|
| 131 | # For showmanyc_helper().
|
|---|
| 132 | AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
|
|---|
| 133 | GLIBCPP_CHECK_POLL
|
|---|
| 134 | GLIBCPP_CHECK_S_ISREG_OR_S_IFREG
|
|---|
| 135 |
|
|---|
| 136 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 137 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 138 | AC_DEFINE(HAVE_FINITE)
|
|---|
| 139 | AC_DEFINE(HAVE_FINITEF)
|
|---|
| 140 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 141 | AC_DEFINE(HAVE_HYPOTF)
|
|---|
| 142 | AC_DEFINE(HAVE_ISINF)
|
|---|
| 143 | AC_DEFINE(HAVE_ISINFF)
|
|---|
| 144 | AC_DEFINE(HAVE_ISNAN)
|
|---|
| 145 | AC_DEFINE(HAVE_ISNANF)
|
|---|
| 146 | AC_DEFINE(HAVE_SINCOS)
|
|---|
| 147 | AC_DEFINE(HAVE_SINCOSF)
|
|---|
| 148 | if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|---|
| 149 | AC_DEFINE(HAVE_FINITEL)
|
|---|
| 150 | AC_DEFINE(HAVE_HYPOTL)
|
|---|
| 151 | AC_DEFINE(HAVE_ISINFL)
|
|---|
| 152 | AC_DEFINE(HAVE_ISNANL)
|
|---|
| 153 | fi
|
|---|
| 154 | ;;
|
|---|
| 155 | *-hpux*)
|
|---|
| 156 | # Check for available headers.
|
|---|
| 157 | AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
|
|---|
| 158 | machine/endian.h machine/param.h sys/machine.h sys/types.h \
|
|---|
| 159 | fp.h locale.h float.h inttypes.h])
|
|---|
| 160 | SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|---|
| 161 | AC_SUBST(SECTION_FLAGS)
|
|---|
| 162 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 163 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 164 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 165 | os_include_dir="os/hpux"
|
|---|
| 166 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 167 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 168 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 169 | AC_DEFINE(HAVE_HYPOT)
|
|---|
| 170 | case "$target" in
|
|---|
| 171 | *-hpux10*)
|
|---|
| 172 | AC_DEFINE(HAVE_FINITE)
|
|---|
| 173 | AC_DEFINE(HAVE_FINITEF)
|
|---|
| 174 | AC_DEFINE(HAVE_ISINF)
|
|---|
| 175 | AC_DEFINE(HAVE_ISINFF)
|
|---|
| 176 | AC_DEFINE(HAVE_ISNAN)
|
|---|
| 177 | AC_DEFINE(HAVE_ISNANF)
|
|---|
| 178 | ;;
|
|---|
| 179 | esac
|
|---|
| 180 |
|
|---|
| 181 | ;;
|
|---|
| 182 | *-netbsd*)
|
|---|
| 183 | # Check for available headers.
|
|---|
| 184 | AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
|
|---|
| 185 | machine/endian.h machine/param.h sys/machine.h sys/types.h \
|
|---|
| 186 | fp.h locale.h float.h inttypes.h])
|
|---|
| 187 | SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|---|
| 188 | AC_SUBST(SECTION_FLAGS)
|
|---|
| 189 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 190 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 191 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 192 | os_include_dir="os/bsd/netbsd"
|
|---|
| 193 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 194 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 195 | AC_DEFINE(HAVE_FINITEF)
|
|---|
| 196 | AC_DEFINE(HAVE_FINITE)
|
|---|
| 197 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 198 | AC_DEFINE(HAVE_HYPOTF)
|
|---|
| 199 | AC_DEFINE(HAVE_ISINF)
|
|---|
| 200 | AC_DEFINE(HAVE_ISINFF)
|
|---|
| 201 | AC_DEFINE(HAVE_ISNAN)
|
|---|
| 202 | AC_DEFINE(HAVE_ISNANF)
|
|---|
| 203 | if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|---|
| 204 | AC_DEFINE(HAVE_FINITEL)
|
|---|
| 205 | AC_DEFINE(HAVE_ISINFL)
|
|---|
| 206 | AC_DEFINE(HAVE_ISNANL)
|
|---|
| 207 | fi
|
|---|
| 208 | ;;
|
|---|
| 209 | *-freebsd*)
|
|---|
| 210 | # Check for available headers.
|
|---|
| 211 | AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
|
|---|
| 212 | machine/endian.h machine/param.h sys/machine.h sys/types.h \
|
|---|
| 213 | fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
|
|---|
| 214 | sys/time.h unistd.h])
|
|---|
| 215 | SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|---|
| 216 | AC_SUBST(SECTION_FLAGS)
|
|---|
| 217 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 218 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 219 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 220 | os_include_dir="os/bsd/freebsd"
|
|---|
| 221 | AC_DEFINE(HAVE_LC_MESSAGES)
|
|---|
| 222 | AC_DEFINE(HAVE_DRAND48)
|
|---|
| 223 | AC_DEFINE(HAVE_GETPAGESIZE)
|
|---|
| 224 | AC_DEFINE(HAVE_SETENV)
|
|---|
| 225 | AC_DEFINE(HAVE_SIGSETJMP)
|
|---|
| 226 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 227 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 228 | AC_DEFINE(HAVE_FINITEF)
|
|---|
| 229 | AC_DEFINE(HAVE_FINITE)
|
|---|
| 230 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 231 | AC_DEFINE(HAVE_HYPOT)
|
|---|
| 232 | AC_DEFINE(HAVE_HYPOTF)
|
|---|
| 233 | AC_DEFINE(HAVE_ISINF)
|
|---|
| 234 | AC_DEFINE(HAVE_ISNAN)
|
|---|
| 235 | AC_DEFINE(HAVE_ISNANF)
|
|---|
| 236 | if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|---|
| 237 | AC_DEFINE(HAVE_FINITEL)
|
|---|
| 238 | AC_DEFINE(HAVE_ISINFL)
|
|---|
| 239 | AC_DEFINE(HAVE_ISNANL)
|
|---|
| 240 | fi
|
|---|
| 241 | ;;
|
|---|
| 242 | *-mingw32*)
|
|---|
| 243 | AC_CHECK_HEADERS([sys/types.h locale.h float.h])
|
|---|
| 244 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 245 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 246 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 247 | os_include_dir="os/mingw32"
|
|---|
| 248 | ;;
|
|---|
| 249 | *-windiss*)
|
|---|
| 250 | os_include_dir="os/windiss"
|
|---|
| 251 | ;;
|
|---|
| 252 | changequote(,)dnl
|
|---|
| 253 | *-qnx6.[12]*)
|
|---|
| 254 | changequote([,])dnl
|
|---|
| 255 | SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
|---|
| 256 | AC_SUBST(SECTION_FLAGS)
|
|---|
| 257 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 258 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 259 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 260 | os_include_dir="os/qnx/qnx6.1"
|
|---|
| 261 | AC_DEFINE(HAVE_COSF)
|
|---|
| 262 | AC_DEFINE(HAVE_COSL)
|
|---|
| 263 | AC_DEFINE(HAVE_COSHF)
|
|---|
| 264 | AC_DEFINE(HAVE_COSHL)
|
|---|
| 265 | AC_DEFINE(HAVE_LOGF)
|
|---|
| 266 | AC_DEFINE(HAVE_LOGL)
|
|---|
| 267 | AC_DEFINE(HAVE_LOG10F)
|
|---|
| 268 | AC_DEFINE(HAVE_LOG10L)
|
|---|
| 269 | AC_DEFINE(HAVE_SINF)
|
|---|
| 270 | AC_DEFINE(HAVE_SINL)
|
|---|
| 271 | AC_DEFINE(HAVE_SINHF)
|
|---|
| 272 | AC_DEFINE(HAVE_SINHL)
|
|---|
| 273 | ;;
|
|---|
| 274 | *)
|
|---|
| 275 | os_include_dir="os/newlib"
|
|---|
| 276 | AC_DEFINE(HAVE_HYPOT)
|
|---|
| 277 | ;;
|
|---|
| 278 | esac
|
|---|
| 279 |
|
|---|
| 280 | if test x"$with_newlib" = "xyes"; then
|
|---|
| 281 | os_include_dir="os/newlib"
|
|---|
| 282 | fi
|
|---|
| 283 |
|
|---|
| 284 | case "$target" in
|
|---|
| 285 | *-mingw32*)
|
|---|
| 286 | ;;
|
|---|
| 287 | *-windiss*)
|
|---|
| 288 | AC_DEFINE(HAVE_ACOSF)
|
|---|
| 289 | AC_DEFINE(HAVE_ASINF)
|
|---|
| 290 | AC_DEFINE(HAVE_ATAN2F)
|
|---|
| 291 | AC_DEFINE(HAVE_ATANF)
|
|---|
| 292 | AC_DEFINE(HAVE_CEILF)
|
|---|
| 293 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 294 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 295 | AC_DEFINE(HAVE_COSF)
|
|---|
| 296 | AC_DEFINE(HAVE_COSHF)
|
|---|
| 297 | AC_DEFINE(HAVE_EXPF)
|
|---|
| 298 | AC_DEFINE(HAVE_FABSF)
|
|---|
| 299 | AC_DEFINE(HAVE_FLOORF)
|
|---|
| 300 | AC_DEFINE(HAVE_FMODF)
|
|---|
| 301 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 302 | AC_DEFINE(HAVE_LDEXPF)
|
|---|
| 303 | AC_DEFINE(HAVE_LOG10F)
|
|---|
| 304 | AC_DEFINE(HAVE_LOGF)
|
|---|
| 305 | AC_DEFINE(HAVE_MODFF)
|
|---|
| 306 | AC_DEFINE(HAVE_POWF)
|
|---|
| 307 | AC_DEFINE(HAVE_SINF)
|
|---|
| 308 | AC_DEFINE(HAVE_SINHF)
|
|---|
| 309 | AC_DEFINE(HAVE_SQRTF)
|
|---|
| 310 | AC_DEFINE(HAVE_TANF)
|
|---|
| 311 | AC_DEFINE(HAVE_TANHF)
|
|---|
| 312 | ;;
|
|---|
| 313 | *-freebsd*)
|
|---|
| 314 | # Must replicate generic section since we don't have strtof or strtold.
|
|---|
| 315 | AC_DEFINE(HAVE_MMAP)
|
|---|
| 316 | AC_DEFINE(HAVE_ACOSF)
|
|---|
| 317 | AC_DEFINE(HAVE_ASINF)
|
|---|
| 318 | AC_DEFINE(HAVE_ATAN2F)
|
|---|
| 319 | AC_DEFINE(HAVE_ATANF)
|
|---|
| 320 | AC_DEFINE(HAVE_CEILF)
|
|---|
| 321 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 322 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 323 | AC_DEFINE(HAVE_COSF)
|
|---|
| 324 | AC_DEFINE(HAVE_COSHF)
|
|---|
| 325 | AC_DEFINE(HAVE_EXPF)
|
|---|
| 326 | AC_DEFINE(HAVE_FABSF)
|
|---|
| 327 | AC_DEFINE(HAVE_FLOORF)
|
|---|
| 328 | AC_DEFINE(HAVE_FMODF)
|
|---|
| 329 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 330 | AC_DEFINE(HAVE_LDEXPF)
|
|---|
| 331 | AC_DEFINE(HAVE_LOG10F)
|
|---|
| 332 | AC_DEFINE(HAVE_LOGF)
|
|---|
| 333 | AC_DEFINE(HAVE_MODFF)
|
|---|
| 334 | AC_DEFINE(HAVE_POWF)
|
|---|
| 335 | AC_DEFINE(HAVE_SINF)
|
|---|
| 336 | AC_DEFINE(HAVE_SINHF)
|
|---|
| 337 | AC_DEFINE(HAVE_SQRTF)
|
|---|
| 338 | AC_DEFINE(HAVE_TANF)
|
|---|
| 339 | AC_DEFINE(HAVE_TANHF)
|
|---|
| 340 | ;;
|
|---|
| 341 | *)
|
|---|
| 342 | # GLIBCPP_CHECK_STDLIB_SUPPORT
|
|---|
| 343 | AC_DEFINE(HAVE_STRTOF)
|
|---|
| 344 | AC_DEFINE(HAVE_STRTOLD)
|
|---|
| 345 | # AC_FUNC_MMAP
|
|---|
| 346 | AC_DEFINE(HAVE_MMAP)
|
|---|
| 347 |
|
|---|
| 348 | AC_DEFINE(HAVE_ACOSF)
|
|---|
| 349 | AC_DEFINE(HAVE_ASINF)
|
|---|
| 350 | AC_DEFINE(HAVE_ATAN2F)
|
|---|
| 351 | AC_DEFINE(HAVE_ATANF)
|
|---|
| 352 | AC_DEFINE(HAVE_CEILF)
|
|---|
| 353 | AC_DEFINE(HAVE_COPYSIGN)
|
|---|
| 354 | AC_DEFINE(HAVE_COPYSIGNF)
|
|---|
| 355 | AC_DEFINE(HAVE_COSF)
|
|---|
| 356 | AC_DEFINE(HAVE_COSHF)
|
|---|
| 357 | AC_DEFINE(HAVE_EXPF)
|
|---|
| 358 | AC_DEFINE(HAVE_FABSF)
|
|---|
| 359 | AC_DEFINE(HAVE_FLOORF)
|
|---|
| 360 | AC_DEFINE(HAVE_FMODF)
|
|---|
| 361 | AC_DEFINE(HAVE_FREXPF)
|
|---|
| 362 | AC_DEFINE(HAVE_LDEXPF)
|
|---|
| 363 | AC_DEFINE(HAVE_LOG10F)
|
|---|
| 364 | AC_DEFINE(HAVE_LOGF)
|
|---|
| 365 | AC_DEFINE(HAVE_MODFF)
|
|---|
| 366 | AC_DEFINE(HAVE_POWF)
|
|---|
| 367 | AC_DEFINE(HAVE_SINF)
|
|---|
| 368 | AC_DEFINE(HAVE_SINHF)
|
|---|
| 369 | AC_DEFINE(HAVE_SQRTF)
|
|---|
| 370 | AC_DEFINE(HAVE_TANF)
|
|---|
| 371 | AC_DEFINE(HAVE_TANHF)
|
|---|
| 372 | ;;
|
|---|
| 373 | esac
|
|---|
| 374 |
|
|---|
| 375 | # At some point, we should differentiate between architectures
|
|---|
| 376 | # like x86, which have long double versions, and alpha/powerpc/etc.,
|
|---|
| 377 | # which don't. For the time being, punt.
|
|---|
| 378 | if test x"long_double_math_on_this_cpu" = x"yes"; then
|
|---|
| 379 | AC_DEFINE(HAVE_ACOSL)
|
|---|
| 380 | AC_DEFINE(HAVE_ASINL)
|
|---|
| 381 | AC_DEFINE(HAVE_ATAN2L)
|
|---|
| 382 | AC_DEFINE(HAVE_ATANL)
|
|---|
| 383 | AC_DEFINE(HAVE_CEILL)
|
|---|
| 384 | AC_DEFINE(HAVE_COPYSIGNL)
|
|---|
| 385 | AC_DEFINE(HAVE_COSL)
|
|---|
| 386 | AC_DEFINE(HAVE_COSHL)
|
|---|
| 387 | AC_DEFINE(HAVE_EXPL)
|
|---|
| 388 | AC_DEFINE(HAVE_FABSL)
|
|---|
| 389 | AC_DEFINE(HAVE_FLOORL)
|
|---|
| 390 | AC_DEFINE(HAVE_FMODL)
|
|---|
| 391 | AC_DEFINE(HAVE_FREXPL)
|
|---|
| 392 | AC_DEFINE(HAVE_LDEXPL)
|
|---|
| 393 | AC_DEFINE(HAVE_LOG10L)
|
|---|
| 394 | AC_DEFINE(HAVE_LOGL)
|
|---|
| 395 | AC_DEFINE(HAVE_MODFL)
|
|---|
| 396 | AC_DEFINE(HAVE_POWL)
|
|---|
| 397 | AC_DEFINE(HAVE_SINCOSL)
|
|---|
| 398 | AC_DEFINE(HAVE_SINL)
|
|---|
| 399 | AC_DEFINE(HAVE_SINHL)
|
|---|
| 400 | AC_DEFINE(HAVE_SQRTL)
|
|---|
| 401 | AC_DEFINE(HAVE_TANL)
|
|---|
| 402 | AC_DEFINE(HAVE_TANHL)
|
|---|
| 403 | fi
|
|---|
| 404 |
|
|---|
| 405 | else
|
|---|
| 406 |
|
|---|
| 407 | # We are being configured natively. We can do more elaborate tests
|
|---|
| 408 | # that include AC_TRY_COMPILE now, as the linker is assumed to be
|
|---|
| 409 | # working.
|
|---|
| 410 | GLIBCPP_IS_CROSS_COMPILING=false
|
|---|
| 411 | CANADIAN=no
|
|---|
| 412 |
|
|---|
| 413 | # Check for available headers.
|
|---|
| 414 | AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
|
|---|
| 415 | machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h sys/types.h])
|
|---|
| 416 |
|
|---|
| 417 | GLIBCPP_CHECK_COMPILER_FEATURES
|
|---|
| 418 | GLIBCPP_CHECK_LINKER_FEATURES
|
|---|
| 419 | GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
|
|---|
| 420 | GLIBCPP_CHECK_MATH_SUPPORT
|
|---|
| 421 | GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
|
|---|
| 422 | GLIBCPP_CHECK_WCHAR_T_SUPPORT
|
|---|
| 423 | GLIBCPP_CHECK_STDLIB_SUPPORT
|
|---|
| 424 | GLIBCPP_CHECK_UNISTD_SUPPORT
|
|---|
| 425 |
|
|---|
| 426 | # For showmanyc_helper().
|
|---|
| 427 | AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
|
|---|
| 428 | GLIBCPP_CHECK_POLL
|
|---|
| 429 | GLIBCPP_CHECK_S_ISREG_OR_S_IFREG
|
|---|
| 430 |
|
|---|
| 431 | AC_LC_MESSAGES
|
|---|
| 432 |
|
|---|
| 433 | AC_TRY_COMPILE([
|
|---|
| 434 | #include <setjmp.h>
|
|---|
| 435 | ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
|
|---|
| 436 | [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
|
|---|
| 437 | ])
|
|---|
| 438 |
|
|---|
| 439 | AC_FUNC_MMAP
|
|---|
| 440 |
|
|---|
| 441 | fi
|
|---|
| 442 |
|
|---|
| 443 | # This depends on GLIBCPP_CHECK_LINKER_FEATURES, but without it assumes no.
|
|---|
| 444 | GLIBCPP_ENABLE_SYMVERS([yes])
|
|---|
| 445 |
|
|---|
| 446 | # This depends on GLIBCPP_ENABLE_SYMVERS and GLIBCPP_IS_CROSS_COMPILING.
|
|---|
| 447 | GLIBCPP_CONFIGURE_TESTSUITE
|
|---|
| 448 |
|
|---|
| 449 | # Propagate the target-specific source directories through the build chain.
|
|---|
| 450 | # (Nothing currently uses cpu_include_dir directly; only ATOMICITYH
|
|---|
| 451 | # uses it, and it only gets used in this file.)
|
|---|
| 452 | OS_INC_SRCDIR=config/${os_include_dir}
|
|---|
| 453 | ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
|
|---|
| 454 | AC_SUBST(OS_INC_SRCDIR)
|
|---|
| 455 | AC_SUBST(ATOMICITY_INC_SRCDIR)
|
|---|
| 456 |
|
|---|
| 457 | # Set up cross-compile flags
|
|---|
| 458 | AC_SUBST(GLIBCPP_IS_CROSS_COMPILING) dnl Unused so far.
|
|---|
| 459 | AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
|
|---|
| 460 |
|
|---|
| 461 | AC_CACHE_SAVE
|
|---|
| 462 |
|
|---|
| 463 | if test "${multilib}" = "yes"; then
|
|---|
| 464 | multilib_arg="--enable-multilib"
|
|---|
| 465 | else
|
|---|
| 466 | multilib_arg=
|
|---|
| 467 | fi
|
|---|
| 468 |
|
|---|
| 469 | # Export all the install information
|
|---|
| 470 | GLIBCPP_EXPORT_INSTALL_INFO
|
|---|
| 471 |
|
|---|
| 472 | # Export all the include and flag information to makefiles.
|
|---|
| 473 | GLIBCPP_EXPORT_INCLUDES
|
|---|
| 474 | GLIBCPP_EXPORT_FLAGS
|
|---|
| 475 |
|
|---|
| 476 | if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
|
|---|
| 477 | grep "enable shared" > /dev/null; then
|
|---|
| 478 | LIBSUPCXX_PICFLAGS=-prefer-pic
|
|---|
| 479 | else
|
|---|
| 480 | LIBSUPCXX_PICFLAGS=
|
|---|
| 481 | fi
|
|---|
| 482 | AC_SUBST(LIBSUPCXX_PICFLAGS)
|
|---|
| 483 |
|
|---|
| 484 | # Generate the various Makefiles, include files, and scripts.
|
|---|
| 485 | # NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
|
|---|
| 486 | # libsupc++/Makefile.am and testsuite/Makefile.am so that multilib installs
|
|---|
| 487 | # will end up installed in the correct place. To work around this not being
|
|---|
| 488 | # passed down from config-ml.in -> top_srcdir/Makefile.am ->
|
|---|
| 489 | # top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
|
|---|
| 490 | AC_OUTPUT(Makefile \
|
|---|
| 491 | include/Makefile src/Makefile \
|
|---|
| 492 | libmath/Makefile libio/Makefile libsupc++/Makefile \
|
|---|
| 493 | po/Makefile testsuite/Makefile mkcheck testsuite_flags,
|
|---|
| 494 | [if test -n "$CONFIG_FILES"; then
|
|---|
| 495 | LD="${ORIGINAL_LD_FOR_MULTILIBS}"
|
|---|
| 496 | ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
|
|---|
| 497 | grep '^MULTISUBDIR =' Makefile >> src/Makefile
|
|---|
| 498 | grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
|
|---|
| 499 | grep '^MULTISUBDIR =' Makefile >> testsuite/Makefile
|
|---|
| 500 | fi
|
|---|
| 501 | chmod +x mkcheck
|
|---|
| 502 | chmod +x testsuite_flags
|
|---|
| 503 | ],
|
|---|
| 504 | srcdir=${srcdir}
|
|---|
| 505 | host=${host}
|
|---|
| 506 | target=${target}
|
|---|
| 507 | with_multisubdir=${with_multisubdir}
|
|---|
| 508 | ac_configure_args="${multilib_arg} ${ac_configure_args}"
|
|---|
| 509 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
|---|
| 510 | glibcpp_basedir=${glibcpp_basedir}
|
|---|
| 511 | CC="${CC}"
|
|---|
| 512 | CXX="${CXX}"
|
|---|
| 513 | ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
|
|---|
| 514 | )
|
|---|
| 515 | dnl In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
|
|---|
| 516 | dnl AC_CONFIG_FILES(Makefile \
|
|---|
| 517 | dnl include/Makefile src/Makefile \
|
|---|
| 518 | dnl libmath/Makefile libio/Makefile libsupc++/Makefile \
|
|---|
| 519 | dnl po/Makefile testsuite/Makefile mkcheck testsuite_flags)
|
|---|
| 520 | dnl AC_CONFIG_COMMANDS([default],
|
|---|
| 521 | dnl [if test -n "$CONFIG_FILES"; then
|
|---|
| 522 | dnl ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
|
|---|
| 523 | dnl grep '^MULTISUBDIR =' Makefile >> src/Makefile
|
|---|
| 524 | dnl grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
|
|---|
| 525 | dnl grep '^MULTISUBDIR =' Makefile >> testsuite/Makefile
|
|---|
| 526 | dnl fi
|
|---|
| 527 | dnl chmod +x mkcheck
|
|---|
| 528 | dnl chmod +x testsuite_flags
|
|---|
| 529 | dnl ],
|
|---|
| 530 | dnl srcdir=${srcdir}
|
|---|
| 531 | dnl host=${host}
|
|---|
| 532 | dnl target=${target}
|
|---|
| 533 | dnl with_multisubdir=${with_multisubdir}
|
|---|
| 534 | dnl ac_configure_args="${multilib_arg} ${ac_configure_args}"
|
|---|
| 535 | dnl CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
|---|
| 536 | dnl glibcpp_basedir=${glibcpp_basedir}
|
|---|
| 537 | dnl CC="${CC}"
|
|---|
| 538 | dnl CXX="${CXX}"
|
|---|
| 539 | dnl )
|
|---|
| 540 | dnl AC_OUTPUT
|
|---|
| 541 |
|
|---|
| 542 |
|
|---|
| 543 | # Sanity checking & User-visible messages.
|
|---|
| 544 | # Checks down here, otherwise they get scrolled off before
|
|---|
| 545 | # the user will notice.
|
|---|
| 546 |
|
|---|
| 547 | # Trying to get more people to read documentation. Possibly remove
|
|---|
| 548 | # check and warn all the time. There is no "informational" AC_MSG_
|
|---|
| 549 | # macro, so these are going to be printed even when --quiet/--silent
|
|---|
| 550 | # is given.
|
|---|
| 551 | if test ! -f stamp-sanity-warned; then
|
|---|
| 552 | touch stamp-sanity-warned
|
|---|
| 553 | echo ""
|
|---|
| 554 | echo "Please make certain that you read the installation information here:"
|
|---|
| 555 | echo " faster => ${srcdir}/docs/html/install.html"
|
|---|
| 556 | echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/install.html>"
|
|---|
| 557 | echo ""
|
|---|
| 558 | echo "and the configuration information here:"
|
|---|
| 559 | echo " faster => ${srcdir}/docs/html/configopts.html"
|
|---|
| 560 | echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html>"
|
|---|
| 561 | echo ""
|
|---|
| 562 | echo "before proceeding with ${_cv_gnu_make_command}."
|
|---|
| 563 | echo ""
|
|---|
| 564 | fi
|
|---|