Consolidate the target selection options into a single option,

--enable-target which can take values "all", "host-only" or a comma
separated list of target names (alpha,ia64,powerpc,skeleton,sparc,x86)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21447 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2005-04-22 17:02:18 +00:00
parent 500b4dba32
commit 99d1fccfb9
2 changed files with 94 additions and 154 deletions

View File

@ -238,49 +238,36 @@ esac
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""
AC_ARG_ENABLE([target-this],AS_HELP_STRING([--enable-target-this],
[Build only the current host's target (default is NO)]),,enable_target_this=no)
AC_ARG_ENABLE([target-x86],AS_HELP_STRING([--enable-target-x86],
[Build the x86 target (default is YES)]),,enable_target_x86=yes)
AC_ARG_ENABLE([target-x86-64],AS_HELP_STRING([--enable-target-x86-64],
[Build the x86_64 target (default is YES)]),,enable_target_x86_64=yes)
AC_ARG_ENABLE([target-sparc],AS_HELP_STRING([--enable-target-sparc],
[Build the Sparc target (default is YES)]),,enable_target_sparc=yes)
AC_ARG_ENABLE([target-powerpc],AS_HELP_STRING([--enable-target-powerpc],
[Build the PowerPC target (default is YES)]),,enable_target_powerpc=yes)
AC_ARG_ENABLE([target-alpha],AS_HELP_STRING([--enable-target-alpha],
[Build the Alpha target (default is YES)]),,enable_target_alpha=yes)
AC_ARG_ENABLE(]target-ia64],AS_HELP_STRING([--enable-target-ia64],
[Build the IA64 target (default is YES)]),,enable_target_ia64=yes)
if test "$enable_target_this" = "yes" ; then
case "$llvm_cv_target_arch" in
x86) TARGETS_TO_BUILD="X86" ;;
x86_64) TARGETS_TO_BUILD="X86" ;;
Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
Alpha) TARGETS_TO_BUILD="Alpha" ;;
IA64) TARGETS_TO_BUILD="IA64" ;;
*) AC_MSG_ERROR([Can not set target to build]) ;;
esac
else
if test "$enable_target_x86" = "yes" -o "$enable_target_x86_64" = "yes" ; then
TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD"
fi
if test "$enable_target_sparc" = "yes" ; then
TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD"
fi
if test "$enable_target_powerpc" = "yes" ; then
TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD"
fi
if test "$enable_target_alpha" = "yes" ; then
TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD"
fi
if test "$enable_target_ia64" = "yes" ; then
TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD"
fi
fi
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-target],
[Build specific host targets: all,host-only,{target-name} (default=all)]),,
enableval=all)
case "$enableval" in
all) TARGETS_TO_BUILD="X86 SparcV8 SparcV9 PowerPC Alpha IA64" ;;
host-only)
case "$llvm_cv_target_arch" in
x86) TARGETS_TO_BUILD="X86" ;;
x86_64) TARGETS_TO_BUILD="X86" ;;
Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
Alpha) TARGETS_TO_BUILD="Alpha" ;;
IA64) TARGETS_TO_BUILD="IA64" ;;
*) AC_MSG_ERROR([Can not set target to build]) ;;
esac
;;
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
case "$a_target" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
sparc) TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD" ;;
powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;;
alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;;
ia64) TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD" ;;
skeleton)TARGETS_TO_BUILD="Skeleton $TARGETS_TO_BUILD";;
*) AC_MSG_ERROR([Unrecognized target $a_target]) ;;
esac
done
;;
esac
AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD)
dnl Allow a specific llvm-gcc/llvm-g++ pair to be used with this LLVM config.

175
configure vendored
View File

