automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Letting user override AC_SUBST values


From: tomas
Subject: Letting user override AC_SUBST values
Date: Thu, 25 Mar 2004 13:27:16 +0100
User-agent: Mutt/1.5.3i

Hi, automake gurus --

here is a configure.ac file:

 ,-------------------
 | AC_INIT(CMSConnector,0.8)
 | AM_INIT_AUTOMAKE
 | ZopeProductPath="/tmp/test-zope-install/Products"
 | ProductName="CMSConnector"
 | AC_ARG_ENABLE(ZopeProductPath,
 |               [Zope product path],
 |               [ZopeProductPath=${enable_ZopeProductPath}])
 | AC_ARG_ENABLE(ProductName,
 |               [product name],
 |               [ProductName=${enable_ProductName}])
 | # By default, those substs are ``identity'':
 | # Note that CMSConnector is at the ame time the ``product name''
 | AC_SUBST(CMSConnector,CMSConnector)
 | AC_SUBST(CMSResource,CMSResource)
 | AC_SUBST(ZopeProductPath)
 | AC_PREFIX_DEFAULT(address@hidden@/@address@hidden)
 | # FIXME: check macro call:
 | AC_CONFIG_FILES([Makefile __init__.py
 |                  dtml/Makefile
[...]
 |                  resources/Makefile])
 | AC_OUTPUT
 `-------------------

The intention is that the whole tree goes to
/tmp/test-zope-install/Products/CMSConnector, (after doing some
substitutions in __init__.py) and to allow the user to override
some things (with --enable-ZopeProductPath=xxx anc so on).

The first part works fine, the overriding doesn't (the effects
of AC_ARG_ENABLE come-in too late, after the @xxx@ substitutions
are done).

How do I achieve this? Am I on the wrong path?

(Basically, what I want to achieve in the end is to install a Zope
product, which goes to a fairly non-standard place from the POV
of autoconf/automake, and let the user choose the product name
at configure time, which entails messing with the install path
and doing a couple of substitutions in the source.

Which is the auto{conf|make} way of achieving this?

I'm on autoconf 2.13 and automake 1.4-p4, but I'm willing to
upgrade (heck, I'm willing to do nearly anything ;) to get
this going

Thanks
-- tomás




reply via email to

[Prev in Thread] Current Thread [Next in Thread]