xfce4-volumed configure ignores CFLAGS

Bug #677083 reported by Yves-Alexis Perez on 2010-11-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xfce4-volumed
Low
Steve Dodier-Lazaro

Bug Description

hidalgo# CFLAGS="-O1" ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GLIB... yes
checking for XFCONF... yes
checking for GSTREAMER... yes
checking for GSTREAMER_AUDIO... yes
checking for LIBKEYBINDER... yes
checking for LIBNOTIFY... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating data/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
----------------------------------------
Xfce4-Volumed
 Installing in : /usr/local
 Using LibNotify : yes
 Compiler : gcc
 Compiler flags : -O2 -DNDEBUG

 Configuration is done OK.

Yves-Alexis Perez (corsac) wrote :

diff --git a/configure.ac b/configure.ac
index 8650a79..32aab35 100644
Following patch fixes the problem:

--- a/configure.ac
+++ b/configure.ac
@@ -57,9 +57,9 @@ AM_CONDITIONAL(HAVE_LIBNOTIFY, [test "$HAVE_LIBNOTIFY" = "1"])

 if test "x$enable_debug" = "xyes"; then
- CFLAGS="-g"
+ CFLAGS="$CFLAGS -g"
 else
- CFLAGS="-O2 -DNDEBUG"
+ CFLAGS="$CFLAGS -O2 -DNDEBUG"
 fi

 AC_OUTPUT([

Steve Dodier-Lazaro (sidi) wrote :

Thanks for the patch. Will apply it with the one for bug #671915. Feel free to ping me if it's not done by sunday.

Changed in xfce4-volumed:
assignee: nobody → Steve Dodier (sidi)
importance: Undecided → Low
status: New → Confirmed
Steve Dodier-Lazaro (sidi) wrote :

The patch unveils another problem: CFLAGS are set by default to -g -O2 if the environment variable is empty, and this before --enable-debug's value is checked. I need to find why or at least to bypass this behaviour before I can commit the patch.

Changed in xfce4-volumed:
status: Confirmed → In Progress

On dim., 2010-11-21 at 22:52 +0000, Steve Dodier wrote:
> The patch unveils another problem: CFLAGS are set by default to -g -O2
> if the environment variable is empty, and this before --enable-debug's
> value is checked. I need to find why or at least to bypass this
> behaviour before I can commit the patch.

CFLAGS can usually by the system (for exemple by dpkg-buildpackage) or
the user. The patch was a quick solution, some other may exist, just
look at how other people do.

Cheers,
--
Yves-Alexis

Steve Dodier-Lazaro (sidi) wrote :

I released a patch for the release mode. I'm not so willing to modify the debug mode's CFLAGS as I explained via email, but I added a message indicating how to modify CFLAGS in such a case.

Changed in xfce4-volumed:
status: In Progress → Fix Released
Yves-Alexis Perez (corsac) wrote :

That's not enough, one should be able to disable optimization, or enable it to the same level in order to reproduce some bugs optimization can lead to.

What's the problem with appending user CFLAGS to the original ones even in debug case?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers