* configure.host: Remove go32 and win32 host information, since it
[deliverable/binutils-gdb.git] / ld / configure.in
CommitLineData
ef346f1a
ILT
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
2e598345
ILT
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
ef346f1a
ILT
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
02757e59 33
ef346f1a 34# host-specific stuff:
02757e59 35
ef346f1a 36. ${srcdir}/configure.host
02757e59 37
ef346f1a
ILT
38AC_PROG_CC
39AC_SUBST(CFLAGS)
2e598345 40AC_SUBST(HLDFLAGS)
ad43e45b 41AC_SUBST(RPATH_ENVVAR)
ef346f1a
ILT
42AC_SUBST(HDEFINES)
43AC_SUBST(HOSTING_CRT0)
44AC_SUBST(HOSTING_LIBS)
45AC_SUBST(NATIVE_LIB_DIRS)
8ddef552 46
2e598345
ILT
47# For most hosts we can use a simple definition to pick up the BFD and
48# opcodes libraries. However, if we are building shared libraries, we
49# need to handle some hosts specially.
50BFDLIB='-L../bfd -lbfd'
51if test "${shared}" = "true"; then
52 case "${host}" in
53 *-*-sunos*)
54 # On SunOS, we must link against the name we are going to install,
55 # not -lbfd, since SunOS does not support SONAME.
56 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
57 ;;
58 esac
59fi
60AC_SUBST(BFDLIB)
61
ef346f1a
ILT
62AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
63AC_CHECK_FUNCS(sbrk)
2e598345 64AC_HEADER_DIRENT
ab57b174 65
ef346f1a 66BFD_BINARY_FOPEN
02757e59 67
2e598345
ILT
68BFD_NEED_DECLARATION(free)
69
ef346f1a 70# target-specific stuff:
02757e59 71
95d31c3c 72all_targets=
ef346f1a
ILT
73EMUL=
74all_emuls=
95d31c3c 75TDIRS=
1c4b3cda 76
95d31c3c 77for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
1c4b3cda 78do
95d31c3c
ILT
79 if test "$targ_alias" = "all"; then
80 all_targets=true
81 else
82 # Canonicalize the secondary target names.
83 result=`$ac_config_sub $targ_alias 2>/dev/null`
84 if test -n "$result"; then
85 targ=$result
1c4b3cda 86 else
95d31c3c
ILT
87 targ=$targ_alias
88 fi
7f2649bb 89
95d31c3c 90 . ${srcdir}/configure.tgt
ef346f1a 91
95d31c3c
ILT
92 if test "$targ" = "$target"; then
93 EMUL=$targ_emul
1c4b3cda 94 fi
1c4b3cda 95
95d31c3c
ILT
96 for i in $targ_emul $targ_extra_emuls; do
97 case " $all_emuls " in
98 *" e${i}.o "*) ;;
99 *)
100 all_emuls="$all_emuls e${i}.o"
101 eval result=\$tdir_$i
102 test -z "$result" && result=$targ_alias
103 TDIRS="$TDIRS\\
104tdir_$i=$result"
105 ;;
1c4b3cda
ILT
106 esac
107 done
95d31c3c
ILT
108 fi
109done
1c4b3cda 110
95d31c3c
ILT
111AC_SUBST(EMUL)
112AC_SUBST(TDIRS)
1c4b3cda 113
95d31c3c
ILT
114if test x${all_targets} = xtrue; then
115 EMULATION_OFILES='$(ALL_EMULATIONS)'
116else
117 EMULATION_OFILES=$all_emuls
118fi
ef346f1a 119AC_SUBST(EMULATION_OFILES)
8ddef552 120
ef346f1a
ILT
121AC_OUTPUT(Makefile,
122[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
This page took 0.157948 seconds and 4 git commands to generate.