[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
about AC_CONFIG_HEADERS
From: |
ting xie |
Subject: |
about AC_CONFIG_HEADERS |
Date: |
Wed, 15 Feb 2012 16:18:22 -0500 |
Hi Ralf,
How are you? It has been long since we talked last time.
I meet another problem about autoconf right now. I want to use
AC_CONFIG_HEADERS[FCDefs.h.in] to create a FCDefs.h file. The content of the
original FCDefs.h.in file is as follows.
------------------------------------------------------------------
/* Define to a macro mangling the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran. */
#undef FC_FUNC
/* As FC_FUNC, but for C identifiers containing underscores. */
#undef FC_FUNC_
------------------------------------------------------------------
I want to create the following file. I created it successfully long before.
---------------------------------------------------------
/ Define to a macro mangling the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran. */
#define FC_FUNC(name,NAME) name ## _
/* As FC_FUNC, but for C identifiers containing underscores. */
#define FC_FUNC_(name,NAME) name ## _
---------------------------------------------------------
However, it turned out to a file with commented out lines.
I read the autoconf mannual about AC_CONFIG_HEADERS, but I can not understand.
Could you please tell me how to solve this problem if possible? Thanks.
Regards,
Ting
> Date: Fri, 17 Sep 2010 22:07:00 +0200
> From: address@hidden
> To: address@hidden
> CC: address@hidden
> Subject: transport conditionals to other files (was: (no subject))
>
> Hello Ting,
>
> * ting xie wrote on Thu, Sep 16, 2010 at 10:23:45PM CEST:
> > How are you? It is quite a long time since we talked last time.
>
> Yes. I'm just fine, thanks! (There are many other helpful readers
> on this list, by the way ...)
>
> > I got a new question about autoconf now. Suppose I have defined a
> > conditional variable in configure.ac file as follows.
> >
> > AM_CONDITIONAL([FOO], [test x$foo = xtrue])
> >
> > I have another file test.inc.in file, if I want to put the condition
> > foo into this .inc.in file, how can I do that?
>
> Hmm, you cannot put the condition into another file right away, as for
> one, the shell variable $foo will not have any meaning there. However,
> if the file is instantiated by config.status (i.e., config.status reads
> FILE.inc.in and produces FILE.inc from it), then you can use a
> substituted variable; put AC_SUBST([foo]) in configure.ac, and @foo@ in
> FILE.inc.in, and it will get replaced with the value of $foo.
>
> > BTW, I do not understand this kind of postfix .inc.in file. May you
> > also give me some explanation on this kind of files if you have time?
>
> The .in postfix usually indicates that this file is read by
> config.status to create a file without the .in postfix; see
> info Autoconf "Configuration Files"
>
> for more information.
>
> Hope that helps.
>
> Cheers,
> Ralf
- about AC_CONFIG_HEADERS,
ting xie <=