Blob Blame History Raw
Bug #171: [PATCH] Environment variable CFLAGS isn't honored
--------------------------------------+-------------------------------------
 Reporter:  robert@fedoraproject.org  |        Owner:
     Type:  defect                    |       Status:  new
 Priority:  normal                    |    Milestone:
Component:  BitlBee                   |      Version:  1.0.3
 Keywords:                            |   Irc_client:  Client-independent
       Os:  Linux                     |   Os_version:
--------------------------------------+-------------------------------------
BitlBee currently doesn't honor passed CFLAGS, neither in 'CFLAGS="foo"
./configure' nor at 'make CFLAGS="foo"'. Last one will break BitlBee while
compiling completely. Following patch resolves the issue (especially for
vendors like Fedora, Mandrake etc). Thanks to wilmer and lucumo for
figgering out a suitable and working solution.

Further information & updates: http://bugs.bitlbee.org/bitlbee/ticket/171

--- bitlbee-1.0.3/configure		2006-06-24 16:00:43.000000000 +0200
+++ bitlbee-1.0.3/configure.rsc		2006-06-26 16:03:59.000000000 +0200
@@ -111,7 +111,11 @@
 	echo 'DEBUG=1' >> Makefile.settings
 	echo '#define DEBUG' >> config.h
 else
-	echo 'CFLAGS=-O3' >> Makefile.settings
+	if [ -n "$CFLAGS" ]; then
+		echo CFLAGS="$CFLAGS" >> Makefile.settings
+	else
+		echo CFLAGS="-O3" >> Makefile.settings
+	fi
 fi
 
 echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings