~ubuntu-branches/ubuntu/utopic/lebiniou/utopic

« back to all changes in this revision

Viewing changes to debian/patches/libs.patch

  • Committer: Package Import Robot
  • Author(s): Ilya Barygin
  • Date: 2011-10-30 16:52:58 UTC
  • Revision ID: package-import@ubuntu.com-20111030165258-muwnxw0ffhusjs02
Tags: 3.12-1ubuntu1
* Fix FTBFS with --as-needed linker option:
  - as-needed.patch makes configure.ac add library flags to correct variable
  - use dh-autoreconf to regenerate autotools files

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: fix build with --as-needed linker option
 
2
 Put all library flags in LIBS instead of LDFLAGS.
 
3
Author: Ilya Barygin <randomaction@ubuntu.com>
 
4
 
 
5
--- lebiniou-3.12.orig/configure.ac
 
6
+++ lebiniou-3.12/configure.ac
 
7
@@ -50,20 +50,17 @@
 
8
 # glib-2.0
 
9
 PKG_CHECK_MODULES([GLIB], [glib-2.0], , [AC_MSG_ERROR([You must have libglib2.0-dev installed])])
 
10
 CPPFLAGS="$CPPFLAGS `pkg-config glib-2.0 --cflags`"
 
11
-LDFLAGS="$LDFLAGS `pkg-config glib-2.0 --libs`"
 
12
 
 
13
 # fftw3
 
14
 PKG_CHECK_MODULES([FFTW3], [fftw3], , [AC_MSG_ERROR([You must have libfftw3-dev installed])])
 
15
 CPPFLAGS="$CPPFLAGS `pkg-config fftw3 --cflags`"
 
16
-LDFLAGS="$LDFLAGS `pkg-config fftw3 --libs`"
 
17
 
 
18
 # libxml-2.0
 
19
 PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.0], , [AC_MSG_ERROR([You must have libxml2-dev >= 2.6 installed])])
 
20
 CPPFLAGS="$CPPFLAGS `pkg-config libxml-2.0 --cflags`"
 
21
-LDFLAGS="$LDFLAGS `pkg-config libxml-2.0 --libs`"
 
22
 
 
23
 # zlib - we assume it's installed on most systems
 
24
-LDFLAGS="$LDFLAGS -lz"
 
25
+LIBS="${GLIB_LIBS} ${FFTW3_LIBS} ${XML2_LIBS} -lz -lm"
 
26
 
 
27
 # We need to know which prefix we used to find some default values
 
28
 if test "x${prefix}" = "xNONE"; then
 
29
@@ -257,13 +254,14 @@
 
30
   *)
 
31
     os_family=linux
 
32
     os_netbsd_or_openbsd=false
 
33
-    LDFLAGS="$LDFLAGS -ldl"
 
34
+    LIBS="$LIBS -ldl"
 
35
     DEFAULT_INPUT_PLUGIN=alsa
 
36
 esac
 
37
 AC_MSG_RESULT([$os_family])
 
38
 AM_CONDITIONAL([OS_LINUX_FAMILY], [test x"$os_family" = x"linux"])
 
39
 AM_CONDITIONAL([OS_NETBSD_OR_OPENBSD], [test x"$os_netbsd_or_openbsd" = x"true"])
 
40
 AC_DEFINE_UNQUOTED([DEFAULT_INPUT_PLUGIN], ["$DEFAULT_INPUT_PLUGIN"], [Default input plugin])
 
41
+AC_SUBST(LIBS)
 
42
 
 
43
 dnl ------------------------------------------------------------------
 
44
 dnl Options