update-desktop-database location

Stanislav Brabec sbrabec at suse.cz
Tue Feb 7 18:08:36 EET 2006


Daniel Stone píše v Út 07. 02. 2006 v 15:55 +0000:
> On Tue, Feb 07, 2006 at 04:52:39PM +0100, Stanislav Brabec wrote:

> > In difference to PATH (and "which" binary), pkg-config is intended to
> > answer questions like:
> > - Is package desktop-file-utils installed?
> 
> if which desktop-file-utils >/dev/null 2>&1; then
> fi
> 
> > - Where are desktop-file-utils binaries installed?
> 
> which desktop-file-utils
> 
> > - Which version of desktop-file-utils we are using?
> 
> desktop-file-utils --version
> 
> I think it's overkill for your requirements, personally.

But please compare configure.ac:

With pkgconfig:

PKG_CHECK_MODULES(foo1, foo2, desktop-file-utils > 0.1)
DESKTOP_FILE_UTILS_BINDIR=`pkg-config --variable=bindir desktop-file-utils`


Without pkgconfig:

- AFAIK, "which" binary is not a part of all UNIXes.

- Use AC_PATH_PROG.

- Maintain all possible non-standard paths from all distros in
AC_PATH_PROG.

- Call "desktop-file-utils --version", write a 5 lines of a sed script,
which parses it (and often contains bugs or fails it --version string
changes a little).

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SuSE CR, s. r. o.                             e-mail: sbrabec at suse.cz
Drahobejlova 27                               tel: +420 296 542 382
190 00 Praha 9                                fax: +420 296 542 374
Czech Republic                                http://www.suse.cz/




More information about the xdg mailing list