summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-04-03 13:53:09 +0200
committerChristian Grothoff <christian@grothoff.org>2019-04-03 13:53:09 +0200
commitaf57a5b89896f734e1ebef947625647fcf5d79bd (patch)
treec4690ad3b7f412a0374d506d68aa742ca91ffc45 /configure.ac
parent1c53d67c25a877901e5ff5a8421ccc5972751838 (diff)
fix libzbar detection
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 34 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 793612df3..ac8ed60c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -534,6 +534,39 @@ else
AC_DEFINE([HAVE_LIBBLUETOOTH],[0],[Lacking bluetooth library])
fi
+# check for zbar library
+zbar=0
+AC_MSG_CHECKING(for libzbar)
+AC_ARG_WITH(zbar,
+ [ --with-zbar=PFX base of libzbar installation],
+ [AC_MSG_RESULT([$with_zbar])
+ case $with_zbar in
+ no)
+ ;;
+ yes)
+ AC_CHECK_HEADERS(zbar.h,
+ AC_CHECK_LIB([zbar], [zbar_processor_create],
+ zbar=1))
+ ;;
+ *)
+ LDFLAGS="-L$with_zbar/lib $LDFLAGS"
+ CPPFLAGS="-I$with_zbar/include $CPPFLAGS"
+ AC_CHECK_HEADERS(zbar.h,
+ AC_CHECK_LIB([zbar], [zbar_processor_create],
+ EXT_LIB_PATH="-L$with_zbar/lib $EXT_LIB_PATH"
+ zbar=1))
+ ;;
+ esac
+ ],
+ [AC_MSG_RESULT([--with-zbar not specified])
+ AC_CHECK_HEADERS(zbar.h,
+ AC_CHECK_LIB([zbar], [zbar_processor_create],
+ zbar=1))])
+AM_CONDITIONAL(HAVE_ZBAR, [test "$zbar" = 1])
+AS_IF([test "x$zbar" = x1],
+ [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])],
+ [AC_DEFINE([HAVE_ZBAR],[0],[Lacking zbar library])])
+
# check for jansson library
jansson=0
AC_MSG_CHECKING(for libjansson)
@@ -563,6 +596,7 @@ AC_ARG_WITH(jansson,
AC_CHECK_LIB([jansson], [json_loads],
jansson=1))])
AM_CONDITIONAL(HAVE_JANSSON, [test "$jansson" = 1])
+AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1])
AS_IF([test "x$jansson" = x1],
[AC_DEFINE([HAVE_JANSSON],[1],[Have jansson library])],
[AC_DEFINE([HAVE_JANSSON],[0],[Lacking jansson library])])
@@ -1431,9 +1465,6 @@ AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have GnuTLS])
AM_CONDITIONAL(HAVE_GNUTLS_DANE, test x$gnutls_dane = x1)
AC_DEFINE_UNQUOTED([HAVE_GNUTLS_DANE], $gnutls_dane, [We have GnuTLS with DANE support])
-# check for libzbar library, required for optional gnunet-qr
-PKG_CHECK_MODULES([libzbar], [zbar >= 0.10], [have_zbar=1 ], [have_zbar=0 ])
-AM_CONDITIONAL([HAVE_ZBAR], [test "$have_zbar" = 1])
# Test if we are building for superMUC