Bug #1 (fixed by attached patch)
Inspired by José Valentín Gutiérrez Boquete (again) in 
https://bugs.gentoo.org/show_bug.cgi?id=142435 highlighted some difficulty the 
automated setting of {C,CXX,LD}FLAGS. In this case the binary was stripped 
because no LDFLAGS were set.

The attached patch adds a configure option to disables most of the automated 
settings so a user who sets CFLAGS=-g and builds the program using gentoo 
ebuilds, doesn't get the program stripped at the end. Gentoo ebuilds, and 
probably BSD ports, allow the user to set {C,CXX,L}FLAGS and and the ebuild 
control the rest of the compile/installation process. As such 
the --with-debug are not accessable.

The patch is non-intrusive as the existing defaults are maintained.

Patch derived from:
http://www.onlamp.com/pub/a/onlamp/2005/03/31/packaging.html?page=2

Related Bug #2 FYI the --with-debug will not disable the automated stripping 
of modules. (unfixed by attached patch)

(no more emails for today - I'm sure I'm over quota :-)
Thanks for applying the last patch and for a great product in general.

-- 
Daniel Black <[EMAIL PROTECTED]>
Gentoo Crypto/dev-embedded/Forensics/NetMon
--- configure.ac.orig	2006-08-02 16:01:52.000000000 +1000
+++ configure.ac	2006-08-02 17:23:10.000000000 +1000
@@ -31,6 +31,18 @@
 [   with_profiling=$withval;   ],
 [   with_profiling=no;	   ])
 
+AC_ARG_ENABLE([packager-mode],
+              AS_HELP_STRING([--enable-packager-mode],
+                             [Change configuration behavior
+                              to ease packaging]),
+              [if test x"${enableval}" = xyes
+               then
+				   DEFAULT_CXX=no
+				   DEFAULT_CFLAGS=no
+				   DEFAULT_CXXFLAGS=no
+				   DEFAULT_LDFLAGS=no
+               fi])
+
 if test x$with_debug = xno; then
    if test x$DEFAULT_CFLAGS = xyes; then
       CFLAGS="`echo $CFLAGS | sed 's/-g//'`"

Attachment: pgp18LgsEwqSt.pgp
Description: PGP signature

Reply via email to