1 | dnl This provides configure definitions used for multilib support |
---|
2 | |
---|
3 | dnl parts of these macros are derived from newlib-1.8.2's multilib support |
---|
4 | |
---|
5 | AC_DEFUN(RTEMS_ENABLE_MULTILIB, |
---|
6 | [ |
---|
7 | AC_ARG_ENABLE(multilib, |
---|
8 | [ --enable-multilib build many library versions (default)], |
---|
9 | [case "${enableval}" in |
---|
10 | yes) multilib=yes ;; |
---|
11 | no) multilib=no ;; |
---|
12 | *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; |
---|
13 | esac], [multilib=no])dnl |
---|
14 | |
---|
15 | AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes") |
---|
16 | ]) |
---|
17 | |
---|
18 | AC_DEFUN(RTEMS_ENABLE_MULTILIB_MASTER, |
---|
19 | [ |
---|
20 | AC_REQUIRE([RTEMS_ENABLE_MULTILIB]) |
---|
21 | |
---|
22 | dnl We may get other options which we don't document: |
---|
23 | dnl --with-target-subdir, --with-multisrctop, --with-multisubdir |
---|
24 | |
---|
25 | test -z "[$]{with_target_subdir}" && with_target_subdir=. |
---|
26 | |
---|
27 | if test "[$]{srcdir}" = "."; then |
---|
28 | if test "[$]{with_target_subdir}" != "."; then |
---|
29 | multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])" |
---|
30 | else |
---|
31 | multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}ifelse([$2],,,[$2])" |
---|
32 | fi |
---|
33 | else |
---|
34 | multilib_basedir="[$]{srcdir}/ifelse([$2],,,[$2])" |
---|
35 | fi |
---|
36 | AC_SUBST(multilib_basedir) |
---|
37 | |
---|
38 | if test "${multilib}" = "yes"; then |
---|
39 | multilib_arg="--enable-multilib" |
---|
40 | else |
---|
41 | multilib_arg= |
---|
42 | fi |
---|
43 | |
---|
44 | AC_OUTPUT_COMMANDS( |
---|
45 | if test -n "$CONFIG_FILES"; do |
---|
46 | $ac_file" = ifelse([$1],,Makefile,[$1]) \ |
---|
47 | . ${multilib_basedir}/../config-ml.in |
---|
48 | fi, |
---|
49 | srcdir=${srcdir} |
---|
50 | host=${host} |
---|
51 | target=${target} |
---|
52 | # with_multisrctop="${with_multisrctop}" |
---|
53 | # with_target_subdir="${with_target_subdir}" |
---|
54 | with_multisubdir="${with_multisubdir}" |
---|
55 | ac_configure_args="${multilib_arg} ${ac_configure_args}" |
---|
56 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
57 | multilib_basedir=${multilib_basedir} |
---|
58 | CC="${CC}") |
---|
59 | ]) |
---|