source: trunk/src/binutils/bfd/configure.in@ 842

Last change on this file since 842 was 842, checked in by bird, 22 years ago

Our msgfmt handles UTF-8 incorrectly it seems... Removed tr.

  • Property cvs2svn:cvs-rev set to 1.6
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 34.2 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2dnl
3
4AC_PREREQ(2.13)
5AC_INIT(libbfd.c)
6
7AC_CANONICAL_SYSTEM
8AC_ISC_POSIX
9
10AM_INIT_AUTOMAKE(bfd, 2.14)
11# Uncomment the next line to remove the date from the reported bfd version
12#is_release=y
13
14changequote(,)dnl
15bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
16changequote([,])dnl
17
18bfd_version_string="\"${VERSION}\""
19if test x${is_release} = x; then
20 bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
21 bfd_version_string="\"${VERSION} ${bfd_version_date}\""
22fi
23AC_SUBST(bfd_version)
24AC_SUBST(bfd_version_string)
25
26dnl These must be called before AM_PROG_LIBTOOL, because it may want
27dnl to call AC_CHECK_PROG.
28AC_CHECK_TOOL(AR, ar)
29AC_CHECK_TOOL(RANLIB, ranlib, :)
30
31dnl Default to a non shared library. This may be overridden by the
32dnl configure option --enable-shared.
33AM_DISABLE_SHARED
34
35AM_PROG_LIBTOOL
36
37AC_ARG_ENABLE(64-bit-bfd,
38[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
39[case "${enableval}" in
40 yes) want64=true ;;
41 no) want64=false ;;
42 *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
43esac],[want64=false])dnl
44AC_ARG_ENABLE(targets,
45[ --enable-targets alternative target configurations],
46[case "${enableval}" in
47 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
48 ;;
49 no) enable_targets= ;;
50 *) enable_targets=$enableval ;;
51esac])dnl
52AC_ARG_ENABLE(commonbfdlib,
53[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
54[case "${enableval}" in
55 yes) commonbfdlib=true ;;
56 no) commonbfdlib=false ;;
57 *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
58esac])dnl
59AC_ARG_WITH(mmap,
60[ --with-mmap try using mmap for BFD input files if available],
61[case "${withval}" in
62 yes) want_mmap=true ;;
63 no) want_mmap=false ;;
64 *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
65esac],[want_mmap=false])dnl
66
67build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
68AC_ARG_ENABLE(build-warnings,
69[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
70[case "${enableval}" in
71 yes) ;;
72 no) build_warnings="-w";;
73 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
74 build_warnings="${build_warnings} ${t}";;
75 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
76 build_warnings="${t} ${build_warnings}";;
77 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
78esac
79if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
80 echo "Setting warning flags = $build_warnings" 6>&1
81fi])dnl
82WARN_CFLAGS=""
83if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
84 WARN_CFLAGS="${build_warnings}"
85fi
86AC_SUBST(WARN_CFLAGS)
87
88AM_CONFIG_HEADER(config.h:config.in)
89
90if test -z "$target" ; then
91 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
92fi
93
94AM_MAINTAINER_MODE
95AM_INSTALL_LIBBFD
96AC_EXEEXT
97
98host64=false
99target64=false
100bfd_default_target_size=32
101
102# host stuff:
103
104AC_PROG_CC
105
106ALL_LINGUAS="fr ja es sv da zh_CN"
107CY_GNU_GETTEXT
108
109# Permit host specific settings.
110. ${srcdir}/configure.host
111
112AC_SUBST(HDEFINES)
113AC_PROG_INSTALL
114
115BFD_HOST_64BIT_LONG=0
116BFD_HOST_64_BIT_DEFINED=0
117BFD_HOST_64_BIT=
118BFD_HOST_U_64_BIT=
119if test "x${HOST_64BIT_TYPE}" = "xlong"; then
120 BFD_HOST_64BIT_LONG=1
121elif test "x${HOST_64BIT_TYPE}" != "x"; then
122 BFD_HOST_64_BIT_DEFINED=1
123 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
124 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
125fi
126AC_SUBST(BFD_HOST_64BIT_LONG)
127AC_SUBST(BFD_HOST_64_BIT_DEFINED)
128AC_SUBST(BFD_HOST_64_BIT)
129AC_SUBST(BFD_HOST_U_64_BIT)
130
131BFD_CC_FOR_BUILD
132
133AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
134AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
135AC_HEADER_TIME
136AC_HEADER_DIRENT
137AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
138
139BFD_BINARY_FOPEN
140
141BFD_NEED_DECLARATION(strstr)
142BFD_NEED_DECLARATION(malloc)
143BFD_NEED_DECLARATION(realloc)
144BFD_NEED_DECLARATION(free)
145BFD_NEED_DECLARATION(getenv)
146
147# If we are configured native, pick a core file support file.
148COREFILE=
149COREFLAG=
150TRAD_HEADER=
151if test "${target}" = "${host}"; then
152 case "${host}" in
153 alpha*-*-freebsd*)
154 COREFILE=''
155 ;;
156 alpha*-*-linux-gnu*)
157 COREFILE=trad-core.lo
158 TRAD_HEADER='"hosts/alphalinux.h"'
159 ;;
160 alpha*-*-netbsd* | alpha*-*-openbsd*)
161 COREFILE=netbsd-core.lo
162 ;;
163 alpha*-*-*) COREFILE=osf-core.lo ;;
164 arm-*-freebsd*) COREFILE='' ;;
165 arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
166 arm-*-riscix) COREFILE=trad-core.lo ;;
167 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
168 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
169 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
170 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
171 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
172 i370-*-*)
173 COREFILE=trad-core.lo
174 TRAD_HEADER='"hosts/i370linux.h"'
175 ;;
176
177changequote(,)dnl