After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541543 - fix HAVE_OSS4 detection code in configure.ac
fix HAVE_OSS4 detection code in configure.ac
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal minor
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-04 11:52 UTC by Damien Lespiau
Modified: 2008-07-04 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the detection of OSS4 for a windows build (551 bytes, patch)
2008-07-04 11:54 UTC, Damien Lespiau
committed Details | Review

Description Damien Lespiau 2008-07-04 11:52:51 UTC
Building -bad with mingw32 triggers a bug in the way the configure script decide if the OSS4 plugin can be built.

The following use of AG_GST_CHECK_FEATURE won't work as expected: 

AG_GST_CHECK_FEATURE(OSS4, [Open Sound System 4], oss4, [
   AC_MSG_CHECKING([Checking if we can build the OSS4 elements])
   AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/stat.h sys/types.h],
      [HAVE_OSS4="yes"], [HAVE_OSS4="no"])
])

AG_GST_CHECK_FEATURE wants to have either HAVE_XXX=yes or HAVE_XXX=no at the end of the day. AC_CHECK_HEADERS executes either HAVE_OSS4=yes or HAVE_OSS4=no for each header specified. When building for windows with mingw32 we do have fcntl.h, sys/stat.h and sys/types.h but not ioctl.h and then the value of HAVE_OSS4 goes like this:
HAVE_OSS4=yes
HAVE_OSS4=no (sys/ioctl.h check)
HAVE_OSS4=yes
HAVE_OSS4=yes

thus the configure script is telling automake the OSS4 plugin can be built. (yes HAVE_OSS4 is overwritten by the tests of sys/stat.h and sys/types.h)

----

The following patch fix the issue (I tested the newly created configure script with a cross mingw32-gcc and with the native gcc of a linux box)
Comment 1 Damien Lespiau 2008-07-04 11:54:12 UTC
Created attachment 113979 [details] [review]
Fix the detection of OSS4 for a windows build
Comment 2 Sebastian Dröge (slomo) 2008-07-04 18:52:26 UTC
2008-07-04  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        Patch by: Damien Lespiau <damien dot lespiau at gmail dot com>

        * configure.ac:
        Fix checking of headers for the OSS4 plugin to fail if a single
        header doesn't exist already. AC_CHECK_HEADERS only fails if none
        of the headers is found. Fixes bug #541543.