Improved handling of KDE prefixes (configure check)

David Faure faure at kde.org
Thu Feb 26 00:31:27 GMT 2004


The attached patch improves the auto-detection of KDE's prefix
(the one where kdelibs got installed) when compiling a KDE module or package.

The current behavior is, when --prefix isn't passed, defaulting to $KDEDIR if set
(despite KDEDIR being rather deprecated), and to /usr/local/kde if not set.
None of this is really useful to people not having KDEDIR set (i.e. most people 
using binary packages for the base packages), and can lead to problems due to 
the compiled application being installed into a prefix that KDE doesn't know about.

The patch implements the following:
* when --prefix isn't set, find kde-config in the PATH (with fallbacks to a list of known dirs)
kde-config then gives us the "kdelibs prefix", where we'll install the application,
and where we'll look for includes, libs, and kdelibs programs (dcopidl, meinproc etc.).

* when --prefix is set, find kde-config, first in that prefix, otherwise in PATH, otherwise in the known dirs.
Same thing with kde-config giving us the "kdelibs prefix" etc.
But if those two prefixes differ, a warning is shown at the end of configure, about the
need to tell KDE about the new prefix, e.g. by setting KDEDIRS.
(There are other ways, like editing /etc/kderc, but I think it would be too complex
and not very useful to list it there). Any other way worth noting?

Coolo suggested that I use kde-config even more, in KDE_SET_DEFAULT_PATHS,
but I didn't do that yet. We can do it easily now anyway, $KDECONFIG is set in
all cases (not for kdelibs/arts of course). But how would that work? 
Using kde-config --install? I see a few old paths not covered (cgi-bin? do we still use this?).

kdelibs and arts need s/KDE_SET_PREFIX/KDE_SET_PREFIX_CORE/, to
use the old code (KDEDIR or /usr/local/kde by default). Seems to work fine.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admin_prefix.diff
Type: text/x-diff
Size: 10709 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040226/6fe3e133/attachment.diff>


More information about the kde-core-devel mailing list