On Tue, 10 Jul 2007, Amos Jeffries wrote:
> Hey guys,
> I find myself in need of a ./configure option to set the
> cache_effective_user other than 'nobody' on a per-dist basis, leaving the
> squid.conf setup as-is.
> Can someone please explain to me how the @HTTP_PORT@ etc get
> replaced in squid.conf / cf.data.pre
> I have tried modifying src/makefile.am and ./configure.in to no visible
> effect.
Calling AC_DEFINE (etc) causes the variables to be set for autoconf.
After ./configure runs, you should see them in config.status. eg:
s,@CACHE_HTTP_PORT@,3128,;t t
config.status does the substitutions from Makefile.in to Makefile.
for example:
$ sh config.status
...
config.status: creating src/Makefile
So in src/Makefile.in you have:
DEFAULT_HTTP_PORT = @CACHE_HTTP_PORT@
While in src/Makefile you have:
DEFAULT_HTTP_PORT = 3128
Our src/Makefile (but you must edit src/Makefile.am of course) has
a long-ish sed commands to do very similar substitutions on the
cf.data.pre file:
cf.data: cf.data.pre Makefile
sed "\
s%@DEFAULT_HTTP_PORT@%$(DEFAULT_HTTP_PORT)%g;\
s%@DEFAULT_ICP_PORT@%$(DEFAULT_ICP_PORT)%g;\
...
So if you want to add your own macro goop you have to (at least):
- modify configure.in (if you want it to be set via ./configure)
- modify src/Makefile.am
- run bootstrap.sh (Makefile.am -> Makefile.in)
- modify the sed command in the cf.data target of src/Makefile
- modify cf.data.pre to use the new macro
- run ./configure and test it..
Duane W.
Received on Mon Jul 09 2007 - 13:38:40 MDT
This archive was generated by hypermail pre-2.1.9 : Wed Aug 01 2007 - 12:00:06 MDT