Commit Graph

91 Commits (master)

Author SHA1 Message Date
Mike Frysinger 7b0d4198f2 configure: use m4_tolower helper
This is new in autoconf-2.69 and lets us kill off some boilerplate
in our various library tests.
2022-08-28 19:09:57 -04:00
Mike Frysinger 4bbfa00aee configure: require autoconf-2.69
This was released in 2012, and only developers really need it, so
bump the requirement.  This will let us use some newer features
that aren't available in 2.64.
2022-08-28 18:48:41 -04:00
Mike Frysinger 946088ca07 configure: add log when we check config scripts
This should make it more obvious when we aren't probing for the libs
and headers directy ourselves.

Closes #841.
2022-08-28 18:43:11 -04:00
Remi Collet 4f88530baa fix help message 2021-10-05 00:27:16 -04:00
Christoph M. Becker 8accfa98a7
Merge pull request #698 from adamsilverstein/webp-lossless
Support writing lossless WebP
2021-07-23 23:30:27 +02:00
Mike Frysinger 557d4fa167 use https://lib.gd 2021-05-28 22:40:52 -04:00
Adam Silverstein 5ef62f0ead Require libwebp >= 0.2.0. 2021-05-13 08:44:06 -06:00
Mike Frysinger c6af75565a disable gd formats by default #428
These are not normally used, so flip them off.  Hopefully no one notices.
Fixes #428.
2021-04-24 23:34:25 -04:00
Mike Frysinger b4eb70cf74 drop support for freetype <2.1.3
The configure script has already been requiring freetype-2.1.10+, so
this isn't really dropping old support.  Even then, 2.1.3 was released
in 2002, so users have had plenty of time to upgrade.
2021-04-24 23:27:45 -04:00
Mike Frysinger 27da3a23e7 getver: rewrite from perl to shell+awk #535
People are more familiar with shell than perl at this point.
Fixes #535.
2021-04-24 22:48:24 -04:00
Ben Morss f2aa2836ed
AVIF support (#671)
Demand for AVIF support on the web is growing, as the word gets out
about this new file format which allows higher-quality encoding at
smaller sizes.  Core contributors to major open-source CMSs are
interested in auto-generating AVIF images! They've been simply
waiting for support to appear in libgd.

This PR aims to meet the growing demand, and to help bring smaller,
more beautiful images to more of the web - to sites created by
experienced developers and CMS users alike.

This PR adds support by incorporating libavif in addition to the
existing libheif support.  It's generally felt that libavif has
more complete support for the AVIF format. libavif is also used
by the Chromium project and squoosh.app.

In this PR, I've endeavored to incorporate the latest research into
best practices for AVIF encoding - not just for default quantizer
values, but also an algorithm for determining the number of
horizontal tiles, vertical tiles, and threads.

Fixes #557.
2021-03-03 21:35:56 -05:00
Martin Reboredo 39c4644fa0
HEIF support through libheif (#670)
With the adoption of AVIF by Firefox and Chromium based browsers (still
in experimental phase), the newer incorporation of HEIF by Canon and Sony 
in their cameras and the newer support of both of them in modern software 
like ImageMagick, GIMP and Krita, `gd` haven't seen any endorsement for
the formats up until this PR.

Reading and writing is done by `libheif`, with functionality for chroma 
subsampling (for now `4:2:0`, `4:2:2` and `4:4:4`), quality (with new
`200` for lossless) and compression (whether `HEVC` or `AV1`) selection. 

This was tested with `libheif` version `1.11.0` in my Solus machine.

Also, fixes both #395 and #557.
2021-03-02 12:32:03 -05:00
Mike Frysinger fb33294724 webp: support pkg-config file 2021-01-20 15:17:14 -05:00
wilson chen 28ecfe77c8
fix #303: gdlib.pc: use Requires instead of Libs (#537) 2020-06-18 14:55:32 +08:00
Peter Kokot f0a455ff41 Remove AC_FUNC_VPRINTF
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_FUNC_VPRINTF`.

This macro checks for presence of the C `vprint` function otherwise
checks for the presence of the `_doprnt` function. This check was
relevant on very old systems and today can be omitted since it should
be well supported by now. [2]

Also libgd doesn't use the `HAVE_VPRINTF` or `HAVE_DOPRNT` symbols.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-11 23:44:03 -04:00
Peter Kokot 5dc2dd8b49 Remove HAVE_STDLIB_H
The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-08 03:29:27 -04:00
Peter Kokot d8ead0b8e0 Remove AC_C_CONST
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the `AC_C_CONST`.

The `const` keyword is used in C since C89. On old systems some compilers
lacked the `const` and this macro defined it to be empty. This check was
relevant on systems with compilers before C89 and on current systems it
can be omitted. [2]

The libgd also requires at least C89 or newer so `const` is always available.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-08 03:18:10 -04:00
Peter Kokot 5fa75ace15 Remove HAVE_STRING_H
The C89 and later standard defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STRING_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-08 03:16:35 -04:00
Peter Kokot 486467fc8f Remove HAVE_STDDEF_H
The `<stddef.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to manually check if header is
present anymore.

Since the libgd requires at least C89 or greater, the `HAVE_STDDEF_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-06 02:04:22 -04:00
Peter Kokot d81a1383d7 Remove HAVE_LIMITS_H
The `<limits.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to manually check if header is
present anymore.

Since the libgd requires at least C89 or greater, the `HAVE_LIMITS_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-06 00:30:15 -04:00
Peter Kokot 1e7f93922f Remove HAVE_ERRNO_H
The `<errno.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.

Since libgd requires at least C89 or greater, the `HAVE_ERRNO_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.3
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-05 01:39:49 -04:00
Mike Frysinger c9c4f0ed53 configure: support libjpeg.pc #455
Since newer jpeg/jpeg-turbo releases include a pc file,
optionally support it.

Closes #455.
2018-08-26 12:14:33 -04:00
Mike Frysinger e6bb110663 drop netware support #294
We have no way of testing netware, and the OS has been dead for years.
PHP also has dropped support for it.

Closes #294.
2018-08-25 12:50:23 -04:00
Mike Frysinger 14b8020dda make gd/gd2 image formats optional #428
We still enable them by default, but we'll probably flip them off
in the next major release series.
2018-01-30 17:58:44 -05:00
Christoph M. Becker 8e7fca0057 Fix typo 2017-08-01 19:05:32 +02:00
Mike Frysinger 5ebbd50cff cmake: add soname info to libgd.so
Pull out the library versioning info out of configure and into a common
script that both cmake & autotools can run.  This way we have a single
source of truth for the versioning info.
2016-11-10 09:09:14 -05:00
Mike Frysinger 7e87587205 configure: only enable -Werror by default in git builds #339 2016-11-10 09:07:33 -05:00
Mike Frysinger d62f608c7c gdlib-config: punt!
We've been shipping the pkg-config file for a while now and
want people to use that only, so drop this old script.

This also drop the FEATURES variable as it was only available
via `gdlib-config --features` (and no one has complained).
2016-10-06 13:44:48 -04:00
Mike Frysinger 7d04b45481 tests: drop test_config.h
This header provides a single define: GDTEST_TOP_DIR.  Move it to the
build CPPFLAGS instead since it's a path var and that's the recommended
way of handling these (by autotools standards), and it simplifies the
build overall.  It also harmonizes the autotool & cmake build paths.

We localize this define to the gdtest/ subdir as we don't want any of
the other tests using the path.  We have gdtest helpers instead.
2016-07-21 20:25:29 +05:30
Khalid Alqassabi 1dbccb737c Add complex text layout support
This pull request (based on Asma's works) adds support for languages that require [complex text
layout](https://en.wikipedia.org/wiki/Complex_text_layout).

We are using [libraqm](https://github.com/HOST-Oman/libraqm), a small source
code-only library that wraps FriBidi (for bidirectional text support) and
HarfBuzz (for text shaping), and does proper BiDi and script itemization.

The CTL support is enabled by default but can be disabled at compiling time,
and we provide a fallback function that uses your original code without CTL
support.
2016-06-30 13:19:25 +04:00
Mike Frysinger 70ecd2126d configure: build with -Wall by default
This makes -Werror more effective (which we already utilize).
2016-06-03 20:09:37 -04:00
Mike Frysinger 502e4cd873 libtool: rework revision to fix OS X breakage
It seems the OS X linker restricts the revision field to 8 bits.
Rework how we calculate that value and pack it in closer to fit.
It might produce some collisions if we get to like 2.2.8, but oh
well ... this field doesn't need to be super exact.

Fixes #214.
2016-05-21 15:00:53 -04:00
Mike Frysinger c6c52b3de1 dist: drop bzip2 tarball
The xz tarball is smaller and most systems should have support for it
nowadays.  For anyone who doesn't, there's still the gzip tarball.
2016-05-19 22:36:26 -04:00
Mike Frysinger 793294467b libtool: set revision based on package version 2016-05-19 22:35:39 -04:00
Mike Frysinger c9a4a85f38 libimagequant: fix integration
The symbol was being set up in cmake but not on the autotools side.
Clean this up to be like other external libraries.

We need to pull in some openmp logic as it's not uncommon for the lib
to be built with openmp support.  When we test for it, we need to do
so with openmp flags.

Fixes #137.
2016-05-18 03:03:50 -04:00
Mike Frysinger b64c996b07 build: fix GDLIB_REVISION collision
We are using GDLIB_REVISION to refer to the gd version string (the "z"
in "x.y.z"), and we are using it to control the libtool revision field.
This leads to problems where the version increases (e.g. "2.1.1") but
the libtool revision doesn't (e.g. "0").  So scripts end up seeing a
revision of "0" in their output instead of "1".

Namespace the libtool version variables with "_LT_" to avoid any more
collisions.

Fixes #140.
2016-05-18 02:34:45 -04:00
Mike Frysinger 1239832a09 configure/cmake: unify header checks and config.h generation
Rather than hand maintain config.h.cmake (which is already out of date),
re-use the autogenerated config.h from autoheader.
2016-05-17 23:06:14 -04:00
Mike Frysinger b12f217681 configure: enable -Werror by default when available
Turn this on when building under Travis to increase coverage.
2016-05-13 22:20:27 -04:00
Mike Frysinger a4f5d5d64e configure: unify library tests
The various code paths were inconsistent in how they handled user flags.
Create common macros and rebase all the library checks on top of those
so we know they all stay in sync.
2015-11-23 19:06:46 -05:00
Mike Frysinger a9205e50c3 configure: require autoconf-2.64/automake-1.11
Both of these versions were released in 2009, so people should have them
(or newer) readily available.
2015-11-23 16:50:08 -05:00
Mike Frysinger 9104bba078 configure: use AS_HELP_STRING everywhere 2015-11-23 15:24:21 -05:00
Ondřej Surý 9201900895 Change issue tracker URL to github 2015-01-22 10:35:46 +01:00
Pierre Joye ba081d9141 Merge branch 'GD-2.1' 2015-01-21 05:07:11 +01:00
Pierre Joye 1481c4139d fix #140, versions placeholder not replaced in gdlib-config 2015-01-21 05:06:39 +01:00
Pierre Joye a79232c5fa fix #129, drop VPX usage in favor of libwebp 2015-01-20 04:55:11 +01:00
Nathanael Jones 10ffb33080 Silence automake 1.14 warnings ("source file is in a subdirectory, but option subdir-objects is disabled"). 2014-10-02 13:39:43 -04:00
Chris Reuter 4378b8ded4 gd.h now holds the canonical version number.
Up to now, the version numbers were defined in configure.ac and put
into gd.h by generating it from gd.h.in, replacing the values of
several C macros.  This violates the DRY principle, won't work on a
dumb build system, confuses some dev tools and is just a huge headache
in general.

This change makes gd.h (no longer generated) the home of the version
number and provides a script (config/getver.pl) which can extract the
requested version components from the header file.  configure.ac now
gets the version number from gd.h instead of vice versa.

In addition, there are now C functions that return the values of the
version macros.  This is for the benefit of non-C code using the
library without access to the header file.  It also provides a way to
get the version number of the library currently linked rather than the
header the program was compiled against.  (This could change if the
shared library is updated without recompiling the program using it.)
2013-11-07 19:44:45 -05:00
Ondřej Surý f597bd4c97 Don't append dash when GDLIB_EXTRA is empty 2013-06-27 09:58:15 +02:00
Ondřej Surý f47a1df550 Create gd.h from gd.h.in to properly include current library version 2013-06-26 17:09:02 +02:00
Pierre Joye 9f0a7e7f4f prepare 2.1.0 final 2013-06-25 16:03:16 +02:00