Package: pads
Version: 1.2-11
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch
User: debian-...@lists.debian.org
Usertags: ld-as-needed

the package pads fails to build when using the linker flag --as-needed
This is caused by the libraries being placed inside LDFLAGS. Libraries
to link with should be placed in LIBS or LDADD so the commend line is
correctly ordered.
See the buildlogs in ubuntu oneiric which has this flag set by default:
https://launchpad.net/ubuntu/+source/pads/1.2-11

Attached patch changes both configure.in and configure althoug only
configure patching is needed currently.
If the packaging is changed to regenerate the autotools files the
patching of configure can be dropped.

Description: fix build with --as-needed
 one must use LIBS instead of LDFLAGS for libraries so autotools
 orders the command line correctly
Author: Julian Taylor <jtaylor.deb...@googlemail.com>
Index: pads-1.2/configure
===================================================================
--- pads-1.2.orig/configure	2011-06-29 18:24:01.996859577 +0200
+++ pads-1.2/configure	2011-06-29 18:24:29.106859587 +0200
@@ -3679,7 +3679,7 @@
 
 done
 
-LDFLAGS="${LDFLAGS} `pcre-config --libs`"
+LIBS="${LIBS} `pcre-config --libs`"
 echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5
 echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
 if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
Index: pads-1.2/configure.in
===================================================================
--- pads-1.2.orig/configure.in	2011-06-29 18:24:03.446859577 +0200
+++ pads-1.2/configure.in	2011-06-29 18:24:46.386859593 +0200
@@ -81,7 +81,7 @@
 AC_CHECK_HEADERS(pcre.h,
     AC_DEFINE(HAVE_PCRE_H, 1, Have PCRE Header File),
     AC_MSG_ERROR([Cannot find PCRE header files!]))
-LDFLAGS="${LDFLAGS} `pcre-config --libs`"
+LIBS="${LIBS} `pcre-config --libs`"
 AC_CHECK_LIB(pcre, pcre_compile,
     EXTRA_LIBS="$EXTRA_LIBS -lpcre",
     AC_MSG_ERROR([Cannot find PCRE library files!]))

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to