1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-27 04:55:04 +03:00
Commit Graph

143 Commits

Author SHA1 Message Date
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
Nick Wellnhofer
a8fe4900be autoconf: Only use --undefined-version with version scripts 2023-04-29 20:17:38 +02:00
Nick Wellnhofer
d8f6e7602c Link with --undefined-version
lld 16 defaults to --no-undefined-version but the version script can
contain symbols disabled by configuration options.

See #473.
2023-04-29 19:12:23 +02:00
Nick Wellnhofer
e07f765f59 Bump version to 2.12.0 2023-04-28 14:51:06 +02:00
Nick Wellnhofer
2df2562e2b autoconf: Add AC_LANG_SOURCE to fix warning 2023-04-26 21:22:17 +02:00
Nick Wellnhofer
1db3567c9d autoconf: Warn about outdated C compilers 2023-04-19 12:19:36 +02:00
Nick Wellnhofer
101a542eb8 Remove RPM build, Makefile.tests, README.tests 2022-12-21 22:05:47 +01:00
Nick Wellnhofer
e2bae1bc04 autotools: Don't use version script on Windows
A feature test would be better, but blacklisting Windows platforms seems
good enough for now.
2022-09-20 14:39:52 +02:00
Nick Wellnhofer
f597eff8dd autotools: Fix winsock detection
Hardcode the required library on MinGW because winsock uses non-standard
calling conventions on 32-bit Windows which makes AC_SEARCH_LIBS fail.

Should fix #406.
2022-09-07 18:26:44 +02:00
Nick Wellnhofer
16d3e8b239 autotools: Only add network libraries if HTTP/FTP enabled 2022-09-07 18:10:03 +02:00
Nick Wellnhofer
5ff3baf0dc python: Create .pyd on Windows 2022-09-06 19:33:32 +02:00
Nick Wellnhofer
a41878bd4c build: Remove check for broken ss_family
This only seemed to affect ancient AIX systems.
2022-09-06 01:07:24 +02:00
Nick Wellnhofer
ad33845975 autotools: Fix bug with multiline arguments
Should fix #404.
2022-09-05 21:16:20 +02:00
Nick Wellnhofer
adcf399beb autotools: Try to fix bug with multiline arguments
Only happens with older autoconf?
2022-09-05 15:36:13 +02:00
Nick Wellnhofer
30c8d9bb23 http: Simplify IPv6 checks
This should also enable IPv6 support on Windows. Untested and mostly
useless anyway, since we don't support HTTPS.
2022-09-05 02:26:13 +02:00
Nick Wellnhofer
9e5a016ef0 autotools: Fix network checks on Windows 2022-09-05 01:25:35 +02:00
Nick Wellnhofer
5d32b12645 Fix detection of GNU libiconv
GNU libiconv prefixes symbols with "lib".
2022-09-04 22:05:16 +02:00
Nick Wellnhofer
27b2b86417 configure.ac: Also check for MSYS host 2022-09-04 18:36:04 +02:00
Nick Wellnhofer
3a1c5ee7c1 Disable fuzzer tests if glob.h wasn't found 2022-09-04 18:36:04 +02:00
Nick Wellnhofer
ad6f10a81b Fix Python build on Windows
Build Python bindings with -no-undefined on Windows. Remove libs that
should already be set by PKG_CHECK_MODULE.
2022-09-04 18:36:04 +02:00
Nick Wellnhofer
22b82d14d1 Improve network library detection 2022-09-04 18:36:04 +02:00
Nick Wellnhofer
0048fd0a50 Detect ws2_32 with AC_SEARCH_LIBS 2022-09-04 03:57:09 +02:00
Nick Wellnhofer
60b03c9ec9 Rework network configure checks
Migrate to AC_SEARCH_LIBS. Don't pollute LIBS.
2022-09-04 03:47:09 +02:00
Nick Wellnhofer
fe02289fa5 Remove arg cast configure checks
We can simply cast to non-const char * unconditionally.
2022-09-04 03:19:01 +02:00
Nick Wellnhofer
2d164d6835 Fix dlopen check 2022-09-04 02:54:20 +02:00
Nick Wellnhofer
1e60c76821 Remove HAVE_WIN32_THREADS configuration flag
Check for LIBXML_THREAD_ENABLED and _WIN32 instead.
2022-09-04 01:49:41 +02:00
Nick Wellnhofer
13a6637815 Remove BeOS support
Haiku shouldn't be affected.
2022-09-04 01:05:51 +02:00
Nick Wellnhofer
38290ec103 Rework dlopen and pthread detection
Migrate to AC_SEARCH_LIBS. Remove check for ancient GCC 3.3.
2022-09-04 00:49:36 +02:00
Nick Wellnhofer
e47df37be9 Fix test in configure.ac
Broken in commit b4847d60.
2022-09-04 00:46:32 +02:00
Nick Wellnhofer
c59df16d1d Always link with -no-undefined
This is a good idea to detect errors early.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
513d65fee8 Use AM_CFLAGS and AM_LDFLAGS consistently 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
17d505e2d2 Remove -Wredundant-decls
Some Python headers contain redundant redeclarations.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
4d911ebc08 Call AC_CHECK_* with multiple arguments 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
75bd98a5ef Remove unused code in nanohttp.c
This was hidden behind an undocumented flag RES_USE_INET6.
2022-09-02 18:33:36 +02:00
Nick Wellnhofer
5bffa33a12 Stop including sys/types.h 2022-09-02 18:33:36 +02:00