http://bugs.winehq.org/show_bug.cgi?id=33780
Bug #: 33780 Summary: configure --without-xml --with-dbus fails because of bad AC_REQUIRE logic Product: Wine Version: 1.6-rc1 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: tetromino@gentoo.org Classification: Unclassified
(originally reported at https://bugs.gentoo.org/show_bug.cgi?id=470172)
WINE_PACKAGE_FLAGS is defined in aclocal.m4 as
AC_DEFUN([WINE_PACKAGE_FLAGS], [AC_REQUIRE([WINE_PATH_PKG_CONFIG])dnl AC_ARG_VAR([$1]_CFLAGS, [C compiler flags for $2, overriding pkg-config])dnl ...
Now, AC_REQUIRE expands its argument *only on the first occurrence of the macro*. In other words, WINE_PATH_PKG_CONFIG gets expanded only once - at the first invocation of WINE_PACKAGE_FLAGS! And that invocation happens to be inside a shell conditional expression.
The logic in configure is essentially
if test "x$with_xml" != "xno"; then WINE_PACKAGE_FLAGS(XML2, ...) fi if test "x$with_dbus" != "xno"; then WINE_PACKAGE_FLAGS(DBUS, ...) fi
which gets expanded to
if test "x$with_xml" != "xno"; then <check for pkg-config and set PKG_CONFIG> <check for libxml-2.0.pc using $PKG_CONFIG> fi if test "x$with_dbus" != "xno"; then <check for dbus-1.pc using $PKG_CONFIG> fi
As a result, ./configure --without-xml --with-dbus always fails:
checking dbus/dbus.h presence... no checking for dbus/dbus.h... no configure: error: libdbus development files not found, no dynamic device support. This is an error since --with-dbus was requested.