pkg-config

Regina Obe lr at pcorp.us
Mon Nov 20 15:41:29 PST 2023


> I am re-working the GEOS detection in the configure script a bit, and I have the
> following logic:
> 
> if (geos-config provided)
>   use geos-config
> else
>   if (pkg-config found)
>     use pkg-config
>   elseif (geos-config on path)
>     use geos-config
>   else
>     error cannot find geos
> 
> Is that the right order? I noticed that libxml2, just prior to geos in the configure
> script, prefers xml2-config to pkg-config if it exists.
> 
> P

You know I don't think I've ever attempted to pass geos-config on path.  Not that it doesn't work, just didn't realized that was even supported, or are you adding that?

The only possibly incomplete thing I see in you code is:

What if you have pkg-config, but you can't find geos with it? Does it eventually end with can't find geos, or tries to look for it in on path?

In my case, I put all the pkg_config stuff in  PKG_CONFIG_PATH as shown here

https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/ci/winnie/winnie_common.sh#L119

 cause well I'm constantly switching versions of libraries. But it is possible I make a typo.

Thanks,
Regina



More information about the postgis-devel mailing list