Fix for file injection is broken on centos computes with Cirros images LP #1587960
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / dvdauthor / 0001-configure.ac-fix-static-build.patch
1 From da77704c575f0583fa871ff02bd52906a7979576 Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@openwide.fr>
3 Date: Sun, 15 Feb 2015 11:05:43 +0100
4 Subject: [PATCH] configure.ac: fix static build
5
6 Add LT_INIT macro to handle --enable-shared option.
7
8 If enable-shared=no then add --static flag to resolve FREETYPE_LIBS.
9
10 Otherwise, dvdauthor forget to link witk -lbz2 when linking with freetype2.
11
12 Fixes:
13 http://autobuild.buildroot.net/results/1d8/1d83390a3dd9f6bb595e9fc7b321500b4dc533a8/
14
15 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
16 ---
17  configure.ac | 8 +++++++-
18  1 file changed, 7 insertions(+), 1 deletion(-)
19
20 diff --git a/configure.ac b/configure.ac
21 index c43df92..d78d56a 100644
22 --- a/configure.ac
23 +++ b/configure.ac
24 @@ -4,6 +4,7 @@ AM_CONFIG_HEADER(src/config.h)
25  AC_CONFIG_AUX_DIR(autotools)
26  
27  AM_INIT_AUTOMAKE
28 +LT_INIT
29  
30  AC_PROG_INSTALL
31  
32 @@ -39,6 +40,11 @@ PKG_CHECK_MODULES(LIBPNG, [libpng])
33  AC_SUBST(LIBPNG_CFLAGS)
34  AC_SUBST(LIBPNG_LIBS)
35  
36 +config_static=''
37 +if test "$enable_shared" = 'no'; then
38 +    config_static='--static'
39 +fi
40 +
41  usemagick=0
42  
43  AC_CHECK_PROGS(MAGICKCONFIG, [Magick-config])
44 @@ -95,7 +101,7 @@ AC_SUBST(FRIBIDI_LIBS)
45  AC_CHECK_PROGS(FREETYPECONFIG, [freetype-config])
46  if test -n "$FREETYPECONFIG"; then
47      FREETYPE_CPPFLAGS="`$FREETYPECONFIG --cflags`"
48 -    FREETYPE_LIBS="`$FREETYPECONFIG --libs`"
49 +    FREETYPE_LIBS="`$FREETYPECONFIG --libs $config_static`"
50      AC_DEFINE(HAVE_FREETYPE, 1, [Whether FreeType is available])
51  
52      ac_save_CPPFLAGS="$CPPFLAGS"
53 -- 
54 1.9.3
55