configure: Support for libpng-config#2679
Conversation
|
Maybe, adding support for |
|
BTW, is |
|
from Lines 39 to 44 in e8f26dd |
|
...
libs="-lpng16"
...
L_opts=
R_opts=
...
ldopts=""
...
--ldflags)
echo ${ldopts} ${L_opts} ${R_opts} {$libs} |
nilason
left a comment
There was a problem hiding this comment.
You need to change HAVE_PNG_H to HAVE_PNG in the files:
Line 33 in e8f26dd
Line 39 in e8f26dd
And then it works for me.
There is one difference to PNGLIB compared to before:
was -L/opt/local/lib -lpng -lz
with this: -L/opt/local/lib -lpng16
there is a missing -lz flag. I'm not sure of the importance or consequence of this.
|
Not sure either, but if |
Changing HAVE_PNG to HAVE_PNG_H is more consistent with other *_H and safer (previously it was HAVE_PNG_H)
Well, it is there. Using it comes from: $ZLIB="-lz" and $MATHLIB="" (on my system) was previously set as mandatory (and added) by autoconf with: Lines 145 to 159 in e8f26dd Maybe Re: HAVE_PNG vs HAVE_PNG_H. There is already a bunch of similar to the former one with e.g. HAVE_OGR, HAVE_GDAL, HAVE_PDAL. But no big issue, works either way. |
That's interesting.. Only
including |
Indeed, that seems to be the safest way not to introduce regression. |
Last minute changes to configure.ac with OSGeo#2679 never was generated to configure.
* configure: PNGVER environment variable to pickup libpng16.dll from OSGeo4W v2 * Add libpng-config (part of libpng) support and missing script for OSGeo4W * Add --dll-version to libpng-config; Update gdal-config to detect libpng version * Add --libpng-config to build_centos.sh * Fix for clang (no implicit declaration of function) * Use libpng-config --ldflags instead of --libs to include -L flags * Let's try LDFLAGS for Ubuntu 20.04 * Define HAVE_PNG_H * Consistent comments * Delete trailing spaces; Replace tabs+spaces+tabs with tabs+spaces * Copyright year to 2022 * Revert build_ubuntu-20.04.sh * Add --static flag to libpng-config to include -lm -lz Co-authored-by: Huidae Cho <[email protected]>
Last minute changes to configure.ac with commit 8efd228 (OSGeo#2679) was never generated to configure.
* configure: PNGVER environment variable to pickup libpng16.dll from OSGeo4W v2 * Add libpng-config (part of libpng) support and missing script for OSGeo4W * Add --dll-version to libpng-config; Update gdal-config to detect libpng version * Add --libpng-config to build_centos.sh * Fix for clang (no implicit declaration of function) * Use libpng-config --ldflags instead of --libs to include -L flags * Let's try LDFLAGS for Ubuntu 20.04 * Define HAVE_PNG_H * Consistent comments * Delete trailing spaces; Replace tabs+spaces+tabs with tabs+spaces * Copyright year to 2022 * Revert build_ubuntu-20.04.sh * Add --static flag to libpng-config to include -lm -lz Co-authored-by: Huidae Cho <[email protected]>
Last minute changes to configure.ac with commit 8efd228 (OSGeo#2679) was never generated to configure.
This PR is needed to use the OSGeo4W version of libpng, not the MSYS2 version.
Usage:
The included
libpng-configis version-agnostic as long as${OSGEO4W_ROOT_MSYS}/include/libpng${PNG_DLL_VERSION}/png.hexists.