Annoying build system problems

Hans Meine hans_meine at gmx.net
Fri Feb 18 16:43:10 GMT 2005


Hi everybody,

some time ago I tried to find out why my freshly compiled freetype was not 
picked up by the KDE configure scripts.  I found out that it's not the 
freetype-config in $PATH that counts, but that under /usr/bin.

To be more specific, I traced this down to KDE_FIND_PATH, which is called with 
a specific list of directories to look in (example from 
kdelibs/kinit/configure.in.in):
KDE_FIND_PATH(freetype-config, KDEINIT_FREETYPE_CONFIG, [${prefix}/bin 
${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])

By default, $PATH is searched only if the program could not be found in the 
given paths.  This is documented in acinclude.m4:
> KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
> if-not-found, test-parameter, prepend-path)
> 
> Look for program-name in list-of-dirs+$PATH.
> If prepend-path is set, look in $PATH+list-of-dirs instead.
> If found, $variable-name is set. If not, if-not-found is evaluated.
> test-parameter: if set, the program is executed with this arg,
>                 and only a successful exit code is required.

Thus, in order to pick up my freetype-config, which is installed in its own 
directory (our local University setup installs every package into its own 
dir), but is in $PATH, I have to use the last (sixth) argument of 
KDE_FIND_PATH to actually prepend my manually setup PATH instead of appending 
it. (see the attached patch)

I wonder if this is intended.  Applicable fixes that come to my mind right now 
would include making "prepend-path=true" the default, or (seems cleaner to 
me) to change the list of paths in the calls to KDE_FIND_PATH to be either 
empty or only include  [${prefix}/bin ${exec_prefix}/bin].  (Both solutions 
assume that paths like /usr/bin are in $PATH anyhow, which is reasonable 
IMHO.)  Wouldn't this make sense?

Ciao, /  /
     /--/
    /  / ANS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetype-configure.patch
Type: text/x-diff
Size: 4313 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050218/4c891cf2/attachment.patch>


More information about the kde-core-devel mailing list