Add support for parallel instructions.
[deliverable/binutils-gdb.git] / binutils / configure.in
... / ...
CommitLineData
1dnl Process this file with autoconf to produce a configure script.
2dnl
3AC_PREREQ(2.5)
4AC_INIT(ar.c)
5
6AC_CANONICAL_SYSTEM
7
8AM_INIT_AUTOMAKE(binutils, 2.8.2)
9
10AM_PROG_LIBTOOL
11
12AC_ARG_ENABLE(targets,
13[ --enable-targets alternative target configurations],
14[case "${enableval}" in
15 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
16 ;;
17 no) enable_targets= ;;
18 *) enable_targets=$enableval ;;
19esac])dnl
20AC_ARG_ENABLE(commonbfdlib,
21[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
22[case "${enableval}" in
23 yes) commonbfdlib=true ;;
24 no) commonbfdlib=false ;;
25 *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
26esac])dnl
27
28AM_CONFIG_HEADER(config.h:config.in)
29
30if test -z "$target" ; then
31 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
32fi
33if test -z "$host" ; then
34 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
35fi
36
37AC_PROG_CC
38
39AC_PROG_YACC
40AC_PROG_LEX
41AC_DECL_YYTEXT
42
43AM_MAINTAINER_MODE
44AM_CYGWIN32
45AM_EXEEXT
46
47# host-specific stuff:
48
49HDEFINES=
50
51. ${srcdir}/../bfd/configure.host
52
53AC_SUBST(HDEFINES)
54AR=${AR-ar}
55AC_SUBST(AR)
56AC_PROG_RANLIB
57AM_PROG_INSTALL
58
59BFD_CC_FOR_BUILD
60
61AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
62AC_HEADER_SYS_WAIT
63AC_FUNC_ALLOCA
64AC_CHECK_FUNCS(sbrk utimes)
65dnl Temporary workaround for bug in autoconf 2.12. When the bug is
66dnl fixed, we can just call AC_FUNC_VFORK in all cases.
67if test "x$cross_compiling" = "xno"; then
68 AC_FUNC_VFORK
69else
70 AC_CHECK_FUNC(vfork, , AC_DEFINE(vfork, fork))
71fi
72
73AC_MSG_CHECKING(for time_t in time.h)
74AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
75[AC_TRY_COMPILE([#include <time.h>], [time_t i;],
76bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)])
77AC_MSG_RESULT($bu_cv_decl_time_t_time_h)
78if test $bu_cv_decl_time_t_time_h = yes; then
79 AC_DEFINE([HAVE_TIME_T_IN_TIME_H])
80fi
81
82AC_MSG_CHECKING(for time_t in sys/types.h)
83AC_CACHE_VAL(bu_cv_decl_time_t_types_h,
84[AC_TRY_COMPILE([#include <sys/types.h>], [time_t i;],
85bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)])
86AC_MSG_RESULT($bu_cv_decl_time_t_types_h)
87if test $bu_cv_decl_time_t_types_h = yes; then
88 AC_DEFINE([HAVE_TIME_T_IN_TYPES_H])
89fi
90
91# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
92# by default.
93AC_MSG_CHECKING([for utime.h])
94AC_CACHE_VAL(bu_cv_header_utime_h,
95[AC_TRY_COMPILE([#include <sys/types.h>
96#ifdef HAVE_TIME_H
97#include <time.h>
98#endif
99#include <utime.h>],
100[struct utimbuf s;],
101bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)])
102AC_MSG_RESULT($bu_cv_header_utime_h)
103if test $bu_cv_header_utime_h = yes; then
104 AC_DEFINE(HAVE_GOOD_UTIME_H)
105fi
106
107BFD_NEED_DECLARATION(fprintf)
108BFD_NEED_DECLARATION(strstr)
109BFD_NEED_DECLARATION(sbrk)
110BFD_NEED_DECLARATION(getenv)
111
112BFD_BINARY_FOPEN
113
114# target-specific stuff:
115
116# Canonicalize the secondary target names.
117if test -n "$enable_targets"; then
118 for targ in `echo $enable_targets | sed 's/,/ /g'`
119 do
120 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
121 if test -n "$result"; then
122 canon_targets="$canon_targets $result"
123 else
124 # Allow targets that config.sub doesn't recognize, like "all".
125 canon_targets="$canon_targets $targ"
126 fi
127 done
128fi
129
130all_targets=false
131BUILD_NLMCONV=
132NLMCONV_DEFS=
133BUILD_SRCONV=
134BUILD_DLLTOOL=
135DLLTOOL_DEFS=
136BUILD_WINDRES=
137
138for targ in $target $canon_targets
139do
140 if test "x$targ" = "xall"; then
141 all_targets=true
142 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
143 BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)'
144 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
145 else
146 case $targ in
147changequote(,)dnl
148 i[3456]86*-*-netware*)
149changequote([,])dnl
150 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
151 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
152 ;;
153 alpha*-*-netware*)
154 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
155 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
156 ;;
157 powerpc*-*-netware*)
158 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
159 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
160 ;;
161 sparc*-*-netware*)
162 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
163 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
164 ;;
165 esac
166 case $targ in
167 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)$(EXEEXT)' ;;
168 esac
169 case $targ in
170 arm-*pe*)
171 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
172 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
173 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
174 ;;
175changequote(,)dnl
176 i[3-6]86-*pe* | i[3-6]86-*-cygwin32)
177changequote([,])dnl
178 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
179 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
180 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
181 ;;
182 powerpc*-*-*pe* | powerpc*-*-cygwin32)
183 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
184 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
185 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
186 ;;
187 esac
188 fi
189done
190
191AC_SUBST(NLMCONV_DEFS)
192AC_SUBST(BUILD_NLMCONV)
193AC_SUBST(BUILD_SRCONV)
194AC_SUBST(BUILD_DLLTOOL)
195AC_SUBST(DLLTOOL_DEFS)
196AC_SUBST(BUILD_WINDRES)
197
198targ=$target
199. $srcdir/../bfd/config.bfd
200if test "x$targ_underscore" = "xyes"; then
201 UNDERSCORE=1
202else
203 UNDERSCORE=0
204fi
205AC_SUBST(UNDERSCORE)
206
207AC_OUTPUT(Makefile)
This page took 0.023054 seconds and 4 git commands to generate.