net-snmp 5.1.2: Fix endianess detection to work on all platforms by looking
authorJamie Lenehan <lenehan@twibble.org>
Sat, 27 May 2006 02:14:04 +0000 (02:14 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sat, 27 May 2006 02:14:04 +0000 (02:14 +0000)
at the site file to determine the correct configure parameter (inspired by
how openssl does this). Previously this built on mipsel only. Should build
on all platforms now. Closes bug #483.

packages/net-snmp/net-snmp_5.1.2.bb

index fe7e9dd..60c8fee 100644 (file)
@@ -12,12 +12,19 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
 inherit autotools
 
 EXTRA_OECONF = "--enable-shared --disable-manuals" 
-EXTRA_OECONF_mipsel += "--with-endianness=little"
-
 EXTRA_OEMAKE = "INSTALL_PREFIX=${D}"
 
 do_configure() {
-       oe_runconf
+       # endianness fun.. inspired by openssl.inc
+       . ${CONFIG_SITE}
+       if test "x$ac_cv_c_bigendian" = "xyes"; then
+           ENDIANESS=" --with-endianness=big"
+       elif test "x$ac_cv_c_littleendian" = "xyes"; then
+           ENDIANESS=" --with-endianness=little"
+       else
+           oefatal do_configure cannot determine endianess
+       fi
+       oe_runconf $ENDIANESS
 }
 
 do_install_append() {