[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ac_configure_args
From: |
Ralf Wildenhues |
Subject: |
Re: ac_configure_args |
Date: |
Tue, 28 Sep 2010 19:30:09 +0200 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
Hi Sam,
* Sam Steingold wrote on Tue, Sep 28, 2010 at 05:51:04PM CEST:
> how do I get access to all the configure arguments?
>
> my setup is as follows:
> configure (generated from configure.in) generated shell script
> makemake from makemake.in:
> AC_CONFIG_FILES([makemake],[
> echo "#!$SHELL" > makemake.tmp
> echo "# Generated from makemake.in by configure using:" >> makemake.tmp
> echo "CONFIG_SHELL=$SHELL" >> makemake.tmp
> cat makemake >> makemake.tmp
> mv makemake.tmp makemake
> chmod a+x makemake
> ])
Why are you making things so complicated?
AC_SUBST([SHELL])
AC_SUBST([module_configure_flags], ["$ac_configure_args"])
AC_CONFIG_FILES([makemake], [chmod a+x makemake])
and in makemake.in:
#! @SHELL@
# Generated from makemake.in by configure using:
CONFIG_SHELL="@SHELL@" # mind the quoting, for args like -x.
...
$srcdir/subdir/configure @module_configure_flags@
Of course, there are several small but important details to be aware of:
- $ac_configure_args is quoted in a way suitable for evaluation. That
makes the above work.
- $ac_configure_args must be corrected for sub configures: --srcdir
needs adjustment, --cache-file too, some args may need to be pruned.
AC_INIT and AC_CONFIG_SUBDIRS currently share this task.
- $ac_configure_args is not documented; but realizing that it is used in
several third-party packages, changing it without good reason is not
likely to happen. The documented way to get at configure args is to
save "$@" very soon after AC_INIT.
Hope that helps.
Cheers,
Ralf
- ac_configure_args, Sam Steingold, 2010/09/28
- Re: ac_configure_args,
Ralf Wildenhues <=