python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / vnstat / 0001-configure.ac-add-option-to-disable-image-output.patch
blobe46ef078885e26d6a8d68ec498c09927b6f28625
1 From 8a4a9b82d4f8fd39db8417fd06d969505fde9d0a Mon Sep 17 00:00:00 2001
2 From: Rodrigo Rebello <rprebello@gmail.com>
3 Date: Tue, 22 Dec 2015 18:02:22 -0200
4 Subject: [PATCH 1/1] configure.ac: add option to disable image output
6 Even when the gd library is present, it may be desirable to not build
7 'vnstati' as image output is an optional feature.
9 Also, when testing for the gd library, use gdImagePng() instead of
10 gdImageLine() since it's possible that the installed gd library doesn't
11 have PNG support. In such cases, the test in the configure script passed
12 (because gdImageLine() is always present), but the build failed with:
14 src/vnstati.o: In function `writeoutput':
15 vnstati.c:(.text+0x3fc): undefined reference to `gdImagePng'
16 collect2: error: ld returned 1 exit status
18 Upstream status: accepted, not yet released.
19 https://github.com/vergoh/vnstat/pull/35
21 Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
22 ---
23 configure.ac | 10 ++++++++--
24 1 file changed, 8 insertions(+), 2 deletions(-)
26 diff --git a/configure.ac b/configure.ac
27 index be3d449..89f71ef 100644
28 --- a/configure.ac
29 +++ b/configure.ac
30 @@ -13,10 +13,16 @@ AM_PROG_CC_C_O
31 AC_PROG_MAKE_SET
32 AC_PROG_MKDIR_P
34 +AC_ARG_ENABLE([image-output], [
35 +AS_HELP_STRING([--disable-image-output], [disable PNG image output])])
37 # Checks for libraries.
38 AC_CHECK_LIB([m], [pow])
39 -AC_CHECK_LIB([gd], [gdImageLine], [IMAGELIBS=-lgd])
40 -AC_SUBST([IMAGELIBS])
42 +AS_IF([test "x$enable_image_output" != "xno"], [
43 +AC_CHECK_LIB([gd], [gdImagePng], [IMAGELIBS=-lgd])
44 +AC_SUBST([IMAGELIBS])])
46 AM_CONDITIONAL([HAVE_LIBGD], [test "$IMAGELIBS" = "-lgd"])
47 PKG_CHECK_MODULES([CHECK], [check >= 0.9.6], [], [AC_MSG_NOTICE([testcases can not be execute without check installed])])
48 AM_CONDITIONAL([HAVE_CHECK], [test "$CHECK_LIBS"])
49 --
50 2.1.4