* v850-opc.c (D9_RELAX): Renamed from D9, all references
[deliverable/binutils-gdb.git] / ld / configure.in
... / ...
CommitLineData
1dnl Process this file with autoconf to produce a configure script
2dnl
3AC_PREREG(2.0)
4AC_INIT(ldmain.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
14AC_ARG_ENABLE(shared,
15[ --enable-shared build shared BFD library],
16[case "${enableval}" in
17 yes) shared=true ;;
18 no) shared=false ;;
19 *) AC_MSG_ERROR([bad value ${enableval} for BFD shared option]) ;;
20esac])dnl
21
22AC_CONFIG_HEADER(config.h:config.in)
23
24AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`)
25AC_CANONICAL_SYSTEM
26if test -z "$target" ; then
27 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
28fi
29if test -z "$host" ; then
30 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
31fi
32AC_ARG_PROGRAM
33
34# host-specific stuff:
35
36AC_PROG_CC
37
38. ${srcdir}/configure.host
39
40AC_SUBST(CFLAGS)
41AC_SUBST(HLDFLAGS)
42AC_SUBST(RPATH_ENVVAR)
43AC_SUBST(HDEFINES)
44AC_SUBST(HOSTING_CRT0)
45AC_SUBST(HOSTING_LIBS)
46AC_SUBST(NATIVE_LIB_DIRS)
47
48# For most hosts we can use a simple definition to pick up the BFD and
49# opcodes libraries. However, if we are building shared libraries, we
50# need to handle some hosts specially.
51BFDLIB='-L../bfd -lbfd'
52if test "${shared}" = "true"; then
53 case "${host}" in
54 *-*-sunos*)
55 # On SunOS, we must link against the name we are going to install,
56 # not -lbfd, since SunOS does not support SONAME.
57 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
58 ;;
59 esac
60fi
61AC_SUBST(BFDLIB)
62
63AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
64AC_CHECK_FUNCS(sbrk)
65AC_HEADER_DIRENT
66
67BFD_BINARY_FOPEN
68
69BFD_NEED_DECLARATION(free)
70
71# target-specific stuff:
72
73all_targets=
74EMUL=
75all_emuls=
76TDIRS=
77
78for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
79do
80 if test "$targ_alias" = "all"; then
81 all_targets=true
82 else
83 # Canonicalize the secondary target names.
84 result=`$ac_config_sub $targ_alias 2>/dev/null`
85 if test -n "$result"; then
86 targ=$result
87 else
88 targ=$targ_alias
89 fi
90
91 . ${srcdir}/configure.tgt
92
93 if test "$targ" = "$target"; then
94 EMUL=$targ_emul
95 fi
96
97 for i in $targ_emul $targ_extra_emuls; do
98 case " $all_emuls " in
99 *" e${i}.o "*) ;;
100 *)
101 all_emuls="$all_emuls e${i}.o"
102 eval result=\$tdir_$i
103 test -z "$result" && result=$targ_alias
104 TDIRS="$TDIRS\\
105tdir_$i=$result"
106 ;;
107 esac
108 done
109 fi
110done
111
112AC_SUBST(EMUL)
113AC_SUBST(TDIRS)
114
115if test x${all_targets} = xtrue; then
116 EMULATION_OFILES='$(ALL_EMULATIONS)'
117else
118 EMULATION_OFILES=$all_emuls
119fi
120AC_SUBST(EMULATION_OFILES)
121
122AC_OUTPUT(Makefile,
123[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.052089 seconds and 4 git commands to generate.