mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-15 20:58:13 +01:00
configure: avoid using a shell function in autoconf
AC_DEFUN exsists for the purpose of creating functions in autoconf scripts, use it instead of a shell function.
This commit is contained in:
parent
b45c27b6ee
commit
09ecaf3e59
1 changed files with 13 additions and 14 deletions
27
configure.in
27
configure.in
|
@ -86,21 +86,20 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
#endif
|
#endif
|
||||||
]])], [ppc_bits=64], [ppc_bits=32])
|
]])], [ppc_bits=64], [ppc_bits=32])
|
||||||
|
|
||||||
get_arch() {
|
AC_DEFUN([SET_ARCH],[
|
||||||
case "$1" in
|
AS_CASE([$1],
|
||||||
arm*) echo arm;;
|
[arm*],[$2=arm],
|
||||||
i?86) echo x86;;
|
[i?86],[$2=x86],
|
||||||
hppa*) echo hppa;;
|
[hppa*],[$2=hppa],
|
||||||
mips*) echo mips;;
|
[mips*],[$2=mips],
|
||||||
powerpc*) echo ppc$ppc_bits;;
|
[powerpc*],[$2=ppc$ppc_bits],
|
||||||
amd64) echo x86_64;;
|
[amd64],[$2=x86_64],
|
||||||
*) echo $1;;
|
[$2=$1])
|
||||||
esac
|
]) dnl SET_ARCH
|
||||||
}
|
|
||||||
|
|
||||||
build_arch=`get_arch $build_cpu`
|
SET_ARCH([$build_cpu],[build_arch])
|
||||||
host_arch=`get_arch $host_cpu`
|
SET_ARCH([$host_cpu],[host_arch])
|
||||||
target_arch=`get_arch $target_cpu`
|
SET_ARCH([$target_cpu],[target_arch])
|
||||||
|
|
||||||
AC_ARG_ENABLE(coredump,
|
AC_ARG_ENABLE(coredump,
|
||||||
AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),
|
AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),
|
||||||
|
|
Loading…
Reference in a new issue