| 14621 |
|
done |
| 14622 |
|
|
| 14623 |
|
|
| 14624 |
– |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
| 14625 |
– |
$as_echo_n "checking whether byte ordering is bigendian... " >&6; } |
| 14626 |
– |
if ${ac_cv_c_bigendian+:} false; then : |
| 14627 |
– |
$as_echo_n "(cached) " >&6 |
| 14628 |
– |
else |
| 14629 |
– |
ac_cv_c_bigendian=unknown |
| 14630 |
– |
# See if we're dealing with a universal compiler. |
| 14631 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14632 |
– |
/* end confdefs.h. */ |
| 14633 |
– |
#ifndef __APPLE_CC__ |
| 14634 |
– |
not a universal capable compiler |
| 14635 |
– |
#endif |
| 14636 |
– |
typedef int dummy; |
| 14637 |
– |
|
| 14638 |
– |
_ACEOF |
| 14639 |
– |
if ac_fn_c_try_compile "$LINENO"; then : |
| 14640 |
– |
|
| 14641 |
– |
# Check for potential -arch flags. It is not universal unless |
| 14642 |
– |
# there are at least two -arch flags with different values. |
| 14643 |
– |
ac_arch= |
| 14644 |
– |
ac_prev= |
| 14645 |
– |
for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do |
| 14646 |
– |
if test -n "$ac_prev"; then |
| 14647 |
– |
case $ac_word in |
| 14648 |
– |
i?86 | x86_64 | ppc | ppc64) |
| 14649 |
– |
if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then |
| 14650 |
– |
ac_arch=$ac_word |
| 14651 |
– |
else |
| 14652 |
– |
ac_cv_c_bigendian=universal |
| 14653 |
– |
break |
| 14654 |
– |
fi |
| 14655 |
– |
;; |
| 14656 |
– |
esac |
| 14657 |
– |
ac_prev= |
| 14658 |
– |
elif test "x$ac_word" = "x-arch"; then |
| 14659 |
– |
ac_prev=arch |
| 14660 |
– |
fi |
| 14661 |
– |
done |
| 14662 |
– |
fi |
| 14663 |
– |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14664 |
– |
if test $ac_cv_c_bigendian = unknown; then |
| 14665 |
– |
# See if sys/param.h defines the BYTE_ORDER macro. |
| 14666 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14667 |
– |
/* end confdefs.h. */ |
| 14668 |
– |
#include <sys/types.h> |
| 14669 |
– |
#include <sys/param.h> |
| 14670 |
– |
|
| 14671 |
– |
int |
| 14672 |
– |
main () |
| 14673 |
– |
{ |
| 14674 |
– |
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
| 14675 |
– |
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ |
| 14676 |
– |
&& LITTLE_ENDIAN) |
| 14677 |
– |
bogus endian macros |
| 14678 |
– |
#endif |
| 14679 |
– |
|
| 14680 |
– |
; |
| 14681 |
– |
return 0; |
| 14682 |
– |
} |
| 14683 |
– |
_ACEOF |
| 14684 |
– |
if ac_fn_c_try_compile "$LINENO"; then : |
| 14685 |
– |
# It does; now see whether it defined to BIG_ENDIAN or not. |
| 14686 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14687 |
– |
/* end confdefs.h. */ |
| 14688 |
– |
#include <sys/types.h> |
| 14689 |
– |
#include <sys/param.h> |
| 14690 |
– |
|
| 14691 |
– |
int |
| 14692 |
– |
main () |
| 14693 |
– |
{ |
| 14694 |
– |
#if BYTE_ORDER != BIG_ENDIAN |
| 14695 |
– |
not big endian |
| 14696 |
– |
#endif |
| 14697 |
– |
|
| 14698 |
– |
; |
| 14699 |
– |
return 0; |
| 14700 |
– |
} |
| 14701 |
– |
_ACEOF |
| 14702 |
– |
if ac_fn_c_try_compile "$LINENO"; then : |
| 14703 |
– |
ac_cv_c_bigendian=yes |
| 14704 |
– |
else |
| 14705 |
– |
ac_cv_c_bigendian=no |
| 14706 |
– |
fi |
| 14707 |
– |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14708 |
– |
fi |
| 14709 |
– |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14710 |
– |
fi |
| 14711 |
– |
if test $ac_cv_c_bigendian = unknown; then |
| 14712 |
– |
# See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). |
| 14713 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14714 |
– |
/* end confdefs.h. */ |
| 14715 |
– |
#include <limits.h> |
| 14716 |
– |
|
| 14717 |
– |
int |
| 14718 |
– |
main () |
| 14719 |
– |
{ |
| 14720 |
– |
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) |
| 14721 |
– |
bogus endian macros |
| 14722 |
– |
#endif |
| 14723 |
– |
|
| 14724 |
– |
; |
| 14725 |
– |
return 0; |
| 14726 |
– |
} |
| 14727 |
– |
_ACEOF |
| 14728 |
– |
if ac_fn_c_try_compile "$LINENO"; then : |
| 14729 |
– |
# It does; now see whether it defined to _BIG_ENDIAN or not. |
| 14730 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14731 |
– |
/* end confdefs.h. */ |
| 14732 |
– |
#include <limits.h> |
| 14733 |
– |
|
| 14734 |
– |
int |
| 14735 |
– |
main () |
| 14736 |
– |
{ |
| 14737 |
– |
#ifndef _BIG_ENDIAN |
| 14738 |
– |
not big endian |
| 14739 |
– |
#endif |
| 14740 |
– |
|
| 14741 |
– |
; |
| 14742 |
– |
return 0; |
| 14743 |
– |
} |
| 14744 |
– |
_ACEOF |
| 14745 |
– |
if ac_fn_c_try_compile "$LINENO"; then : |
| 14746 |
– |
ac_cv_c_bigendian=yes |
| 14747 |
– |
else |
| 14748 |
– |
ac_cv_c_bigendian=no |
| 14749 |
– |
fi |
| 14750 |
– |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14751 |
– |
fi |
| 14752 |
– |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14753 |
– |
fi |
| 14754 |
– |
if test $ac_cv_c_bigendian = unknown; then |
| 14755 |
– |
# Compile a test program. |
| 14756 |
– |
if test "$cross_compiling" = yes; then : |
| 14757 |
– |
# Try to guess by grepping values from an object file. |
| 14758 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14759 |
– |
/* end confdefs.h. */ |
| 14760 |
– |
short int ascii_mm[] = |
| 14761 |
– |
{ 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
| 14762 |
– |
short int ascii_ii[] = |
| 14763 |
– |
{ 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; |
| 14764 |
– |
int use_ascii (int i) { |
| 14765 |
– |
return ascii_mm[i] + ascii_ii[i]; |
| 14766 |
– |
} |
| 14767 |
– |
short int ebcdic_ii[] = |
| 14768 |
– |
{ 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
| 14769 |
– |
short int ebcdic_mm[] = |
| 14770 |
– |
{ 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; |
| 14771 |
– |
int use_ebcdic (int i) { |
| 14772 |
– |
return ebcdic_mm[i] + ebcdic_ii[i]; |
| 14773 |
– |
} |
| 14774 |
– |
extern int foo; |
| 14775 |
– |
|
| 14776 |
– |
int |
| 14777 |
– |
main () |
| 14778 |
– |
{ |
| 14779 |
– |
return use_ascii (foo) == use_ebcdic (foo); |
| 14780 |
– |
; |
| 14781 |
– |
return 0; |
| 14782 |
– |
} |
| 14783 |
– |
_ACEOF |
| 14784 |
– |
if ac_fn_c_try_compile "$LINENO"; then : |
| 14785 |
– |
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then |
| 14786 |
– |
ac_cv_c_bigendian=yes |
| 14787 |
– |
fi |
| 14788 |
– |
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then |
| 14789 |
– |
if test "$ac_cv_c_bigendian" = unknown; then |
| 14790 |
– |
ac_cv_c_bigendian=no |
| 14791 |
– |
else |
| 14792 |
– |
# finding both strings is unlikely to happen, but who knows? |
| 14793 |
– |
ac_cv_c_bigendian=unknown |
| 14794 |
– |
fi |
| 14795 |
– |
fi |
| 14796 |
– |
fi |
| 14797 |
– |
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14798 |
– |
else |
| 14799 |
– |
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14800 |
– |
/* end confdefs.h. */ |
| 14801 |
– |
$ac_includes_default |
| 14802 |
– |
int |
| 14803 |
– |
main () |
| 14804 |
– |
{ |
| 14805 |
– |
|
| 14806 |
– |
/* Are we little or big endian? From Harbison&Steele. */ |
| 14807 |
– |
union |
| 14808 |
– |
{ |
| 14809 |
– |
long int l; |
| 14810 |
– |
char c[sizeof (long int)]; |
| 14811 |
– |
} u; |
| 14812 |
– |
u.l = 1; |
| 14813 |
– |
return u.c[sizeof (long int) - 1] == 1; |
| 14814 |
– |
|
| 14815 |
– |
; |
| 14816 |
– |
return 0; |
| 14817 |
– |
} |
| 14818 |
– |
_ACEOF |
| 14819 |
– |
if ac_fn_c_try_run "$LINENO"; then : |
| 14820 |
– |
ac_cv_c_bigendian=no |
| 14821 |
– |
else |
| 14822 |
– |
ac_cv_c_bigendian=yes |
| 14823 |
– |
fi |
| 14824 |
– |
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14825 |
– |
conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 14826 |
– |
fi |
| 14827 |
– |
|
| 14828 |
– |
fi |
| 14829 |
– |
fi |
| 14830 |
– |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
| 14831 |
– |
$as_echo "$ac_cv_c_bigendian" >&6; } |
| 14832 |
– |
case $ac_cv_c_bigendian in #( |
| 14833 |
– |
yes) |
| 14834 |
– |
$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h |
| 14835 |
– |
;; #( |
| 14836 |
– |
no) |
| 14837 |
– |
;; #( |
| 14838 |
– |
universal) |
| 14839 |
– |
|
| 14840 |
– |
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
| 14841 |
– |
|
| 14842 |
– |
;; #( |
| 14843 |
– |
*) |
| 14844 |
– |
as_fn_error $? "unknown endianness |
| 14845 |
– |
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
| 14846 |
– |
esac |
| 14847 |
– |
|
| 14848 |
– |
|
| 14624 |
|
ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/libopm/Makefile src/libopm/src/Makefile" |
| 14625 |
|
|
| 14626 |
|
cat >confcache <<\_ACEOF |
| 14765 |
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 14766 |
|
fi |
| 14767 |
|
|
| 14993 |
– |
|
| 14768 |
|
: "${CONFIG_STATUS=./config.status}" |
| 14769 |
|
ac_write_fail=0 |
| 14770 |
|
ac_clean_files_save=$ac_clean_files |