Fix for build failure or i386 arch

Bug #115744 reported by Meethune
2
Affects Status Importance Assigned to Milestone
pwlib (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This patch fixes build failure for i386 -> https://launchpad.net/+builds/+build/331631

#! /bin/sh /usr/share/dpatch/dpatch-run
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad pwlib-1.10.7~/plugins/configure pwlib-1.10.7/plugins/configure
--- pwlib-1.10.7~/plugins/configure 2007-02-19 17:28:42.000000000 -0500
+++ pwlib-1.10.7/plugins/configure 2007-05-20 09:07:06.000000000 -0400
@@ -4322,15 +4322,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h. */

-#ifdef __linux__
-#include <linux/types.h>
-#include <linux/time.h>
-#else
-#ifdef __sun
-#include <sys/types.h>
-#include <sys/time.h>
-#endif
-#endif
+ #ifdef __linux__
+ #include <linux/types.h>
+ #endif

 #include <$VIDEODEV>
@@ -4367,6 +4361,74 @@
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   V4L2HDR=1
+else
+
+ # We can't use AC_CHECK_HEADER again because
+ # the value is cached, perhaps we have another
+ # method to do this more cleanly ?
+ { echo "$as_me:$LINENO: checking for $VIDEODEV with sys/types.h" >&5
+echo $ECHO_N "checking for $VIDEODEV with sys/types.h... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #ifdef __linux__
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #else
+ #ifdef __sun
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #endif
+ #endif
+
+int
+main ()
+{
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ V4L2HDR=1
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi

@@ -4384,6 +4446,7 @@
 fi

+
 # Check whether --enable-bsdvideo was given.
 if test "${enable_bsdvideo+set}" = set; then
   enableval=$enable_bsdvideo;
diff -urNad pwlib-1.10.7~/plugins/configure.in pwlib-1.10.7/plugins/configure.in
--- pwlib-1.10.7~/plugins/configure.in 2007-02-19 17:28:42.000000000 -0500
+++ pwlib-1.10.7/plugins/configure.in 2007-05-20 09:06:44.000000000 -0400
@@ -133,18 +133,40 @@
   else
     VIDEODEV="linux/videodev2.h"
   fi
- AC_CHECK_HEADER($VIDEODEV, [V4L2HDR=1], [],
-[
-#ifdef __linux__
-#include <linux/types.h>
-#include <linux/time.h>
-#else
-#ifdef __sun
-#include <sys/types.h>
-#include <sys/time.h>
-#endif
-#endif
-])
+ AC_CHECK_HEADER($VIDEODEV,
+ [V4L2HDR=1],
+ [
+ # We can't use AC_CHECK_HEADER again because
+ # the value is cached, perhaps we have another
+ # method to do this more cleanly ?
+ AC_MSG_CHECKING([for $VIDEODEV with sys/types.h])
+ AC_TRY_COMPILE([
+ #ifdef __linux__
+ #include <sys/types.h>
+ #include <linux/types.h>
+ #else
+ #ifdef __sun
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #endif
+ #endif
+ ],
+ [
+ return 0;
+ ],
+ [
+ V4L2HDR=1
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
+ ],
+ [
+ #ifdef __linux__
+ #include <linux/types.h>
+ #endif
+ ])
   AC_MSG_CHECKING(for V4L2 video support)
   if test "${V4L2HDR}z" != "z"; then
     AC_SUBST(HAS_V4L2, 1)
@@ -154,6 +176,7 @@
   fi
 fi

+
 dnl #########################################################################
 dnl check for BSD video capture support
 dnl ########################################################################

Related branches

Revision history for this message
Meethune (meethune) wrote :

Here is an attached patch. Sorry about posting patch inline.

Revision history for this message
Stephen Cook (siti) wrote :

Thanks very much meethune.

I have created a debdiff and will alert a developer that can upload it :)

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks a lot you two. I just uploaded the fix.

 pwlib (1.10.7-0ubuntu2) feisty; urgency=low
 .
   * Build bug fix for i386
    - Added the patch to fix configure's check of v4l2
      thanks to Meethune Bhowmick. (closes: #115744)

Changed in pwlib:
status: Unconfirmed → Fix Released
Revision history for this message
Daniel Holbach (dholbach) wrote :

I had to change 'feisty' to 'gutsy' in debian/changelog (and we use '(LP: #<number>)' - but still... thanks a lot you two. :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.