Bug with the "Make Distribution -> Source-tgz"
tasin at e-technik.fh-muenchen.de
Thu Apr 13 12:53:06 UTC 2000
"Adam L." wrote:
> I have a little problem with external include on the 1.2 kdevelop:
> I put in the project options (additionals options) the following commands:
> -g -D_REENTRANT -I/usr/include/SDL
> And when I try to compile the tarball distribution done with Source-tgz,
> it can't find the header files because the option is missing
> (-I/usr/include/SDL). The "Make Distribution -> Source-tgz" don't put all
> the options (from the "additionals options") in the makefile.am or makefile.in
> (or what ever...)... :-<
> Someone can help me?
Hmmmm... compliments... you have selected a question, which causes 3
for each compiler-switch an different one... ;-)
I assume you want to set this in a KDE or QT application.
If it would be a terminal app, so the explaination would differ (a
1) the -g:
I don't suggest to distribute -g to the package. This is only for
including the debug info, and
will be done if somebody invokes "configure --enable-debug"
BTW: adding only -g wouldn't work right, because you would have to
remove the "-s" switch from the "standard" linker options, too.
2) the -D_REENTRANT:
here a part of the new FAQ... inside the actual snapshot:
--------- snip -------
Q: I´m developing an application where I need to set -D options to the
If I add these in KDevelop to my project options, everything is ok,
but when I
distribute my package, the -D options set in KDevelop are not used.
What do I have
to do to make this work ?
A: Edit the file configure.in in your toplevel source directory. Here,
have to enter after the AC_CHECK_COMPILERS macro:
and after that you have to recreate your new "configure" by invoking
"make -f Makefile.dist" and then rerun the configure script.
Q: Is there another possibility to publish my own defines?
A: Another version to include DEFINEs in your project is to publish
them by config.h.
To do so you have to patch the following files:
Add to acconfig.h of your toplevel project directory the following
and insert in the configure.in, after the macro call
(So it will be defined in config.h after updating your framework with
"make -f Makefile.dist; configure [your options]")
Requirements for this solutions are:
inside configure.in and in the sourcecode a
before the other includes will be done
(normally this is already done in our project templates).
BTW: An advantage of this solution is to make MYDEFINE dependable on
certain situations (like creating an option for configure).
This needs of course writing an own macro function.
--------- snip -------
This is the most difficult part to do it the right way.
An easy, but not correct solution would be to add to the configure.in:
[the best place for that is before the lines:
AC_OUTPUT( ..... )
at the end of the file.]
- Who can guarantee that the includes for SDL would always be in
/usr/include... maybe on some systems it could be /usr/local/sdl/include
(and maybe the lib would be there in /usr/local/sdl/lib)??
- Maybe I haven't installed the SDL so building would fail, but normally
configure should already fail with a more helpful message.
So to make it right you would have to add a macro function to
configure.in, which do certain tests and searches for an installed SDL.
If you want to do so, I can give you here only a hint... try to
understand the acinclude.m4.in or create a KDE-normal-ogl project (also
with the actual KDevelop snapshot), there you will a file called qgl.m4,
which will be concatenated to acinclude.m4 (see "Makefile.dist").
This shows you an extensive example to search for QT-OpenGL-Lib, you
have to rewrite it for your problem.
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
:-------W. Tasin, FB 04,
<Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645>
More information about the KDevelop