Subject: Re: A question about configure's
To: Julio Merino <jmmv@hispabsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-pkg
Date: 04/19/2002 17:14:11
[ On Friday, April 19, 2002 at 20:17:47 (+0200), Julio Merino wrote: ]
> Subject: Re: A question about configure's
>
> Well, I've added:
> 
> CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${BUILDLINK_DIR}/include/cdparanoia"
> CONFIGURE_ENV+= CXXFLAGS="${CXXFLAGS} -I${BUILDLINK_DIR}/include/cdparanoia"
> 
> Configure seems to be getting them. At least, when it checks for the C and
> C++ compiler, I can see how the arguments are passed.

That should work -- Autoconf generated configure scripts don't use
CPPFLAGS, but they do use CFLAGS.  Indeed I've made the following change
to my mk/bsd.pkg.mk to ensure the right things are always passed to it:

***************
*** 1848,1855 ****
  .if !target(do-configure)
  do-configure: ${_CONFIGURE_PREREQ}
  .  if defined(HAS_CONFIGURE)
  	${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} \
! 	    CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" \
  	    CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" FC="${FC}" F77="${FC}" FFLAGS="${FFLAGS}" \
  	    INSTALL="`${TYPE} ${INSTALL} | ${AWK} '{ print $$NF }'` -c -o ${BINOWN} -g ${BINGRP}" \
  	    ac_given_INSTALL="`${TYPE} ${INSTALL} | ${AWK} '{ print $$NF }'` -c -o ${BINOWN} -g ${BINGRP}" \
--- 1945,1953 ----
  .if !target(do-configure)
  do-configure: ${_CONFIGURE_PREREQ}
  .  if defined(HAS_CONFIGURE)
+ # XXX at the moment Autoconf still doesn't use CPPFLAGS so include it in CFLAGS too....
  	${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} \
! 	    CC="${CC}" CFLAGS="${CFLAGS} ${CPPFLAGS}" CPPFLAGS="${CPPFLAGS}" \
  	    CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" FC="${FC}" F77="${FC}" FFLAGS="${FFLAGS}" \
  	    INSTALL="`${TYPE} ${INSTALL} | ${AWK} '{ print $$NF }'` -c -o ${BINOWN} -g ${BINGRP}" \
  	    ac_given_INSTALL="`${TYPE} ${INSTALL} | ${AWK} '{ print $$NF }'` -c -o ${BINOWN} -g ${BINGRP}" \


> Weird. The configure.in uses this:
> 
> AC_CHECK_HEADERS(cdda_interface.h cdda_paranoia.h)

That should definitely work......

What version of Autoconf was used to generate the configure script?

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>