1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00
Commit Graph

177 Commits

Author SHA1 Message Date
Nick Wellnhofer
02f519e67b autotools: Use pkg-config to check for libreadline
This handles static linking properly and avoids overlinking.

Change the --with-readline default to no as it was before and raise an
error if libreadline couldn't be found.

Do the same for libhistory.
2024-06-21 13:48:22 +02:00
Nick Wellnhofer
2b0c4abb1f threads: Remove pthread weak symbol hack
On Linux, we tried to detect the presence of libpthread to disable
things like locks. This questionable hack doesn't work since glibc 2.34
which merged libpthread into libc.
2024-06-17 00:54:47 +02:00
Nick Wellnhofer
3848802723 xmllint: Support libreadline without history 2024-06-17 00:54:47 +02:00
Nick Wellnhofer
b0fc67aa22 build: Remove --with-tree configuration option
This option would allow for a smaller, but mostly useless minimal build.
But it complicates the symbol availability logic in an insane way and
requires specialized tools like our custom C parser in doc/apibuild.py.

See #717.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
7cf7a54aea build: Only enable linker version script in legacy mode
The version script is deprecated but required for backward
compatibility.
2024-06-16 18:47:12 +02:00
Nick Wellnhofer
898e5a1442 build: Remove compiler TLS warning 2024-06-15 20:17:18 +02:00
Nick Wellnhofer
f070acc564 autotools: Abort if external libraries couldn't be found
This makes the configuration process more robust and deterministic.
Before, we would silently disable options.
2024-06-15 01:23:39 +02:00
Nick Wellnhofer
669bd34993 xpointer: Remove support for XPointer locations
The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:

    https://www.w3.org/TR/xptr-xpointer/

The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.

If you configure --with-legacy, old symbols are retained for ABI
compatibility.
2024-06-12 18:20:01 +02:00
Nick Wellnhofer
dba1ed85a3 ftp: Remove FTP support
Remove the built-in FTP client. If you configure --with-legacy, old
symbols are retained for ABI compatibility.
2024-06-12 18:19:55 +02:00
Nick Wellnhofer
b46decdfc9 Bump version 2024-06-12 15:58:36 +02:00
Nick Wellnhofer
ec09909dd3 autotools: Fix pthread detection on FreeBSD
pthread_join is defined by libc, so check for pthread_create instead.

Should fix #725.
2024-05-29 13:47:37 +02:00
Nick Wellnhofer
e349709ae7 build: Remove --with-fexceptions configuration option 2024-05-21 21:07:16 +02:00
Nick Wellnhofer
f524993e70 build: Clean up configuration options
Remove run-debug from meson. Fix documentation.
2024-05-21 21:05:32 +02:00
Nick Wellnhofer
11ce63f02b build: Don't check for isascii 2024-05-21 20:40:30 +02:00
Nick Wellnhofer
6f2a597383 build: Don't check for uint32_t 2024-05-21 20:40:30 +02:00
Nick Wellnhofer
5c9e0ebe71 autotools: Change ICU message
Only log non-default actions.
2024-05-21 20:40:28 +02:00
Nick Wellnhofer
54629e0f75 autotools: Remove --with-coverage configuration option 2024-05-21 20:25:23 +02:00
Nick Wellnhofer
e80f27fc81 build: Don't check for inttypes.h
This header isn't used.
2024-05-21 18:37:57 +02:00
Nick Wellnhofer
dda69626b9 autotools: Only check for networking headers if required 2024-05-21 18:31:37 +02:00
Nick Wellnhofer
3018842c07 build: Disable HTTP support by default 2024-05-20 23:59:55 +02:00
Nick Wellnhofer
609d2666fa Stop defining _REENTRANT
This macro is obsolete, see `man feature_test_macros`.
2024-05-13 13:08:14 +02:00
Nick Wellnhofer
d381e5de4a doc: Move doc/examples to example 2024-04-28 21:55:34 +02:00
Nick Wellnhofer
1cdfece12b memory: Remove memory debugging
This is useless compared to sanitizers or valgrind and has a
considerable performance impact if enabled accidentally.
2024-04-28 20:42:55 +02:00
Nick Wellnhofer
f7f1453772 build: Disable support for compression libraries by default
libxml2 has limited support for reading and writing compressed data
with the help of zlib and liblzma which used to be enabled by default.
This only works for files read from the file system and never worked
with memory buffers. My guess is that this feature is virtually unused.

In light of the recently discovered xz backdoor, it's a good time to
disable these features by default to reduce attack surface and prepare
for eventual removal.

If --with-legacy is passed to the Autotools build, compression will
be enabled by default as before.
2024-04-02 13:25:56 +02:00
Nick Wellnhofer
e97b4d843f autotools: Remove useless substitution
Fixes #689.
2024-02-13 12:00:02 +01:00
Nick Wellnhofer
24059ae92e autotools: Readd --with-xptr-locs configuration option
The option was removed accidentally in 4e4c89a4.
2024-01-10 18:10:10 +01:00
Nick Wellnhofer
d7d300ba04 parser: Remove remnants of runtime debugging feature
Apparently, this feature was remove long ago.

Fixes #651.
2024-01-04 17:50:11 +01:00
Nick Wellnhofer
2e9e758d1e dict: Get random seed from system PRNG 2023-12-24 16:24:34 +01:00
Nick Wellnhofer
be558647c1 autotools: Fix option description 2023-12-05 21:25:09 +01:00
Nick Wellnhofer
cf6e58d63c build: Disable compiler TLS by default
The global struct is quite large (~700 bytes on 64-bit systems which
will be allocated for each thread whether it uses libxml2 or not) and
already close to the total size limit on some platforms.

