blob: 0e016b8cb4072ca42c4a5d0ab569e0b74792f20c [file] [log] [blame]
Romain Naour1cac78f2015-02-15 12:10:48 +01001From da77704c575f0583fa871ff02bd52906a7979576 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@openwide.fr>
3Date: Sun, 15 Feb 2015 11:05:43 +0100
4Subject: [PATCH] configure.ac: fix static build
5
6Add LT_INIT macro to handle --enable-shared option.
7
8If enable-shared=no then add --static flag to resolve FREETYPE_LIBS.
9
10Otherwise, dvdauthor forget to link witk -lbz2 when linking with freetype2.
11
12Fixes:
13http://autobuild.buildroot.net/results/1d8/1d83390a3dd9f6bb595e9fc7b321500b4dc533a8/
14
15Signed-off-by: Romain Naour <romain.naour@openwide.fr>
16---
17 configure.ac | 8 +++++++-
18 1 file changed, 7 insertions(+), 1 deletion(-)
19
20diff --git a/configure.ac b/configure.ac
21index 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--
541.9.3
55