[Bug 33780] New: configure --without-xml --with-dbus fails because of bad AC_REQUIRE logic

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Jun 10 22:25:18 CDT 2013


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 at winehq.org
        ReportedBy: tetromino at 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.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list