Disable compiler TLS by default.
2023-12-05 21:07:00 +01:00
Nick Wellnhofer
5cffba8381 Rework va_copy fallback
va_copy is a macro, so it can be detected without a feature test.
Fallback to __va_copy or memcpy.
2023-11-28 15:59:40 +01:00
Nick Wellnhofer
7d6969d955 Remove Trio
Trio is a rather old cross-platform printf library which was bundled with
libxml2. It was needed for ancient pre-C99 systems without snprintf and
should be safe to remove these days.
2023-11-23 15:48:52 +01:00
Nick Wellnhofer
f3c24112d3 autotools: Stop checking for snprintf
This works around a bug when cross-compiling to 32-bit MinGW:

https://sourceforge.net/p/mingw-w64/bugs/935/

This means that we don't fall back to the bundled Trio library if
snprintf couldn't be detected. Trio support is completely untested, most
likely broken and will be removed soon.

Fixes #625.
2023-11-22 02:12:44 +01:00
Nick Wellnhofer
3669316ad1 Bump version 2023-11-16 13:34:03 +01:00
Nick Wellnhofer
19161bab15 dict: Internal API to look up hash values 2023-09-29 12:43:08 +02:00
Nick Wellnhofer
de4b270aef autotools: Make --with-minimum disable lzma support
Fix an oversight when handling the --with-minimum option.
2023-09-21 14:31:31 +02:00
Nick Wellnhofer
e7f0d88ba4 build: Remove some GCC warnings
-Wnested-externs produces spurious warnings after implicit
declaration of functions.

-Winline is useless since we don't use inlines.

-Wredundant-decls was already removed for autotools.
2023-09-21 02:26:43 +02:00
James Le Cuirot
5a18c505a7
autoconf: Include non-pkg-config dependency flags in the pkg-config file
These were present before, but I accidentally dropped them in my recent
build improvements.
2023-09-04 22:14:13 +01:00
James Le Cuirot
6864d92f6c
autoconf: Don't bake build time CFLAGS into pkg-config file
Having slept on it, I've realised that baking the dependency CFLAGS into
the pkg-config file is pointless when it is only used to link against
them. It may even cause problems.
2023-09-04 22:14:02 +01:00
James Le Cuirot
93e8bb2a40
build: Generate better pkg-config files for static-only builds
pkg-config supports `Requires.private` and `Libs.private` fields for
static linking. However, if you're building a dynamic binary, then
pkg-config will use the non-private fields, even if just the static
libxml2 is available. This will result in libxml2 being underlinked,
causing the build to fail. The solution is to fold the private fields
into the non-private fields when the shared libxml2 is not being built.

This works for Autotools and CMake. Meson also knows how to handle this
when it automatically generates pkg-config files.
2023-09-03 08:52:36 +01:00
James Le Cuirot
4640ccac85
build: Generate better pkg-config file for SYSROOT builds
The -I and -L flags you use to build should not necessarily be the same
ones you bake into installed files. If you are building with
dependencies located under a SYSROOT then the installed files should
have no knowledge of that SYSROOT. For example, if the build requires
`-L/path/to/sysroot/usr/lib/foo` then only `-L/usr/lib/foo` should be
baked into the installed files.

pkg-config is SYSROOT-aware, so this issue can be sidestepped by using
the `Requires` field rather than the `Libs` and `Cflags` fields. This is
easily resolved if you rely solely on pkg-config, but this project falls
back to standard Autoconf checks, so a little more effort is required.

Unfortunately, this issue cannot feasibly be resolved for CMake.
`find_package` is used rather than `pkg_check_modules`, so we cannot
tell whether a pkg-config file for each dependency is present or not,
even if `find_package` uses pkg-config behind the scenes. The CMake
build does not record any dependency -I or -L flags into the pkg-config
file anyway. This is a problem in itself, although these dependencies
are most likely installed to standard locations.

Meson is very much better at handling this, as it generates the
pkg-config file automatically using the correct logic.
2023-09-03 08:52:22 +01:00
Nick Wellnhofer
54a0b19a9f autoconf: Allow custom --with-icu configure option 2023-09-01 14:52:14 +02:00
Nick Wellnhofer
c5989473b9 dict: Use thread-local storage for PRNG state 2023-09-01 14:52:11 +02:00
Nick Wellnhofer
57cfd221a6 dict: Use xoroshiro64** as PRNG
Stop using rand_r. This enables hash randomization on all platforms.
2023-09-01 14:52:04 +02:00
Nick Wellnhofer
4e4c89a4bc doc: Improve documentation of configuration options 2023-08-21 11:13:33 +02:00
Christoph Reiter
2473b4855e autotools: fix Python module file ext for cygwin/msys2
both use .dll, not .pyd
2023-06-21 14:38:38 +02:00
Nick Wellnhofer
cb8ccb1078 testapi: Don't set http_proxy environment variable
We already disable network access, so this has no effect.
2023-05-25 03:17:45 +02:00
Nick Wellnhofer
9fd57df815 autotools: Improve iconv check
Use a custom test program which includes iconv.h, so we can check
whether the possibly redefined symbols in this header file match the
symbols in the iconv library.

Should fix #547.
2023-05-25 02:47:27 +02:00
Nick Wellnhofer
bdb5667a5c autotools: Fix ICU detection
Fixes #540.
2023-05-10 18:13:47 +02:00
Mike Dalessio
3463063001
autoconf: fix iconv library paths
and pass cflags when building executables

See 0f77167f for prior related work
2023-05-06 12:26:17 -04:00