GNOME Bugzilla – Bug 541543
fix HAVE_OSS4 detection code in configure.ac
Last modified: 2008-07-04 18:52:26 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)
Created attachment 113979 [details] [review] Fix the detection of OSS4 for a windows build
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.