350336b
Bug #171: [PATCH] Environment variable CFLAGS isn't honored
350336b
--------------------------------------+-------------------------------------
350336b
 Reporter:  robert@fedoraproject.org  |        Owner:
350336b
     Type:  defect                    |       Status:  new
350336b
 Priority:  normal                    |    Milestone:
350336b
Component:  BitlBee                   |      Version:  1.0.3
350336b
 Keywords:                            |   Irc_client:  Client-independent
350336b
       Os:  Linux                     |   Os_version:
350336b
--------------------------------------+-------------------------------------
350336b
BitlBee currently doesn't honor passed CFLAGS, neither in 'CFLAGS="foo"
350336b
./configure' nor at 'make CFLAGS="foo"'. Last one will break BitlBee while
350336b
compiling completely. Following patch resolves the issue (especially for
350336b
vendors like Fedora, Mandrake etc). Thanks to wilmer and lucumo for
350336b
figgering out a suitable and working solution.
350336b
350336b
Further information & updates: http://bugs.bitlbee.org/bitlbee/ticket/171
350336b
350336b
--- bitlbee-1.0.3/configure		2006-06-24 16:00:43.000000000 +0200
350336b
+++ bitlbee-1.0.3/configure.rsc		2006-06-26 16:03:59.000000000 +0200
350336b
@@ -111,7 +111,11 @@
350336b
 	echo 'DEBUG=1' >> Makefile.settings
350336b
 	echo '#define DEBUG' >> config.h
350336b
 else
350336b
-	echo 'CFLAGS=-O3' >> Makefile.settings
350336b
+	if [ -n "$CFLAGS" ]; then
350336b
+		echo CFLAGS="$CFLAGS" >> Makefile.settings
350336b
+	else
350336b
+		echo CFLAGS="-O3" >> Makefile.settings
350336b
+	fi
350336b
 fi
350336b
 
350336b
 echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings