diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2021-11-05 22:52:53 +0100 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2021-11-21 18:42:34 +0100 |
commit | d744d49e13fa6175016e8dcfc0f9506b9f170759 (patch) | |
tree | 6d57c9744118f708f9f6bf17468e4132fffa5780 /configure.ac | |
parent | 48ccb35c9aea178d7103c3f198946c1bcbcc080c (diff) | |
download | gnunet-d744d49e13fa6175016e8dcfc0f9506b9f170759.tar.gz gnunet-d744d49e13fa6175016e8dcfc0f9506b9f170759.zip |
Allow gnunet-qr to read codes from PNG pictures
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f0db752c5..2ec7fd6ee 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -781,6 +781,37 @@ AS_IF([test "x$zbar" = x1], | |||
781 | [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])], | 781 | [AC_DEFINE([HAVE_ZBAR],[1],[Have zbar library])], |
782 | [AC_DEFINE([HAVE_ZBAR],[0],[Lacking zbar library])]) | 782 | [AC_DEFINE([HAVE_ZBAR],[0],[Lacking zbar library])]) |
783 | 783 | ||
784 | # check for libpng library | ||
785 | # this check is for an optional feature of gnunet-qr. | ||
786 | # the PNG format was chosen mostly arbitrary: while it's true that more modern | ||
787 | # formats exists that can be used in stead of PNG, it's also true that it's | ||
788 | # easier for systems to ship with libpng than others; also, a black-or-white | ||
789 | # picture of squares is one of the cases where PNG shines the most. | ||
790 | png=0 | ||
791 | AS_IF([test "x$zbar" = "x1"], | ||
792 | [AC_MSG_CHECKING(for libpng) | ||
793 | AC_ARG_WITH(png, | ||
794 | [ --with-png=PREFIX (base of libpng installation)], | ||
795 | [AC_MSG_RESULT([$with_png]) | ||
796 | AS_CASE([$with_png], | ||
797 | [no],[], | ||
798 | [yes],[CHECK_LIBHEADER(PNG, png, png_create_read_struct, png.h, png=1,,)], | ||
799 | [ | ||
800 | LDFLAGS="-L$with_png/lib $LDFLAGS" | ||
801 | CPPFLAGS="-I$with_png/include $CPPFLAGS" | ||
802 | AC_CHECK_HEADERS(png.h, | ||
803 | AC_CHECK_LIB([png], [png_create_read_struct], | ||
804 | EXT_LIB_PATH="-L$with_png/lib $EXT_LIB_PATH" | ||
805 | png=1)) | ||
806 | ]) | ||
807 | ], | ||
808 | [AC_MSG_RESULT([--with-png not specified]) | ||
809 | CHECK_LIBHEADER(PNG, png, png_create_read_struct, png.h, png=1,,)]) | ||
810 | AM_CONDITIONAL(HAVE_PNG, [test "$png" = 1]) | ||
811 | AS_IF([test "x$png" = "x1"], | ||
812 | [AC_DEFINE([HAVE_PNG],[1],[Have png library])], | ||
813 | [AC_DEFINE([HAVE_PNG],[0],[Lacking png library])])]) | ||
814 | |||
784 | # check for libpabc library | 815 | # check for libpabc library |
785 | pabc=0 | 816 | pabc=0 |
786 | AC_MSG_CHECKING(for libpabc) | 817 | AC_MSG_CHECKING(for libpabc) |
@@ -2090,6 +2121,10 @@ AS_IF([test "$extractor" != 1], | |||
2090 | AS_IF([test "x$zbar" = "x1"], | 2121 | AS_IF([test "x$zbar" = "x1"], |
2091 | [libzbar_msg="yes"], | 2122 | [libzbar_msg="yes"], |
2092 | [libzbar_msg="no (gnunet-qr will not be built)"]) | 2123 | [libzbar_msg="no (gnunet-qr will not be built)"]) |
2124 | # -- libpng | ||
2125 | AS_IF([test "x$png" = "x1"], | ||
2126 | [libpng_msg="yes"], | ||
2127 | [libpng_msg="no (gnunet-qr will not scan images)"]) | ||
2093 | # -- libgnurl | 2128 | # -- libgnurl |
2094 | AS_IF([test "$gnurl" = "0"], | 2129 | AS_IF([test "$gnurl" = "0"], |
2095 | [AS_IF([test "x$curl" = "xfalse"], | 2130 | [AS_IF([test "x$curl" = "xfalse"], |
@@ -2186,6 +2221,7 @@ ifconfig: ${ifconfig_msg} | |||
2186 | upnpc: ${upnpc_msg} | 2221 | upnpc: ${upnpc_msg} |
2187 | gnutls: ${gnutls_msg} | 2222 | gnutls: ${gnutls_msg} |
2188 | libzbar: ${libzbar_msg} | 2223 | libzbar: ${libzbar_msg} |
2224 | libpng: ${libpng_msg} | ||
2189 | java: ${java_msg} | 2225 | java: ${java_msg} |
2190 | libidn: ${libidn1_msg}${libidn2_msg} | 2226 | libidn: ${libidn1_msg}${libidn2_msg} |
2191 | libopus: ${libopus_msg} | 2227 | libopus: ${libopus_msg} |