Fix gas bugs in SH3e handling of fmac instruction.
[deliverable/binutils-gdb.git] / binutils / configure.in
CommitLineData
5ab6ca68
ILT
1dnl Process this file with autoconf to produce a configure script.
2dnl
3AC_PREREQ(2.0)
4AC_INIT(ar.c)
5
6AC_ARG_ENABLE(targets,
7[ --enable-targets alternative target configurations],
8[case "${enableval}" in
9 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
10 ;;
11 no) enable_targets= ;;
12 *) enable_targets=$enableval ;;
13esac])dnl
14
15AC_CONFIG_HEADER(config.h)
16
17AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`)
18AC_CANONICAL_SYSTEM
19if test -z "$target" ; then
20 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
21fi
22if test -z "$host" ; then
23 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
24fi
25AC_ARG_PROGRAM
db19f828 26
5ab6ca68 27# host-specific stuff:
db19f828 28
5ab6ca68
ILT
29HDEFINES=
30LDFLAGS=
db19f828 31
b5775df3
DHW
32. ${srcdir}/../bfd/configure.host
33
5ab6ca68
ILT
34AC_PROG_CC
35AC_SUBST(CFLAGS)
36AC_SUBST(HDEFINES)
37AC_SUBST(LDFLAGS)
38AR=${AR-ar}
39AC_SUBST(AR)
40AC_PROG_RANLIB
41AC_PROG_INSTALL
42
43AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
44AC_CHECK_FUNCS(sbrk utimes)
45
46AC_MSG_CHECKING(for time_t in time.h)
47AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
48[AC_TRY_COMPILE([#include <time.h>], [time_t i;],
49bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)])
50AC_MSG_RESULT($bu_cv_decl_time_t_time_h)
51if test $bu_cv_decl_time_t_time_h = yes; then
52 AC_DEFINE([HAVE_TIME_T_IN_TIME_H])
53fi
54
55AC_MSG_CHECKING(for time_t in sys/types.h)
56AC_CACHE_VAL(bu_cv_decl_time_t_types_h,
57[AC_TRY_COMPILE([#include <sys/types.h>], [time_t i;],
58bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)])
59AC_MSG_RESULT($bu_cv_decl_time_t_types_h)
60if test $bu_cv_decl_time_t_types_h = yes; then
61 AC_DEFINE([HAVE_TIME_T_IN_TYPES_H])
62fi
63
64# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
65# by default.
66AC_MSG_CHECKING([for utime.h])
67AC_CACHE_VAL(bu_cv_header_utime_h,
68[AC_TRY_COMPILE([#include <sys/types.h>
69#ifdef HAVE_TIME_H
70#include <time.h>
71#endif
72#include <utime.h>],
73[struct utimbuf s;],
74bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)])
75AC_MSG_RESULT($bu_cv_header_utime_h)
76if test $bu_cv_header_utime_h = yes; then
77 AC_DEFINE(HAVE_GOOD_UTIME_H)
78fi
79
80AC_MSG_CHECKING([whether fprintf must be declared])
81AC_CACHE_VAL(bu_cv_decl_needed_fprintf,
82[AC_TRY_COMPILE([#include <stdio.h>],
83[int (*pfn) = (int (*)) fprintf],
84bu_cv_decl_needed_fprintf=no, bu_cv_decl_needed_fprintf=yes)])
85AC_MSG_RESULT($bu_cv_decl_needed_fprintf)
86if test $bu_cv_decl_needed_fprintf = yes; then
87 AC_DEFINE(NEED_DECLARATION_FPRINTF)
88fi
89
90dnl FIXME: We should check this in some central place somehow
91case "${host}" in
92i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32)
93 AC_DEFINE(USE_BINARY_FOPEN) ;;
94esac
95
96# target-specific stuff:
b5775df3
DHW
97
98# Canonicalize the secondary target names.
5ab6ca68
ILT
99target_makefile_fragment=/dev/null
100if test -n "$enable_targets"; then
99ac7754 101 for targ in `echo $enable_targets | sed 's/,/ /g'`
b5775df3 102 do
5ab6ca68
ILT
103 result=`$ac_config_sub $targ 2>/dev/null`
104 if test -n "$result"; then
b5775df3
DHW
105 canon_targets="$canon_targets $result"
106 else
107 # Allow targets that config.sub doesn't recognize, like "all".
108 canon_targets="$canon_targets $targ"
109 fi
110 done
111else
5ab6ca68 112 # If our target is rs6000 _and nothing else_ then we build only nm!
b5775df3 113 case $target in
5ab6ca68 114 rs6000-*-lynx*) target_makefile_fragment=${srcdir}/config/rslynx ;;
b5775df3
DHW
115 esac
116fi
5ab6ca68 117AC_SUBST_FILE(target_makefile_fragment)
b5775df3
DHW
118
119all_targets=false
5ab6ca68
ILT
120BUILD_NLMCONV=
121NLMCONV_DEFS=
122BUILD_SRCONV=
123BUILD_DLLTOOL=
124DLLTOOL_DEFS=
b5775df3
DHW
125
126for targ in $target $canon_targets
127do
5ab6ca68 128 if test "x$targ" = "xall"; then
b5775df3 129 all_targets=true
5ab6ca68
ILT
130 BUILD_NLMCONV='$(NLMCONV_PROG)'
131 BUILD_SRCONV='$(SRCONV_PROG)'
132 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
b5775df3
DHW
133 else
134 case $targ in
5ab6ca68 135changequote(,)dnl
99ac7754 136 i[345]86*-*-netware*)
5ab6ca68
ILT
137changequote([,])dnl
138 BUILD_NLMCONV='$(NLMCONV_PROG)'
139 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
99ac7754
JM
140 ;;
141 alpha*-*-netware*)
5ab6ca68
ILT
142 BUILD_NLMCONV='$(NLMCONV_PROG)'
143 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
99ac7754
JM
144 ;;
145 powerpc*-*-netware*)
5ab6ca68
ILT
146 BUILD_NLMCONV='$(NLMCONV_PROG)'
147 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
99ac7754
JM
148 ;;
149 sparc*-*-netware*)
5ab6ca68
ILT
150 BUILD_NLMCONV='$(NLMCONV_PROG)'
151 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
99ac7754 152 ;;
b5775df3 153 esac
b5775df3 154 case $targ in
5ab6ca68 155 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
b5775df3 156 esac
99ac7754
JM
157 case $targ in
158 arm-*pe*)
5ab6ca68
ILT
159 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
160 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
99ac7754 161 ;;
5ab6ca68 162changequote(,)dnl
99ac7754 163 i[3-6]86-*pe* | i[3-6]86-*-win32)
5ab6ca68
ILT
164changequote([,])dnl
165 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
166 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
99ac7754
JM
167 ;;
168 esac
b5775df3
DHW
169 fi
170done
171
5ab6ca68
ILT
172AC_SUBST(NLMCONV_DEFS)
173AC_SUBST(BUILD_NLMCONV)
174AC_SUBST(BUILD_SRCONV)
175AC_SUBST(BUILD_DLLTOOL)
176AC_SUBST(DLLTOOL_DEFS)
99ac7754 177
fe48a154
ILT
178targ=$target
179. $srcdir/../bfd/config.bfd
180if test "x$targ_underscore" = "xyes"; then
5ab6ca68 181 UNDERSCORE=1
6f88f031 182else
5ab6ca68 183 UNDERSCORE=0
6f88f031 184fi
5ab6ca68
ILT
185AC_SUBST(UNDERSCORE)
186
187AC_OUTPUT(Makefile,
188[case x$CONFIG_HEADERS in xconfig.h) echo > stamp-h ;; esac])
This page took 0.130193 seconds and 4 git commands to generate.