[omniORB] ./configure ignores CXXFLAGS, etc.

Bastiaan Bakker bastiaan.bakker@lifeline.nl
Mon Nov 4 23:35:01 2002


Hi,

I wanted to build omniORB for debugging, so I configured with:
export CXXFLAGS="-g -O0" 
./configure ....

as advertised by ./configure --help.
Alas this doesn't work. The cause appears to be that in beforeauto.mk.in
CXXFLAGS does not contain @CXXFLAGS@. (Same goes for CFLAGS, CPPFLAGS,
etc.). I added @CXXFLAGS@ to CXXFLAGS, this improved the situation to:
g++ -c -O0 -g -O2 -Wall -Wno-unused -fexceptions -I.. .....

The unwanted '-O2' comes from CXXDEBUGFLAGS, making it empty in the
default case, resolved the problem.
I don't know wether this breaks the non autoconf case, though. 
The patch against omniORB 4.0.0 is included.

Thanks,

Bastiaan Bakker
LifeLine Networks bv


Index: mk/beforeauto.mk.in
===================================================================
RCS file: /opt/cvs/sourceroot/omniorb/omniORB4/mk/beforeauto.mk.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 beforeauto.mk.in
--- mk/beforeauto.mk.in 4 Nov 2002 16:32:23 -0000       1.1.1.1
+++ mk/beforeauto.mk.in 4 Nov 2002 23:33:16 -0000
@@ -85,11 +85,11 @@
                    -I$(TOP)/include -I$(BASE_OMNI_TREE)/include \
                    -D__OSVERSION__=@OSVERSION@

-CPPFLAGS = $(DIR_CPPFLAGS) $(IMPORT_CPPFLAGS)
+CPPFLAGS = @CPPFLAGS@ $(DIR_CPPFLAGS) $(IMPORT_CPPFLAGS)

-CFLAGS = $(CDEBUGFLAGS) $(COPTIONS) $(CPPFLAGS)
+CFLAGS = @CFLAGS@ $(CDEBUGFLAGS) $(COPTIONS) $(CPPFLAGS)

-CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(CPPFLAGS)
+CXXFLAGS = @CXXFLAGS@ $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(CPPFLAGS)



#############################################################################
@@ -694,12 +694,12 @@
 #
 # Default compiler rules
 #
-CDEBUGFLAGS     = -O
+CDEBUGFLAGS     =
 CLINK           = $(CC)
-CLINKOPTIONS    = $(CDEBUGFLAGS) $(COPTIONS)
-CXXDEBUGFLAGS   = -O2
+CLINKOPTIONS    = $(CFLAGS) $(CDEBUGFLAGS) $(COPTIONS)
+CXXDEBUGFLAGS   =
 CXXLINK         = $(CXX)
-CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS)
+CXXLINKOPTIONS  = $(CXXFLAGS) $(CXXDEBUGFLAGS) $(CXXOPTIONS)



###########################################################################