autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search for an header file in different paths


From: Marko Lindqvist
Subject: Re: Search for an header file in different paths
Date: Tue, 18 Oct 2011 23:44:38 +0300

On 18 October 2011 18:14, Alessandro Candini <address@hidden> wrote:
> I see.
>
> But gdal have a nice executable called gdal-config, similar to pkg-config:
> address@hidden ~ $ gdal-config --cflags
> -I/usr/include/gdal
> address@hidden ~ $ gdal-config --libs
> -L/usr/lib -lgdal1.7.0
>
> Is there a way to use it like I do with PKG_CHECK_MODULES?
>
> In this way I could avoid the user to insert anything on configure command
> line, because gdal-config will give the right path on every system...

In the end configure is just an shell script, so yes, you can run
arbitrary programs and use their output.

 What I dislike in many of the different xxx-config tools is that they
are not really suitable for cross-compiling. Is gdal-config script
usable in any system that has standard compliant /bin/sh or binary
program executable only in target system?

 Anway, if you want to proceed with gdal-config, you should probably
write new macro (unless one already exist, possibly provided by gdal
itself!) that handles the check details. You should not just blindly
call gdal-config, but to first check that one exist in the build
system, and possibly have some fallback checking mechanism in case it
doesn't.


 - ML



reply via email to

[Prev in Thread] Current Thread [Next in Thread]