-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to change HAVE_PNG_H to HAVE_PNG in the files:
Line 33 in e8f26dd
| #ifdef HAVE_PNG_H |
Line 39 in e8f26dd
| #ifdef HAVE_PNG_H |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
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 <grass4u@gmail.com>
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 <grass4u@gmail.com>
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.