Opened 12 years ago

Closed 5 years ago

#4315 closed enhancement (wontfix)

Add --bindings option to gdal-config

Reported by: Mateusz Łoskot Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: svn-trunk
Severity: normal Keywords: gdal-config
Cc:

Description

I'd like to propose a simple patch that adds --bindings option to the gdal-config script. This option prints space-delimited list of bindings built-in into particular installation of GDAL.

The main purpose of this option is to allow users to determine, if necessary, what bindings are available. For example, PostGIS Raster support requires GDAL with Python bindings in which case this gdal-config option would be useful.

If this option is accepted, I will update the Autoconf macro AX_LIB_GDAL (see #4303) to report available bindings.

Attachments (1)

gdal-config-bindings.patch (1.6 KB ) - added by Mateusz Łoskot 12 years ago.
Patch implementing --bindings option for gdal-config

Download all attachments as: .zip

Change History (6)

by Mateusz Łoskot, 12 years ago

Attachment: gdal-config-bindings.patch added

Patch implementing --bindings option for gdal-config

comment:1 by Even Rouault, 12 years ago

Mateusz,

I'm wondering if it would work effectively with the way Linux distros typically build and package GDAL. Generally you have various packages : gdal-bin, libgdal, libgdal-dev and python-gdal. GDAL will be configured once with "./configure --with-python; make", the various output spread into the different packages, but you could install libgdal-dev (and thus gdal-config) without necessarily having installed python-gdal.

comment:2 by Mateusz Łoskot, 12 years ago

Even, I think it is responsibility of distro maintainers to make gdal-config reporting correct locations, regardless of how fragmented GDAL distribution is. It is not a requirements to rely on ./configure and make about generating gdal-config script. Package maintainers can create gdal-config differently, as long as gdal-config works for users.

By the way, I think (or I'm presuming) that's why pkg-config is preferred framework (by maintainers) instead of custom package-specific config utility.

comment:3 by Even Rouault, 12 years ago

Mateusz,

I'm not sure I expressed well my point in the previous comment. My point is that gdal-config (in the current state of the patch) can report that python bindings have been configured, but the package may not be installed, so it makes it a bit less useful.

comment:4 by Mateusz Łoskot, 12 years ago

Even,

I understand it. In case of such packages fragmentation, single gdal-config script is too weak. I guess that's why pkg-config is for: package specific configuration.

comment:5 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.