Subject: CFLAGS override
To: None <>
From: Emmanuel Dreyfus <>
List: tech-pkg
Date: 04/18/2001 21:51:19

I'm upgrading Xerces to 1.4.0,  and I have a problem with CFLAGS. During
the build, a typical compile command is like this:

c++ -fPIC -instances=static -DNETBSD -c -O -O2 -I/usr/pkg/include
-O2 -I/usr/pkg/include  -DXML_USE_ICU_TRANSCODER
-I/usr/pkgsrc/textproc/xerces-c/work/xerces-c-src1_4_0/include  -o
tion.o SAXException.cpp

There is a problam with having -I/usr/pkg/include at the beginning:
older Xerces header files are included instead of newer headers from

We need the -I/usr/pkg/include to get ICU headers, so removing it is not
an option. I'd like to supply -I/usr/pkg/include at the end of the
command line. To do this, I need to override the default CFLAGS created
by Is there any safe way of doing this (ie: how to preserve
other arguments supplied by

Emmanuel Dreyfus