Source: libhdf4
Version: 4.3.1-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

libhdf4 fails to cross build from source, because it uses AC_RUN_IFELSE 
to check for whether SZ_encoder_enabled() returns true-ish. We cannot 
test this during cross compilation, but it has only ever returned 
trueish for a long time. Therefore I suggest accepting a patch that 
guesses the result as trueish for cross compilation only.

Helmut
--- libhdf4-4.3.1.orig/configure.ac
+++ libhdf4-4.3.1/configure.ac
@@ -844,15 +844,16 @@
         else
             exit(1);
     }
-    ]])],[CAN_ENCODE="yes"],[CAN_ENCODE="no"],[])
-
-    ## Report szip encoder test results
-    if test "X$CAN_ENCODE" = "Xyes"; then
+    ]])],[
         AC_MSG_RESULT([yes])
-    fi
-    if test "X$CAN_ENCODE" = "Xno"; then
+        CAN_ENCODE="yes"
+    ],[
         AC_MSG_RESULT([no])
-    fi
+        CAN_ENCODE="no"
+    ],[
+        AC_MSG_RESULT([cross compiling. guessing yes])
+        CAN_ENCODE="yes"
+    ])
 
     ## Add "szip" to external filter list
     if test "X$CAN_ENCODE" = "Xyes"; then

Reply via email to