Debian Codegraph @

config/multi.m4

raw
1 ## -*- Autoconf -*-
2 # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2008
3 # Free Software Foundation, Inc.
4 #
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # serial 6
10
11 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
12 # ---------------------------------------------------
13 # Add --enable-multilib to configure.
14 AC_DEFUN([AM_ENABLE_MULTILIB],
15 [# Default to --enable-multilib
16 AC_ARG_ENABLE(multilib,
17 [ --enable-multilib build many library versions (default)],
18 [case "$enableval" in
19 yes) multilib=yes ;;
20 no) multilib=no ;;
21 *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
22 esac],
23 [multilib=yes])
24
25 # Determine whether or not -Os multilibs are enabled.
26 #
27 # no: Do not add -Os libs
28 # except: Add -Os libs, C++ libs will leave exceptions and unwind options alone
29 # yes: Add -Os libs, C++ libs will disable exceptions and unwinding
30 #
31 AC_ARG_ENABLE(multilib-space,
32 [AS_HELP_STRING([--enable-multilib-space=yes,no,except],
33 [enable extra -Os variant for every multilib ABI])],
34 [case "$enableval" in
35 yes|except|no) ;;
36 *) AC_MSG_ERROR([bad value $enableval for multilib-space option]) ;;
37 esac;
38 case "$enable_multilib_space"":$enable_target_optspace" in
39 no:*|*:no) ;;
40 *:yes) AC_MSG_ERROR([Cannot combine --enable-multilib-space with --enable-target-optspace]) ;;
41 esac],
42 [enable_multilib_space=no])
43
44 # We may get other options which we leave undocumented:
45 # --with-target-subdir, --with-multisrctop, --with-multisubdir
46 # See config-ml.in if you want the gory details.
47
48 if test "$srcdir" = "."; then
49 if test "$with_target_subdir" != "."; then
50 multi_basedir="$srcdir/$with_multisrctop../$2"
51 else
52 multi_basedir="$srcdir/$with_multisrctop$2"
53 fi
54 else
55 multi_basedir="$srcdir/$2"
56 fi
57 AC_SUBST(multi_basedir)
58
59 # Even if the default multilib is not a cross compilation,
60 # it may be that some of the other multilibs are.
61 if test $cross_compiling = no && test $multilib = yes \
62 && test "x${with_multisubdir}" != x ; then
63 cross_compiling=maybe
64 fi
65
66 AC_OUTPUT_COMMANDS([
67 # Only add multilib support code if we just rebuilt the top-level
68 # Makefile.
69 case " $CONFIG_FILES " in
70 *" ]m4_default([$1],Makefile)[ "*)
71 ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
72 ;;
73 esac],
74 [
75 srcdir="$srcdir"
76 host="$host"
77 target="$target"
78 with_multisubdir="$with_multisubdir"
79 with_multisrctop="$with_multisrctop"
80 with_target_subdir="$with_target_subdir"
81 ac_configure_args="${multilib_arg} ${ac_configure_args}"
82 multi_basedir="$multi_basedir"
83 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
84 CC="$CC"
85 CXX="$CXX"
86 GFORTRAN="$GFORTRAN"
87 GDC="$GDC"])])dnl