Ticket #3470 (new enhancement)

Opened 3 years ago

Last modified 20 months ago

gdal.pc would be useful

Reported by: ajolma Owned by: mloskot
Priority: normal Milestone:
Component: ConfigBuild Version: unspecified
Severity: normal Keywords:
Cc:

Description

Many libraries report their requirements in pkg-config files (see  http://pkg-config.freedesktop.org/wiki/). gdal-config is fine, but it requires shell, which is not always available. Thus a gdal.pc, which is installed into /usr/local/lib/pkgconfig, would be great.

Attachments

gdal-pkg-config-support.patch Download (1.6 KB) - added by mloskot 20 months ago.
Prototype of gdal.pc implementation

Change History

Changed 20 months ago by mloskot

  • owner changed from warmerdam to mloskot

Changed 20 months ago by mloskot

Prototype of gdal.pc implementation

Changed 20 months ago by mloskot

I have never written any pkg-config file, so this is my first one and I expect it's not completely right, but it seems to work for me:

mloskot@dog: gdal$ pkg-config --modversion gdal
1.9.0

mloskot@dog: gdal$ pkg-config --libs gdal
-L/home/mloskot/dev/gdal/_svn/trunk/gdal -L/usr/local/lib -lgdal -lgeos_c -lsqlite3 -lexpat -lz -lpthread -lm -lrt -ldl  

mloskot@dog: gdal$ pkg-config --cflags gdal
-I/home/mloskot/dev/gdal/_svn/trunk/gdal/port -I/home/mloskot/dev/gdal/_svn/trunk/gdal/gcore -I/home/mloskot/dev/gdal/_svn/trunk/gdal/alg -I/home/mloskot/dev/gdal/_svn/trunk/gdal/ogr -I/home/mloskot/dev/gdal/_svn/trunk/gdal/ogr/ogrsf_frmts  

mloskot@dog: gdal$ pkg-config --variable=datadir gdal
/home/mloskot/dev/gdal/_svn/trunk/gdal/data

mloskot@dog: gdal$ pkg-config --print-variables gdal
CONFIG_VERSION
exec_prefix
CONFIG_CFLAGS
CONFIG_LIBS
datadir
prefix
libdir
includedir
CONFIG_DATA
CONFIG_PREFIX
Note: See TracTickets for help on using tickets.