]>
Commit | Line | Data |
---|---|---|
3affd5f0 | 1 | dnl Process this file with autoconf to produce a configure script |
6599da04 | 2 | |
4ac3cb83 | 3 | AC_PREREQ(2.13) |
55d0e5e0 | 4 | AC_INIT(xmalloc.c) |
6599da04 | 5 | |
6706f116 AO |
6 | # This works around the fact that libtool configuration may change LD |
7 | # for this particular configuration, but some shells, instead of | |
8 | # keeping the changes in LD private, export them just because LD is | |
9 | # exported. We don't use libtool yet, but some day we might, so... | |
10 | ORIGINAL_LD_FOR_MULTILIBS=$LD | |
11 | ||
3affd5f0 JL |
12 | dnl We use these options to decide which functions to include. |
13 | AC_ARG_WITH(target-subdir, | |
cd862df8 L |
14 | [ --with-target-subdir=SUBDIR Configuring in a subdirectory for target]) |
15 | AC_ARG_WITH(build-subdir, | |
16 | [ --with-build-subdir=SUBDIR Configuring in a subdirectory for build]) | |
ca6b370d JL |
17 | AC_ARG_WITH(cross-host, |
18 | [ --with-cross-host=HOST Configuring with a cross compiler]) | |
3affd5f0 JL |
19 | AC_ARG_WITH(newlib, |
20 | [ --with-newlib Configuring with newlib]) | |
6599da04 | 21 | |
3affd5f0 | 22 | if test "${srcdir}" = "."; then |
cd862df8 L |
23 | if test -n "${with_build_subdir}"; then |
24 | libiberty_topdir="${srcdir}/../.." | |
25 | with_target_subdir= | |
26 | elif test -z "${with_target_subdir}"; then | |
3affd5f0 JL |
27 | libiberty_topdir="${srcdir}/.." |
28 | else | |
29 | if test "${with_target_subdir}" != "."; then | |
30 | libiberty_topdir="${srcdir}/${with_multisrctop}../.." | |
31 | else | |
32 | libiberty_topdir="${srcdir}/${with_multisrctop}.." | |
33 | fi | |
34 | fi | |
35 | else | |
36 | libiberty_topdir="${srcdir}/.." | |
37 | fi | |
d8c22ce7 | 38 | AC_SUBST(libiberty_topdir) |
3affd5f0 JL |
39 | AC_CONFIG_AUX_DIR($libiberty_topdir) |
40 | ||
aaa5f039 DD |
41 | dnl Very limited version of automake's enable-maintainer-mode |
42 | ||
43 | AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |
44 | dnl maintainer-mode is disabled by default | |
45 | AC_ARG_ENABLE(maintainer-mode, | |
46 | [ --enable-maintainer-mode | |
47 | enable make rules and dependencies not useful | |
48 | (and sometimes confusing) to the casual installer], | |
49 | maintainer_mode=$enableval, | |
50 | maintainer_mode=no) | |
51 | ||
52 | AC_MSG_RESULT($maintainer_mode) | |
53 | ||
54 | if test "$maintainer_mode" = "yes"; then | |
55 | MAINT='' | |
56 | NOTMAINT='#' | |
57 | else | |
58 | MAINT='#' | |
59 | NOTMAINT='' | |
60 | fi | |
61 | AC_SUBST(MAINT)dnl | |
62 | AC_SUBST(NOTMAINT)dnl | |
63 | ||
ae9092da DD |
64 | # Do we have a single-tree copy of texinfo? Even if we do, we can't |
65 | # rely on it - libiberty is built before texinfo. | |
66 | AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ) | |
f749bd83 AM |
67 | if test "x$MAKEINFO" = "x"; then |
68 | MAKEINFO="@echo makeinfo missing; true" | |
ae9092da | 69 | BUILD_INFO= |
f749bd83 AM |
70 | else |
71 | BUILD_INFO=info | |
72 | case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in | |
73 | x*\ [[1-3]].* ) | |
74 | MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" | |
75 | BUILD_INFO= | |
76 | AC_MSG_WARN([ | |
ae9092da | 77 | *** Makeinfo is too old. Info documentation will not be built.]) |
f749bd83 AM |
78 | ;; |
79 | esac | |
80 | fi | |
ae9092da | 81 | AC_SUBST(MAKEINFO) |
aaa5f039 DD |
82 | AC_SUBST(BUILD_INFO) |
83 | ||
84 | AC_CHECK_PROG(PERL, perl, perl, ) | |
85 | if test x"$PERL" = x""; then | |
86 | HAVE_PERL='#' | |
87 | else | |
88 | HAVE_PERL='' | |
89 | fi | |
90 | AC_SUBST(HAVE_PERL) | |
91 | ||
3affd5f0 JL |
92 | AC_CANONICAL_HOST |
93 | ||
94 | dnl When we start using automake: | |
95 | dnl AM_INIT_AUTOMAKE(libiberty, 1.0) | |
96 | ||
97 | dnl These must be called before AM_PROG_LIBTOOL, because it may want | |
98 | dnl to call AC_CHECK_PROG. | |
99 | AC_CHECK_TOOL(AR, ar) | |
100 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
101 | ||
3affd5f0 JL |
102 | LIB_AC_PROG_CC |
103 | ||
7fda878c DR |
104 | AC_PROG_CC_C_O |
105 | # autoconf is lame and doesn't give us any substitution variable for this. | |
106 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
107 | NO_MINUS_C_MINUS_O=yes | |
108 | else | |
109 | OUTPUT_OPTION='-o $@' | |
110 | fi | |
111 | AC_SUBST(NO_MINUS_C_MINUS_O) | |
112 | AC_SUBST(OUTPUT_OPTION) | |
113 | ||
3affd5f0 | 114 | AC_ISC_POSIX |
d1209685 ZW |
115 | AC_C_CONST |
116 | AC_C_INLINE | |
3affd5f0 JL |
117 | |
118 | dnl When we start using libtool: | |
119 | dnl Default to a non shared library. This may be overridden by the | |
120 | dnl configure option --enable-shared. | |
121 | dnl AM_DISABLE_SHARED | |
122 | ||
123 | dnl When we start using libtool: | |
124 | dnl AM_PROG_LIBTOOL | |
125 | ||
126 | dnl When we start using automake: | |
127 | dnl AM_CONFIG_HEADER(config.h:config.in) | |
128 | AC_CONFIG_HEADER(config.h:config.in) | |
129 | ||
130 | dnl When we start using automake: | |
131 | dnl AM_MAINTAINER_MODE | |
dd8f3ed5 | 132 | dnl AC_EXEEXT |
3affd5f0 JL |
133 | |
134 | dnl When we start using automake: | |
135 | dnl AM_PROG_INSTALL | |
136 | AC_PROG_INSTALL | |
6599da04 JM |
137 | |
138 | . ${srcdir}/config.table | |
139 | host_makefile_frag=${frag} | |
3affd5f0 JL |
140 | AC_SUBST_FILE(host_makefile_frag) |
141 | ||
142 | # It's OK to check for header files. Although the compiler may not be | |
143 | # able to link anything, it had better be able to at least compile | |
144 | # something. | |
d47f75c4 | 145 | AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h) |
a6458d1d | 146 | AC_HEADER_SYS_WAIT |
c6451ce1 | 147 | AC_HEADER_TIME |
6599da04 | 148 | |
3b58c099 MS |
149 | libiberty_AC_DECLARE_ERRNO |
150 | ||
fdfc290b | 151 | AC_CHECK_TYPE(uintptr_t, unsigned long) |
39e8d049 KG |
152 | # Given the above check, we always have uintptr_t or a fallback |
153 | # definition. So define HAVE_UINTPTR_T in case any imported code | |
154 | # relies on it. | |
155 | AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.]) | |
d3982b71 | 156 | |
deae2ed9 MM |
157 | AC_TYPE_PID_T |
158 | ||
3affd5f0 JL |
159 | # This is the list of functions which libiberty will provide if they |
160 | # are not available on the host. | |
161 | ||
162 | funcs="asprintf" | |
163 | funcs="$funcs atexit" | |
164 | funcs="$funcs basename" | |
165 | funcs="$funcs bcmp" | |
166 | funcs="$funcs bcopy" | |
dac45916 | 167 | funcs="$funcs bsearch" |
3affd5f0 | 168 | funcs="$funcs bzero" |
a9acf741 | 169 | funcs="$funcs calloc" |
3affd5f0 | 170 | funcs="$funcs clock" |
29650b2b | 171 | funcs="$funcs ffs" |
3affd5f0 JL |
172 | funcs="$funcs getcwd" |
173 | funcs="$funcs getpagesize" | |
174 | funcs="$funcs index" | |
175 | funcs="$funcs insque" | |
176 | funcs="$funcs memchr" | |
177 | funcs="$funcs memcmp" | |
178 | funcs="$funcs memcpy" | |
179 | funcs="$funcs memmove" | |
029bcc09 | 180 | funcs="$funcs mempcpy" |
3affd5f0 | 181 | funcs="$funcs memset" |
687361c8 | 182 | funcs="$funcs mkstemps" |
9eb4080f | 183 | funcs="$funcs putenv" |
3affd5f0 JL |
184 | funcs="$funcs random" |
185 | funcs="$funcs rename" | |
186 | funcs="$funcs rindex" | |
9eb4080f | 187 | funcs="$funcs setenv" |
3affd5f0 | 188 | funcs="$funcs sigsetmask" |
029bcc09 KG |
189 | funcs="$funcs stpcpy" |
190 | funcs="$funcs stpncpy" | |
3affd5f0 JL |
191 | funcs="$funcs strcasecmp" |
192 | funcs="$funcs strchr" | |
193 | funcs="$funcs strdup" | |
194 | funcs="$funcs strncasecmp" | |
195 | funcs="$funcs strrchr" | |
196 | funcs="$funcs strstr" | |
197 | funcs="$funcs strtod" | |
198 | funcs="$funcs strtol" | |
199 | funcs="$funcs strtoul" | |
200 | funcs="$funcs tmpnam" | |
201 | funcs="$funcs vasprintf" | |
202 | funcs="$funcs vfprintf" | |
203 | funcs="$funcs vprintf" | |
204 | funcs="$funcs vsprintf" | |
205 | funcs="$funcs waitpid" | |
206 | ||
207 | # Also in the old function.def file: alloca, vfork, getopt. | |
208 | ||
d47f75c4 | 209 | vars="sys_errlist sys_nerr sys_siglist _system_configuration" |
3affd5f0 | 210 | |
90e72e20 | 211 | checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday" |
64c7e556 | 212 | checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp" |
170230b7 | 213 | checkfuncs="$checkfuncs getsysinfo table sysctl" |
3affd5f0 JL |
214 | |
215 | # These are neither executed nor required, but they help keep | |
216 | # autoheader happy without adding a bunch of text to acconfig.h. | |
217 | if test "x" = "y"; then | |
dac45916 MS |
218 | AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock) |
219 | AC_CHECK_FUNCS(getcwd getpagesize index insque mkstemps memchr memcmp memcpy) | |
029bcc09 KG |
220 | AC_CHECK_FUNCS(memmove mempcpy memset putenv random rename rindex sigsetmask) |
221 | AC_CHECK_FUNCS(strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr) | |
dac45916 MS |
222 | AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf) |
223 | AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal) | |
29650b2b | 224 | AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs) |
170230b7 | 225 | AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl) |
4876b2b4 | 226 | AC_CHECK_FUNCS(realpath canonicalize_file_name) |
d1209685 ZW |
227 | AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.]) |
228 | AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.]) | |
229 | AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.]) | |
d47f75c4 | 230 | AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, [Define if you have the _system_configuration variable.]) |
6599da04 JM |
231 | fi |
232 | ||
3affd5f0 JL |
233 | # For each of these functions, if the host does not provide the |
234 | # function we want to put FN.o in LIBOBJS, and if the host does | |
b548dffb | 235 | # provide the function, we want to define HAVE_FN in config.h. |
3affd5f0 JL |
236 | |
237 | setobjs= | |
7c72138a | 238 | CHECK= |
48d7db63 | 239 | target_header_dir= |
3affd5f0 JL |
240 | if test -n "${with_target_subdir}"; then |
241 | ||
ca6b370d | 242 | # We are being configured as a target library. AC_REPLACE_FUNCS |
3affd5f0 | 243 | # may not work correctly, because the compiler may not be able to |
ca6b370d JL |
244 | # link executables. Note that we may still be being configured |
245 | # native. | |
3affd5f0 JL |
246 | |
247 | # If we are being configured for newlib, we know which functions | |
248 | # newlib provide and which ones we will be expected to provide. | |
249 | ||
250 | if test "x${with_newlib}" = "xyes"; then | |
ca6b370d | 251 | LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" |
3affd5f0 JL |
252 | |
253 | for f in $funcs; do | |
254 | case "$f" in | |
ca6b370d | 255 | asprintf | basename | insque | random | strdup | vasprintf) |
3affd5f0 JL |
256 | ;; |
257 | *) | |
258 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
259 | AC_DEFINE_UNQUOTED($n) | |
260 | ;; | |
261 | esac | |
262 | done | |
263 | ||
264 | # newlib doesnt provide any of the variables in $vars, so we | |
265 | # dont have to check them here. | |
266 | ||
ca6b370d | 267 | # Of the functions in $checkfuncs, newlib only has strerror. |
d1209685 | 268 | AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR) |
3affd5f0 JL |
269 | |
270 | setobjs=yes | |
271 | ||
272 | fi | |
7c72138a | 273 | |
48d7db63 PE |
274 | # We may wish to install the target headers somewhere. |
275 | AC_ARG_ENABLE(install-libiberty, | |
276 | [ --enable-install-libiberty Install headers for end users], | |
277 | enable_install_libiberty=$enableval, | |
278 | enable_install_libiberty=no)dnl | |
279 | ||
280 | # Option parsed, now set things appropriately. | |
281 | case x"$enable_install_libiberty" in | |
282 | xyes|x) | |
283 | target_header_dir=libiberty | |
284 | ;; | |
285 | xno) | |
286 | target_header_dir= | |
287 | ;; | |
288 | *) | |
289 | # This could be sanity-checked in various ways... | |
290 | target_header_dir="${enable_install_libiberty}" | |
291 | ;; | |
292 | esac | |
293 | ||
294 | ||
7c72138a TT |
295 | else |
296 | ||
297 | # Not a target library, so we set things up to run the test suite. | |
298 | CHECK=check-cplus-dem | |
299 | ||
3affd5f0 JL |
300 | fi |
301 | ||
7c72138a | 302 | AC_SUBST(CHECK) |
48d7db63 | 303 | AC_SUBST(target_header_dir) |
7c72138a | 304 | |
b1c45ae4 | 305 | case "${host}" in |
46af757b | 306 | *-*-cygwin* | *-*-mingw*) |
e490616e ZW |
307 | AC_DEFINE_NOAUTOHEADER(HAVE_SYS_ERRLIST) |
308 | AC_DEFINE_NOAUTOHEADER(HAVE_SYS_NERR) | |
b1c45ae4 CF |
309 | ;; |
310 | esac | |
311 | ||
3affd5f0 JL |
312 | if test -z "${setobjs}"; then |
313 | case "${host}" in | |
314 | ||
315 | *-*-vxworks*) | |
316 | # Handle VxWorks configuration specially, since on VxWorks the | |
317 | # libraries are actually on the target board, not in the file | |
318 | # system. | |
319 | LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o" | |
320 | LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o" | |
321 | for f in $funcs; do | |
322 | case "$f" in | |
323 | basename | getpagesize | insque | random | strcasecmp) | |
324 | ;; | |
325 | strncasecmp | strdup | vfork | waitpid | vasprintf) | |
326 | ;; | |
327 | *) | |
328 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
329 | AC_DEFINE_UNQUOTED($n) | |
330 | ;; | |
331 | esac | |
332 | done | |
333 | ||
334 | # VxWorks doesn't provide any of the variables in $vars, so we | |
335 | # don't have to check them here. | |
336 | ||
337 | # Of the functions in $checkfuncs, VxWorks only has strerror. | |
d1209685 | 338 | AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR) |
3affd5f0 JL |
339 | |
340 | setobjs=yes | |
341 | ;; | |
342 | ||
343 | esac | |
344 | fi | |
345 | ||
346 | if test -z "${setobjs}"; then | |
347 | ||
348 | case "${host}" in | |
349 | ||
dd8f3ed5 GN |
350 | *-*-cygwin*) |
351 | # The Cygwin library actually uses a couple of files from | |
3affd5f0 | 352 | # libiberty when it is built. If we are building a native |
dd8f3ed5 | 353 | # Cygwin, and we run the tests, we will appear to have these |
3affd5f0 JL |
354 | # files. However, when we go on to build winsup, we will wind up |
355 | # with a library which does not have the files, since they should | |
356 | # have come from libiberty. | |
357 | ||
358 | # We handle this by removing the functions the winsup library | |
359 | # provides from our shell variables, so that they appear to be | |
360 | # missing. | |
361 | ||
2f31ed7e DD |
362 | # DJ - only if we're *building* cygwin, not just building *with* cygwin |
363 | ||
364 | if test -n "${with_target_subdir}" | |
365 | then | |
366 | funcs="`echo $funcs | sed -e 's/random//'`" | |
367 | LIBOBJS="$LIBOBJS random.o" | |
368 | vars="`echo $vars | sed -e 's/sys_siglist//'`" | |
369 | checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" | |
370 | fi | |
3affd5f0 JL |
371 | ;; |
372 | ||
373 | *-*-mingw32*) | |
374 | # Under mingw32, sys_nerr and sys_errlist exist, but they are | |
375 | # macros, so the test below won't find them. | |
d1209685 ZW |
376 | libiberty_cv_var_sys_nerr=yes |
377 | libiberty_cv_var_sys_errlist=yes | |
3affd5f0 JL |
378 | ;; |
379 | ||
89f602a7 MK |
380 | *-*-uwin*) |
381 | # Under some versions of uwin, vfork is notoriously buggy and the test | |
382 | # can hang configure; on other versions, vfork exists just as a stub. | |
383 | # FIXME: This should be removed once vfork in uwin's runtime is fixed. | |
384 | ac_cv_func_vfork_works=no | |
62133b5e MK |
385 | # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are |
386 | # macros (actually, these are imported from a DLL, but the end effect | |
387 | # is the same), so the test below won't find them. | |
d1209685 ZW |
388 | libiberty_cv_var_sys_nerr=yes |
389 | libiberty_cv_var_sys_errlist=yes | |
89f602a7 MK |
390 | ;; |
391 | ||
ee262b6f DR |
392 | *-*-*vms*) |
393 | # Under VMS, vfork works very different than on Unix. The standard test | |
394 | # won't work, and it isn't easily adaptable. It makes more sense to | |
395 | # just force it. | |
396 | ac_cv_func_vfork_works=yes | |
397 | ;; | |
398 | ||
3affd5f0 JL |
399 | esac |
400 | ||
401 | # We haven't set the list of objects yet. Use the standard autoconf | |
402 | # tests. This will only work if the compiler works. | |
403 | AC_PROG_CC_WORKS | |
404 | AC_REPLACE_FUNCS($funcs) | |
b548dffb | 405 | libiberty_AC_FUNC_C_ALLOCA |
3affd5f0 JL |
406 | AC_FUNC_VFORK |
407 | if test $ac_cv_func_vfork_works = no; then | |
408 | LIBOBJS="$LIBOBJS vfork.o" | |
409 | fi | |
e490616e ZW |
410 | # We only need _doprnt if we might use it to implement v*printf. |
411 | if test $ac_cv_func_vprintf != yes \ | |
412 | || test $ac_cv_func_vfprintf != yes \ | |
413 | || test $ac_cv_func_vsprintf != yes; then | |
414 | AC_REPLACE_FUNCS(_doprnt) | |
9ce3f7e5 DD |
415 | else |
416 | AC_CHECK_FUNCS(_doprnt) | |
e490616e ZW |
417 | fi |
418 | ||
3affd5f0 JL |
419 | for v in $vars; do |
420 | AC_MSG_CHECKING([for $v]) | |
421 | AC_CACHE_VAL(libiberty_cv_var_$v, | |
9f3dbd92 | 422 | [AC_TRY_LINK([int *p;], [extern int $v []; p = $v;], |
3affd5f0 JL |
423 | [eval "libiberty_cv_var_$v=yes"], |
424 | [eval "libiberty_cv_var_$v=no"])]) | |
425 | if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then | |
426 | AC_MSG_RESULT(yes) | |
427 | n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
428 | AC_DEFINE_UNQUOTED($n) | |
6599da04 | 429 | else |
3affd5f0 | 430 | AC_MSG_RESULT(no) |
6599da04 | 431 | fi |
3affd5f0 JL |
432 | done |
433 | AC_CHECK_FUNCS($checkfuncs) | |
4876b2b4 | 434 | libiberty_NEED_DECLARATION(canonicalize_file_name) |
3affd5f0 JL |
435 | fi |
436 | ||
55d0e5e0 ZW |
437 | # Figure out which version of pexecute to use. |
438 | case "${host}" in | |
55d0e5e0 ZW |
439 | *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;; |
440 | *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;; | |
441 | *-*-msdos*) pexecute=pex-msdos.o ;; | |
442 | *-*-os2-emx*) pexecute=pex-os2.o ;; | |
443 | *) pexecute=pex-unix.o ;; | |
444 | esac | |
445 | AC_SUBST(pexecute) | |
446 | ||
a9266bfa KG |
447 | libiberty_AC_FUNC_STRNCMP |
448 | ||
3affd5f0 JL |
449 | # Install a library built with a cross compiler in $(tooldir) rather |
450 | # than $(libdir). | |
ca6b370d | 451 | if test -z "${with_cross_host}"; then |
3affd5f0 JL |
452 | INSTALL_DEST=libdir |
453 | else | |
454 | INSTALL_DEST=tooldir | |
6599da04 | 455 | fi |
3affd5f0 JL |
456 | AC_SUBST(INSTALL_DEST) |
457 | ||
458 | # We need multilib support, but only if configuring for the target. | |
7c72138a | 459 | AC_OUTPUT(Makefile testsuite/Makefile, |
3affd5f0 JL |
460 | [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h |
461 | if test -n "$CONFIG_FILES"; then | |
cd862df8 | 462 | if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then |
3affd5f0 JL |
463 | # FIXME: We shouldn't need to set ac_file |
464 | ac_file=Makefile | |
6706f116 | 465 | LD="${ORIGINAL_LD_FOR_MULTILIBS}" |
3affd5f0 JL |
466 | . ${libiberty_topdir}/config-ml.in |
467 | fi | |
468 | fi], | |
469 | srcdir=${srcdir} | |
470 | host=${host} | |
471 | target=${target} | |
472 | with_target_subdir=${with_target_subdir} | |
cd862df8 | 473 | with_build_subdir=${with_build_subdir} |
3affd5f0 JL |
474 | with_multisubdir=${with_multisubdir} |
475 | ac_configure_args="--enable-multilib ${ac_configure_args}" | |
476 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
3343fdd2 | 477 | ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" |
3affd5f0 JL |
478 | libiberty_topdir=${libiberty_topdir} |
479 | ) |