autotools: handle situation where qmake is not installed
The previous commit added a check for qmake, but then used QMAKE without checking whether qmake was found at all. This caused configure problems on systems where qmake wasn't available. The error handling also wasn't correct. A "test" was missing in front of the comparison.
This commit is contained in:
parent
97fff9b4be
commit
210b2dca66
|
@ -435,19 +435,23 @@ fi
|
|||
|
||||
AC_CHECK_PROGS([QMAKE], [qmake qmake-qt4])
|
||||
|
||||
KDEKWALLETFOUND=yes
|
||||
if ! test "$KDE_KWALLET_CFLAGS"; then
|
||||
KDE_KWALLET_CFLAGS="-I`kde4-config --path include` -I`kde4-config --path include`/KDE -I`$QMAKE -query QT_INSTALL_HEADERS`"
|
||||
if test "$QMAKE"; then
|
||||
KDEKWALLETFOUND=yes
|
||||
if ! test "$KDE_KWALLET_CFLAGS"; then
|
||||
KDE_KWALLET_CFLAGS="-I`kde4-config --path include` -I`kde4-config --path include`/KDE -I`$QMAKE -query QT_INSTALL_HEADERS`"
|
||||
fi
|
||||
if ! test "$KDE_KWALLET_LIBS"; then
|
||||
KDE_KWALLET_LIBS="-lkdeui -lkdecore `pkg-config --libs QtDBus`"
|
||||
fi
|
||||
AC_LANG_PUSH(C++)
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $KDE_KWALLET_CFLAGS"
|
||||
AC_CHECK_HEADERS(kwallet.h, [], [KDEKWALLETFOUND=no])
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
AC_LANG_POP(C++)
|
||||
else
|
||||
KDEKWALLETFOUND=no
|
||||
fi
|
||||
if ! test "$KDE_KWALLET_LIBS"; then
|
||||
KDE_KWALLET_LIBS="-lkdeui -lkdecore `pkg-config --libs QtDBus`"
|
||||
fi
|
||||
AC_LANG_PUSH(C++)
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $KDE_KWALLET_CFLAGS"
|
||||
AC_CHECK_HEADERS(kwallet.h, [], [KDEKWALLETFOUND=no])
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
# In contrast to the GNOME KEYRING, the KWallet is
|
||||
# currently considered optional. "configure" will never enable
|
||||
|
@ -456,7 +460,7 @@ AC_LANG_POP(C++)
|
|||
AC_ARG_ENABLE(kwallet,
|
||||
AS_HELP_STRING([--enable-kwallet], [enable access to KWallet]),
|
||||
[use_kde_kwallet="$enableval"
|
||||
test $KDEKWALLETFOUND = "yes" || $use_kde_kwallet = "no" || AC_MSG_ERROR([kwallet.pc not found. Install it to compile with the KWallet enabled.])],
|
||||
test $KDEKWALLETFOUND = "yes" || test "$use_kde_kwallet" = "no" || AC_MSG_ERROR([kwallet.pc not found. Install it to compile with the KWallet enabled.])],
|
||||
[use_kde_kwallet="no"])
|
||||
|
||||
if test "$use_kde_kwallet" = "yes"; then
|
||||
|
|
|
@ -8,7 +8,10 @@ AC_CHECK_PROGS([QMAKE], [qmake qmake-qt4])
|
|||
# kdepimlibs5-dev >= 4.3 provides the necessary files.
|
||||
AKONADIFOUND=yes
|
||||
if ! test "$KDEPIM_CFLAGS"; then
|
||||
KDEPIM_CFLAGS="-I`kde4-config --path include` -I`kde4-config --path include`/KDE -I`$QMAKE -query QT_INSTALL_HEADERS`"
|
||||
KDEPIM_CFLAGS="-I`kde4-config --path include` -I`kde4-config --path include`/KDE"
|
||||
if test "$QMAKE"; then
|
||||
KDEPIM_CFLAGS="$KDEPIM_CFLAGS -I`$QMAKE -query QT_INSTALL_HEADERS`"
|
||||
fi
|
||||
fi
|
||||
if ! test "$KDEPIM_LIBS"; then
|
||||
KDEPIM_LIBS="-L`kde4-config --prefix`/lib`kde4-config --libsuffix` -lakonadi-kde"
|
||||
|
@ -27,7 +30,7 @@ AC_LANG_POP(C++)
|
|||
AC_ARG_ENABLE_BACKEND(akonadi, akonadi,
|
||||
AS_HELP_STRING([--disable-akonadi], [disable access to Akonadi (default is to use it if akonadi.pc is found)]),
|
||||
[enable_akonadi="$enableval"
|
||||
test $AKONADIFOUND = "yes" || $enable_akonadi = "no" || AC_MSG_ERROR([akonadi.pc not found. Install it to compile with the Akonadi backend enabled.])],
|
||||
test $AKONADIFOUND = "yes" || test $enable_akonadi = "no" || AC_MSG_ERROR([akonadi.pc not found. Install it to compile with the Akonadi backend enabled.])],
|
||||
[enable_akonadi=no])
|
||||
|
||||
if test "$enable_akonadi" = "yes"; then
|
||||
|
|
Loading…
Reference in a new issue