automake
[Top][All Lists]
Advanced

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

Re: Question about AC_CONFIG_FILES


From: Patrick Guio
Subject: Re: Question about AC_CONFIG_FILES
Date: Sun, 9 Dec 2001 12:19:58 +0100 (CET)

On 9 Dec 2001, Ralf Corsepius wrote:

Thank you for your answer, I had also found out that I could use the shell
syntax AC_CONFIG_FILES([class1.cpp:main.cpp.in])
But the problem is now how to instantiate the variable class_name with
different values. I tried

AC_SUBST(class_name,"class1")
AC_CONFIG_FILES([class1.cpp:main.cpp.in])

AC_SUBST(class_name,"class2")
AC_CONFIG_FILES([class2.cpp:main.cpp.in])

Here both class2.cpp and class1.cpp will be instantiated with the same
value "class2" (i.e. the last AC_SUBST for class_name in the
configure.in file). Is there a way to solve this problem?

Sincerely
Patrick

> Am Sam, 2001-12-08 um 20.42 schrieb Patrick Guio:
> >
> > Dear all,
> > I have a c++ "template" main program. I mean by this that the skeleton of
> > the program is the same but different class can be used. What I would like
> > to do is from the main.cpp.in template program where a variable class_name
> > is used for example as
> > int main
> > {
> > @class_name@ simulator;
> > ...
> > }
> > to be able to replace the @class_name@ using AC_CONFIG_FILES.
> > I was thinking to write in the configure.in something like
> > class_name="class1"
> > AC_CONFIG_FILES(class1.cpp)
> > class_name="class2"
> > AC_CONFIG_FILES(class2.cpp)
> > and so on...
> > The problem is that AC_CONFIG_FILES will look for a class1.cpp.in,
> > class2.cpp.in while I would like it to always look for the default
> > main.cpp.in.
> > Any idea of how to do that?
> Have you tried something similar to this?
>
> AC_CONFIG_FILES([class1.cpp:main:cpp.in])
>




reply via email to

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