]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gold/configure.ac
From Craig Silverstein: correct x86_64 dynamic tags.
[thirdparty/binutils-gdb.git] / gold / configure.ac
CommitLineData
bae7f79e
ILT
1dnl Process this file with autoconf to produce a configure script.
2
3AC_PREREQ(2.59)
4AC_INIT
5AC_CONFIG_SRCDIR([gold.cc])
6
7AC_CANONICAL_TARGET
8
9AM_INIT_AUTOMAKE(gold, 0.1)
10
11AM_CONFIG_HEADER(config.h:config.in)
12
193a53d9
ILT
13AC_ARG_ENABLE([targets],
14[ --enable-targets alternative target configurations],
15[case "${enableval}" in
16 yes | "")
17 AC_MSG_ERROR([--enable-targets option must specify target names or 'all'])
18 ;;
19 no)
20 enable_targets=
21 ;;
22 *)
23 enable_targets=$enableval
24 ;;
25esac],
26[# For now, enable all targets by default
27 enable_targets=all
28])
29
30# Canonicalize the enabled targets.
31if test -n "$enable_targets"; then
32 for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
33 result=`$ac_config_sub $targ 2>/dev/null`
34 if test -n "$result"; then
35 canon_targets="$canon_targets $result"
36 else
37 # Permit unrecognized target names, like "all".
38 canon_targets="$canon_targets $targ"
39 fi
40 done
41fi
42
43# See which specific instantiations we need.
6df6da4a
ILT
44targetobjs=
45all_targets=
193a53d9
ILT
46for targ in $target $canon_targets; do
47 targ_32_little=
48 targ_32_big=
49 targ_64_little=
50 targ_64_big=
51 if test "$targ" = "all"; then
52 targ_32_little=yes
53 targ_32_big=yes
54 targ_64_little=yes
55 targ_64_big=yes
6df6da4a 56 all_targets=yes
193a53d9
ILT
57 else
58 case "$targ" in
6df6da4a
ILT
59 i?86-*)
60 targ_32_little=yes
61 targetobjs="$targetobjs i386.\$(OBJEXT)"
62 ;;
63 x86_64-*)
64 targ_64_little=yes
65 targetobjs="$targetobjs x86_64.\$(OBJEXT)"
66 ;;
193a53d9 67 *)
6df6da4a 68 AC_MSG_ERROR("unsupported target $targ")
193a53d9
ILT
69 ;;
70 esac
71 fi
72done
73
74if test -n "$targ_32_little"; then
75 AC_DEFINE(HAVE_TARGET_32_LITTLE, 1,
76 [Define to support 32-bit little-endian targets])
77fi
78if test -n "$targ_32_big"; then
79 AC_DEFINE(HAVE_TARGET_32_BIG, 1,
80 [Define to support 32-bit big-endian targets])
81fi
82if test -n "$targ_64_little"; then
83 AC_DEFINE(HAVE_TARGET_64_LITTLE, 1,
84 [Define to support 64-bit little-endian targets])
85fi
86if test -n "$targ_64_big"; then
87 AC_DEFINE(HAVE_TARGET_64_BIG, 1,
88 [Define to support 64-bit big-endian targets])
89fi
90
6df6da4a
ILT
91if test -n "$all_targets"; then
92 TARGETOBJS='$(ALL_TARGETOBJS)'
93else
94 TARGETOBJS="$targetobjs"
95fi
96AC_SUBST(TARGETOBJS)
97
bae7f79e
ILT
98AC_PROG_CC
99AC_PROG_CXX
dbe717ef 100AC_PROG_YACC
5a6f7e2d 101AC_PROG_RANLIB
bae7f79e 102AC_PROG_INSTALL
537b5f51 103AC_PROG_LN_S
bae7f79e
ILT
104ZW_GNU_GETTEXT_SISTER_DIR
105AM_PO_SUBDIRS
106
92e059d8
ILT
107AC_C_BIGENDIAN
108
bae7f79e
ILT
109AC_EXEEXT
110
537b5f51
ILT
111AM_CONDITIONAL(NATIVE_LINKER,
112 test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias")
113AM_CONDITIONAL(GCC, test "$GCC" = yes)
114
bae7f79e
ILT
115AM_BINUTILS_WARNINGS
116
117WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//'`
118AC_SUBST(WARN_CXXFLAGS)
119
120dnl Force support for large files by default. This may need to be
121dnl host dependent. If build == host, we can check getconf LFS_CFLAGS.
122LFS_CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
123AC_SUBST(LFS_CXXFLAGS)
124
82dcae9d
ILT
125AC_REPLACE_FUNCS(pread)
126
54dc6425 127AC_LANG_PUSH(C++)
d288e464 128
54dc6425
ILT
129AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map)
130AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
d288e464
ILT
131
132dnl Test whether the compiler can specify a member templates to call.
133AC_COMPILE_IFELSE([
134class c { public: template<int i> void fn(); };
135template<int i> void foo(c cv) { cv.fn<i>(); }
136template void foo<1>(c cv);],
137[AC_DEFINE(HAVE_MEMBER_TEMPLATE_SPECIFICATIONS, [],
138 [Whether the C++ compiler can call a template member with no arguments])])
139
54dc6425
ILT
140AC_LANG_POP(C++)
141
bae7f79e
ILT
142AM_MAINTAINER_MODE
143
5a6f7e2d 144AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in)