Again, Hacking the config.log is a hack, none documented structure that may change from one version to another. You should not do this if yo care about backward/forward compatibility. Also analyzing config.h is inappropriate.
If you don't want to do this as I suggested you can write m4 macro such as: AC_DEFUN([MY_AC_ARG_WITH],[ AC_ARG_WITH([$1],[$2],[$3],[$4]) ---- do something ---- ]) This will enable you to do some procedural work without using hacks. On Tue, Apr 13, 2010 at 4:49 PM, David Sommerseth <openvpn.l...@topphemmelig.net> wrote: > On 10/04/10 09:35, Alon Bar-Lev wrote: >> Also there is no proper dependency for configure.h in Makefile.am so >> it won't be built. >> Proper way to do so is like I done for OpenSC [1], look for OPENSC_FEATURES. >> >> [1] http://www.opensc-project.org/opensc/browser/trunk/configure.ac#L613 > > Thank you for catching this one. I've obviously been too sloppy with > 'make distcheck', which would have detected this one. > > Even though I see you build up a string in configure.ac with enabled > features in your example [1], I personally feel that approach is less > flexible. When this feature was implemented I considered that approach > as well, but I found it would require much more changes to configure.ac. > It would also make it possible to skip listing enabled features, just > by forgetting to add the feature to the feature list. > > The awk approach has the advantage of dynamically building up a list of > features found in ./config.h. And in addition, the current > implementation also show which arguments was used with ./configure. > > I've attached three patches, which cleans up this feature further. > > > kind regards, > > David Sommerseth > > >> On Sat, Apr 10, 2010 at 10:05 AM, Alon Bar-Lev <alon.bar...@gmail.com> wrote: >>> Highly none standard autotools usage. >>> Also requires awk which may not be available. >>> Please REVERT. >>> >>> On Thu, Apr 8, 2010 at 10:44 PM, David Sommerseth >>> <openvpn.l...@topphemmelig.net> wrote: >> On 30/03/10 14:12, David Sommerseth wrote: >>>>>> This patch will create ./configure.h which will contain two new #define >>>>>> strings. CONFIGURE_DEFINES will contain all USE, ENABLED, DISABLED and >>>>>> DEPRECATED defines from ./config.h. CONFIGURE_CALL will contain the >>>>>> complete ./configure line which was used when configuring the package >>>>>> for building. >>>>>> >>>>>> Signed-off-by: David Sommerseth <d...@users.sourceforge.net> >>>>>> --- >>>>>> Makefile.am | 7 +++++++ >>>>>> configure_h.awk | 39 +++++++++++++++++++++++++++++++++++++++ >>>>>> configure_log.awk | 36 ++++++++++++++++++++++++++++++++++++ >>>>>> options.c | 3 +++ >>>>>> 4 files changed, 85 insertions(+), 0 deletions(-) >>>>>> create mode 100644 configure_h.awk >>>>>> create mode 100644 configure_log.awk >> >> Applied to the openvpn-testing.git feat_misc branch. To be merged into >> allmerged soon. >> Commit f27bf509315a48b0070294c3993a718df0c2626c >> >> >> kind regards, >> >> David Sommerseth >>>> > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel >>>> >>> > >