diff options
author | Ian Lance Taylor <iant@google.com> | 2007-09-04 20:00:53 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-09-04 20:00:53 +0000 |
commit | 193a53d920ac7248cf6a3d8e36f74e9b9100b93b (patch) | |
tree | fe5c87514693b22f2705d4f8d92fd94d7978781e /gold/configure.ac | |
parent | 64707334c75cdf16a0c2d317fc381c9b158beed9 (diff) | |
download | gdb-193a53d920ac7248cf6a3d8e36f74e9b9100b93b.zip gdb-193a53d920ac7248cf6a3d8e36f74e9b9100b93b.tar.gz gdb-193a53d920ac7248cf6a3d8e36f74e9b9100b93b.tar.bz2 |
Add support for --enable-target to control which template
specializations we generate.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r-- | gold/configure.ac | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac index 5cbaf2c..402933d 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -10,6 +10,75 @@ AM_INIT_AUTOMAKE(gold, 0.1) AM_CONFIG_HEADER(config.h:config.in) +AC_ARG_ENABLE([targets], +[ --enable-targets alternative target configurations], +[case "${enableval}" in + yes | "") + AC_MSG_ERROR([--enable-targets option must specify target names or 'all']) + ;; + no) + enable_targets= + ;; + *) + enable_targets=$enableval + ;; +esac], +[# For now, enable all targets by default + enable_targets=all +]) + +# Canonicalize the enabled targets. +if test -n "$enable_targets"; then + for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do + result=`$ac_config_sub $targ 2>/dev/null` + if test -n "$result"; then + canon_targets="$canon_targets $result" + else + # Permit unrecognized target names, like "all". + canon_targets="$canon_targets $targ" + fi + done +fi + +# See which specific instantiations we need. +for targ in $target $canon_targets; do + targ_32_little= + targ_32_big= + targ_64_little= + targ_64_big= + if test "$targ" = "all"; then + targ_32_little=yes + targ_32_big=yes + targ_64_little=yes + targ_64_big=yes + else + case "$targ" in + i?86-*) targ_32_little=yes ;; + x86_64-*) targ_64_little=yes ;; + *) + AC_MSG_ERROR("target $targ: unknown size and endianness") + ;; + esac + fi +done + +if test -n "$targ_32_little"; then + AC_DEFINE(HAVE_TARGET_32_LITTLE, 1, + [Define to support 32-bit little-endian targets]) +fi +if test -n "$targ_32_big"; then + AC_DEFINE(HAVE_TARGET_32_BIG, 1, + [Define to support 32-bit big-endian targets]) +fi +if test -n "$targ_64_little"; then + AC_DEFINE(HAVE_TARGET_64_LITTLE, 1, + [Define to support 64-bit little-endian targets]) +fi +if test -n "$targ_64_big"; then + AC_DEFINE(HAVE_TARGET_64_BIG, 1, + [Define to support 64-bit big-endian targets]) +fi + AC_PROG_CC AC_PROG_CXX AC_PROG_YACC |