@ -1037,13 +1037,8 @@ Optional Features:
--enable-optimized
--enable-jit Enable Just In Time Compiling (default is YES)
--enable-doxygen Build doxygen documentation (default is NO)
--enable-target-this Build only the current host's target (default is NO)
--enable-target-x86 Build the x86 target (default is YES)
--enable-target-x86-64 Build the x86_64 target (default is YES)
--enable-target-sparc Build the Sparc target (default is YES)
--enable-target-powerpc Build the PowerPC target (default is YES)
--enable-target-alpha Build the Alpha target (default is YES)
--enable-target-ia64 Build the IA64 target (default is YES)
--enable-target Build specific host targets:
all,host-only,{target-name} (default=all)
--enable-ltdl-install install libltdl
--enable-shared[=PKGS]
build shared libraries [default=yes]
@ -3039,86 +3034,44 @@ echo "$as_me: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"
esac
TARGETS_TO_BUILD=""
# Check whether --enable-target-this or --disable-target-this was given.
if test "${enable_target_this+set}" = set; then
enableval="$enable_target_this"
# Check whether --enable-targets or --disable-targets was given.
if test "${enable_targets+set}" = set; then
enableval="$enable_targets"
else
enable_target_this=no
enableval=all
fi;
# Check whether --enable-target-x86 or --disable-target-x86 was given.
if test "${enable_target_x86+set}" = set; then
enableval="$enable_target_x86"
else
enable_target_x86=yes
fi;
# Check whether --enable-target-x86-64 or --disable-target-x86-64 was given.
if test "${enable_target_x86_64+set}" = set; then
enableval="$enable_target_x86_64"
else
enable_target_x86_64=yes
fi;
# Check whether --enable-target-sparc or --disable-target-sparc was given.
if test "${enable_target_sparc+set}" = set; then
enableval="$enable_target_sparc"
else
enable_target_sparc=yes
fi;
# Check whether --enable-target-powerpc or --disable-target-powerpc was given.
if test "${enable_target_powerpc+set}" = set; then
enableval="$enable_target_powerpc"
else
enable_target_powerpc=yes
fi;
# Check whether --enable-target-alpha or --disable-target-alpha was given.
if test "${enable_target_alpha+set}" = set; then
enableval="$enable_target_alpha"
else
enable_target_alpha=yes
fi;
# Check whether --enable-]target-ia64] or --disable-]target-ia64] was given.
if test "${enable_target_ia64]]+set}" = set; then
enableval="$enable_target_ia64]]"
else
enable_target_ia64=yes
fi;
if test "$enable_target_this" = "yes" ; then
case "$llvm_cv_target_arch" in
x86) TARGETS_TO_BUILD="X86" ;;
x86_64) TARGETS_TO_BUILD="X86" ;;
Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
Alpha) TARGETS_TO_BUILD="Alpha" ;;
IA64) TARGETS_TO_BUILD="IA64" ;;
*) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5
case "$enableval" in
all) TARGETS_TO_BUILD="X86 SparcV8 SparcV9 PowerPC Alpha IA64" ;;
host-only)
case "$llvm_cv_target_arch" in
x86) TARGETS_TO_BUILD="X86" ;;
x86_64) TARGETS_TO_BUILD="X86" ;;
Sparc) TARGETS_TO_BUILD="SparcV8 SparcV9" ;;
PowerPC) TARGETS_TO_BUILD="PowerPC" ;;
Alpha) TARGETS_TO_BUILD="Alpha" ;;
IA64) TARGETS_TO_BUILD="IA64" ;;
*) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5
echo "$as_me: error: Can not set target to build" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
if test "$enable_target_x86" = "yes" -o "$enable_target_x86_64" = "yes" ; then
TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD"
fi
if test "$enable_target_sparc" = "yes" ; then
TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD"
fi
if test "$enable_target_powerpc" = "yes" ; then
TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD"
fi
if test "$enable_target_alpha" = "yes" ; then
TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD"
fi
if test "$enable_target_ia64" = "yes" ; then
TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD"
fi
fi
esac
;;
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
case "$a_target" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
sparc) TARGETS_TO_BUILD="SparcV8 SparcV9 $TARGETS_TO_BUILD" ;;
powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;;
alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;;
ia64) TARGETS_TO_BUILD="IA64 $TARGETS_TO_BUILD" ;;
skeleton)TARGETS_TO_BUILD="Skeleton $TARGETS_TO_BUILD";;
*) { { echo "$as_me:$LINENO: error: Unrecognized target $a_target" >&5
echo "$as_me: error: Unrecognized target $a_target" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
done
;;
esac
TARGETS_TO_BUILD=$TARGETS_TO_BUILD
@ -8283,7 +8236,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8286 "configure"
#line 8239 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10274,7 +10227,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 10277 "configure"' > conftest.$ac_ext
echo '#line 10230 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -10759,7 +10712,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:10762:" \
echo "$as_me:10715:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -11816,11 +11769,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11819: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11772: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11823: \$? = $ac_status" >&5
echo "$as_me:11776: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -12059,11 +12012,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12062: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12015: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:12066: \$? = $ac_status" >&5
echo "$as_me:12019: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -12119,11 +12072,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:12122: $lt_compile\"" >&5)
(eval echo "\"\$as_me:12075: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:12126: \$? = $ac_status" >&5
echo "$as_me:12079: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -14304,7 +14257,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 14307 "configure"
#line 14260 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -14402,7 +14355,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 14405 "configure"
#line 14358 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -16595,11 +16548,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16598: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16551: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16602: \$? = $ac_status" >&5
echo "$as_me:16555: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -16655,11 +16608,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16658: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16611: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:16662: \$? = $ac_status" >&5
echo "$as_me:16615: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -18016,7 +17969,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 18019 "configure"
#line 17972 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -18114,7 +18067,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 18117 "configure"
#line 18070 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -18951,11 +18904,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:18954: $lt_compile\"" >&5)
(eval echo "\"\$as_me:18907: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:18958: \$? = $ac_status" >&5
echo "$as_me:18911: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -19011,11 +18964,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:19014: $lt_compile\"" >&5)
(eval echo "\"\$as_me:18967: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:19018: \$? = $ac_status" >&5
echo "$as_me:18971: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -21050,11 +21003,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:21053: $lt_compile\"" >&5)
(eval echo "\"\$as_me:21006: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:21057: \$? = $ac_status" >&5
echo "$as_me:21010: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -21293,11 +21246,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:21296: $lt_compile\"" >&5)
(eval echo "\"\$as_me:21249: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:21300: \$? = $ac_status" >&5
echo "$as_me:21253: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -21353,11 +21306,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:21356: $lt_compile\"" >&5)
(eval echo "\"\$as_me:21309: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:21360: \$? = $ac_status" >&5
echo "$as_me:21313: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -23538,7 +23491,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 23541 "configure"
#line 23494 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -23636,7 +23589,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 23639 "configure"
#line 23592 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H