[ed8ec1c] | 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 | AC_HELP_STRING([--enable-multilib], |
---|
| 9 | [build many library versions (default=no)]), |
---|
| 10 | [case "${enableval}" in |
---|
| 11 | yes) multilib=yes ;; |
---|
| 12 | no) multilib=no ;; |
---|
| 13 | *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; |
---|
| 14 | esac], [multilib=no])dnl |
---|
| 15 | |
---|
| 16 | AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes") |
---|
| 17 | ]) |
---|
| 18 | |
---|
| 19 | AC_DEFUN([RTEMS_ENABLE_MULTILIB_MASTER], |
---|
| 20 | [ |
---|
| 21 | AC_REQUIRE([RTEMS_ENABLE_MULTILIB]) |
---|
| 22 | |
---|
| 23 | dnl We may get other options which we don't document: |
---|
| 24 | dnl --with-target-subdir, --with-multisrctop, --with-multisubdir |
---|
| 25 | |
---|
| 26 | if test "[$]{srcdir}" = "."; then |
---|
| 27 | if test "[$]{with_target_subdir}" != "."; then |
---|
| 28 | multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])" |
---|
| 29 | else |
---|
| 30 | multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}ifelse([$2],,,[$2])" |
---|
| 31 | fi |
---|
| 32 | else |
---|
| 33 | multilib_basedir="[$]{srcdir}/ifelse([$2],,,[$2])" |
---|
| 34 | fi |
---|
| 35 | AC_SUBST(multilib_basedir) |
---|
| 36 | |
---|
| 37 | if test "${multilib}" = "yes"; then |
---|
| 38 | multilib_arg="--enable-multilib" |
---|
| 39 | else |
---|
| 40 | multilib_arg= |
---|
| 41 | fi |
---|
| 42 | |
---|
| 43 | AC_OUTPUT_COMMANDS( |
---|
| 44 | [case " $CONFIG_FILES " in |
---|
| 45 | *" ]m4_if([$1],,Makefile,[$1])[ "*) |
---|
| 46 | ac_file=]m4_if([$1],,Makefile,[$1])[ . ${multilib_basedir}/config-ml.in |
---|
| 47 | esac], |
---|
| 48 | [ |
---|
| 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 | ]) |
---|