API for configure.in

W. Tasin tasin at fhm.edu
Mon Feb 4 00:24:02 UTC 2002


Hi,

Etay Meiri wrote:

>Hi,
>
>I'm working on integrating mpatrol support into kdevelop.
>mpatrol is an excellent tool for detecting memory allocation/buffer
>overflows problem in programs. What I'm looking for is an API for 
>changing values in configure.in of a given project. I see functions in
>cproject.h that would let me change all sort of Makefile flags but I don't see
>anything that would let me manipulate configure.in directly. 
>
Unfortunately there is no API for configure.in.in (configure.in only in 
QT-projects) in KDevelop.
This is handled by the different project types...
once a configure.in.in is created there is no way manipulating it with 
KDevelop except using the editor of KDevelop.

>In a sane
>mpatrol installation you get mpatrol.m4 installed in your /usr/share/aclocal
>directory that would let you add AM_WITH_MPATROL to configure.in. This would
>take care of all the distributions differences. For example, on my RH machine
>at home I link with -lmpatrol -lbfd -liberty mpatrol enable programs but on
>my debian machine at the office I do this with -lmpatrol -lelf. Using
>AM_WITH_MPATROL in configure.in seems like the best course of action. 
>
I think so, too...
but please try to include AM_WITH_MPATROL in all different project types 
and maybe you see some problems.

Which is the correct position where AM_WITH_MPATROL should be included?
Does it create conflicting situations with the acinclude.m4.in macro calls?

>Does
>kdevelop provide anything for that? How about hacking configure.in directly
>from my 'Enable mpatrol' menu item in kdevelop.
>
It is a good idea... apart from the fact, that maybe you should do this 
effort for gideon (aka KDevelop cvs-HEAD)?

N.B.: After the release of KDevelop 2.1beta2, I want to add the first 
"automatic" patching of configure.in.in (or configure.in) for adding the 
-fexceptions flag...
but in one very simple step, only to get rid of the -fexceptions bug 
reports (btw. I expect some problems with the implementation).

>
>I'de appreciate any idea how to persue this.
>
My idea for now to patch configure.in(.in) in an easy way is:
- search configure.in.in, if not present then use configure.in.
- search inside this file for lines like
dnl CXXFLAGS= dnl __kdevelop__
or
CXXFLAGS= .......... dnl __kdevelop__

- if one of these is found the switch in the GUI is enabled (can be used)
- if someone activate the exception handling inside the GUI then the 
line should change to
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop__
and reverse.

IMHO AM_WITH_MPATROL should be inserted/deleted the same way.

Ciao

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-devel mailing list