| 1 | dnl Process this file with autoconf to produce a configure script. |
| 2 | |
| 3 | AC_PREREQ(2.59) |
| 4 | AC_INIT |
| 5 | AC_CONFIG_SRCDIR([gold.cc]) |
| 6 | |
| 7 | AC_CANONICAL_TARGET |
| 8 | |
| 9 | AM_INIT_AUTOMAKE(gold, 0.1) |
| 10 | |
| 11 | AM_CONFIG_HEADER(config.h:config.in) |
| 12 | |
| 13 | AC_PROG_CC |
| 14 | AC_PROG_CXX |
| 15 | AC_PROG_YACC |
| 16 | AC_PROG_RANLIB |
| 17 | AC_PROG_INSTALL |
| 18 | ZW_GNU_GETTEXT_SISTER_DIR |
| 19 | AM_PO_SUBDIRS |
| 20 | |
| 21 | AC_C_BIGENDIAN |
| 22 | |
| 23 | AC_EXEEXT |
| 24 | |
| 25 | AM_BINUTILS_WARNINGS |
| 26 | |
| 27 | WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//'` |
| 28 | AC_SUBST(WARN_CXXFLAGS) |
| 29 | |
| 30 | dnl Force support for large files by default. This may need to be |
| 31 | dnl host dependent. If build == host, we can check getconf LFS_CFLAGS. |
| 32 | LFS_CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" |
| 33 | AC_SUBST(LFS_CXXFLAGS) |
| 34 | |
| 35 | AC_LANG_PUSH(C++) |
| 36 | |
| 37 | AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) |
| 38 | AC_CHECK_HEADERS(ext/hash_map ext/hash_set) |
| 39 | |
| 40 | dnl Test whether the compiler can specify a member templates to call. |
| 41 | AC_COMPILE_IFELSE([ |
| 42 | class c { public: template<int i> void fn(); }; |
| 43 | template<int i> void foo(c cv) { cv.fn<i>(); } |
| 44 | template void foo<1>(c cv);], |
| 45 | [AC_DEFINE(HAVE_MEMBER_TEMPLATE_SPECIFICATIONS, [], |
| 46 | [Whether the C++ compiler can call a template member with no arguments])]) |
| 47 | |
| 48 | AC_LANG_POP(C++) |
| 49 | |
| 50 | AM_MAINTAINER_MODE |
| 51 | |
| 52 | AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in) |