Problem with configure

W. Tasin tasin at e-technik.fh-muenchen.de
Thu Apr 27 16:47:56 BST 2000


Michael Mueller wrote:
> 
> Richard Moore wrote:

Hi together,

> 
> > Well, there's always the hacky solution:
> >
> > echo  '#define SOMEPATH "/foo/bar"' >> config.h
> >
> > But it sucks :-(

yeah more than sucking... ;-)
it would be overwritten by "./configure"... because config.h is
created from config.h.in.

and config.h.in will be created by the "autoheader" call from
config.h.top, acconfig.h, config.h.bot.

So the correct way should be to do this in
configure.in and in acconfig.h

So calling "make -f Makefile.dist" would make the changement obsolete...
 

> >
> > Rich.
> 
> First I don't want a hacky solution. Second, this doesn't solve the problem, that my
> program needs to see the -DSOMEPATH="/foo/bar" as compiler option without the quotes
> being removed by some shell or what ever.

Hmmm... and now to the problem, what do you want to do with a define in
the gcc-call??

Where is the difference between having it in a header file (which is
created by autoheader/autoconf) and with a -D switch and for what is
this define good for (is it only for developing purpose?)?

The problem is the conflict in the shell and make substitution.

Use for the KDevelop options -DSOMEPATH='\"/foo/bar\"', so you will have
the desired result.

But I don´t agree with this version, if you want to distribute this
DEFINE.
The compiler-switch inserted in KDevelop will not be exported to the
distribution, so 
calling make from the console wouldn´t set the define.

So later you would have to patch either acconfig.h and/or configure.in,
if you wanted to give the DEFINE also to the user of your product.


> 
> Nevertheless thank you very much for thinking about it.
> 
> Michael

Bye

Walter
-- 
The KDevelop project: tasin at kdevelop.de [www.kdevelop.org]
--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB
04,FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>




More information about the KDevelop mailing list