hping2 2.0.0rc3: Update the endianess test to handle the situation where only
authorJamie Lenehan <lenehan@twibble.org>
Wed, 16 Aug 2006 14:54:39 +0000 (14:54 +0000)
committerJamie Lenehan <lenehan@twibble.org>
Wed, 16 Aug 2006 14:54:39 +0000 (14:54 +0000)
{big,litte}endian is set to "no" and neither of them is set to "yes". Saying
it's "not big endian" seems a bit backwards but that's what some site files
seem to get by with. Same fix as for net-snmp as per #1320.

packages/hping/hping2_1.9.9+2.0.0rc3.bb

index 912f7c4..cedcf97 100644 (file)
@@ -24,14 +24,15 @@ S="${WORKDIR}/hping2-rc3"
 do_configure() {
        # endianness fun.. inspired by openssl.inc
        . ${CONFIG_SITE}
-        BYTEORDER="UNKNOWN"
-       if test "x$ac_cv_c_bigendian" = "xyes"; then
+       BYTEORDER="UNKNOWN"
+       if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
            BYTEORDER="__BIG_ENDIAN_BITFIELD"
-       elif test "x$ac_cv_c_littleendian" = "xyes"; then
+       elif [ "x$ac_cv_c_littleendian" = "xyes" -o "x$ac_cv_c_bigendian" = "xno" ]; then
            BYTEORDER="__LITTLE_ENDIAN_BITFIELD"
        else
            oefatal do_configure cannot determine endianess
        fi
+       oenote Determined byteorder as: $BYTEORDER
        BYTEORDER="${BYTEORDER}" CONFIGOSTYPE="LINUX" ./configure
 }