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
6 Add LT_INIT macro to handle --enable-shared option.
8 If enable-shared=no then add --static flag to resolve FREETYPE_LIBS.
10 Otherwise, dvdauthor forget to link witk -lbz2 when linking with freetype2.
13 http://autobuild.buildroot.net/results/1d8/1d83390a3dd9f6bb595e9fc7b321500b4dc533a8/
15 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
17 configure.ac | 8 +++++++-
18 1 file changed, 7 insertions(+), 1 deletion(-)
20 diff --git a/configure.ac b/configure.ac
21 index c43df92..d78d56a 100644
24 @@ -4,6 +4,7 @@ AM_CONFIG_HEADER(src/config.h)
25 AC_CONFIG_AUX_DIR(autotools)
32 @@ -39,6 +40,11 @@ PKG_CHECK_MODULES(LIBPNG, [libpng])
33 AC_SUBST(LIBPNG_CFLAGS)
37 +if test "$enable_shared" = 'no'; then
38 + config_static='--static'
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])
52 ac_save_CPPFLAGS="$CPPFLAGS"