mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
build: dont define HAVE_QRENCODE at all in case not present
Before we got an error when libqrencode was not installed: `src/ui/console.c:52:10: fatal error: qrencode.h: No such file or directory` Which looked like HAVE_QRENCODE was true. config.status showed: `config.status:D["HAVE_QRENCODE"]=" 0"` Holger pointed to me that there is not just true and false but defined and undefined. So one solution was to use `#if HAVE_QRENCODE == 1` to check for the actual value. Or dont define HAVE_QRENCODE in the non present case at all. In all the other HAVE_ variables we use this approach. I think i at first chose the wrong way out of confusion with BUILD_ and HAVE_.
This commit is contained in:
parent
1a7017e44c
commit
3557e46b6d
@ -350,8 +350,7 @@ AM_CONDITIONAL([THEMES_INSTALL], "$THEMES_INSTALL")
|
||||
if test "x$enable_omemo_qrcode" != xno; then
|
||||
PKG_CHECK_MODULES([libqrencode], [libqrencode],
|
||||
[AC_DEFINE([HAVE_QRENCODE], [1], [Have QRencode]) LIBS="$libqrencode_LIBS $LIBS" CFLAGS="$libqrencode_CFLAGS $CFLAGS"],
|
||||
[AC_DEFINE([HAVE_QRENCODE], [0], [Dont have QRencode])
|
||||
AS_IF([test "x$enable_qrcode" = xyes],
|
||||
[AS_IF([test "x$enable_qrcode" = xyes],
|
||||
[AC_MSG_ERROR([libqrencode not found])],
|
||||
[AC_MSG_NOTICE([librencode not found])])])
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user