Losing CFLAGS building samba4

Green, Paul Paul.Green at stratus.com
Thu Jun 8 20:20:41 GMT 2006


As per the configure instructions, I set the following environment
variables before running the samba4 configure script:

CC=gcc
CFLAGS=''
CPPFLAGS='-D_POSIX_C_SOURCE=200112L -D_SYSV'

The configure script makes the following changes:

CC='ccache gcc'
CFLAGS=''
CPPFLAGS=''

Needless to say, this is not acceptable.  The resulting Makefile doesn't
use my settings, and the compilations get all sorts of errors.

I can see the configure script saving the value of CPPFLAGS in
ac_env_CPPFLAGS and ac_cv_env_CPPFLAGS, but these variables are never
used again.  I would have expected these saved values to be merged into
the final results, but I just don't see it.

There is some very curious code at line 23332 of configure that
overwrites CPPFLAGS without first saving it, and again at line 23455 of
that sets CPPFLAGS=$save_CPPFLAGS; but I can find no preceding code that
actually sets save_CPPFLAGS.  It looks like the source of this curious
code is samba4/source/lib/charset/config.m4.

My knowledge of m4 coding is not that hot. I can't tell how this was
supposed to work.  Was the main script supposed to use the value saved
in ac_env_CPPFLAGS, or was the code in charset/config.m4 supposed to
push and pop CPPFLAGS, or what?

Can someone who knows this area please take a look and see what's going
wrong?

Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Mobile: +1 (978) 235-2451;
AIM: PaulGreen



More information about the samba-technical mailing list