Meson wrapdb provides a wrap for ICU, so libxml2 and ICU could both be
built as subprojects of the same Meson parent project. In this case, with
the icu option enabled, setup was failing with:
subprojects/libxml2-2.13.5/meson.build:603:22: ERROR: Could not get an internal variable and no default provided for <InternalDependency dep228908115162702543524838879388991448872: True>
This is because we can't get a dependency variable from a subproject that
hasn't been built yet. Fall back to assuming DEFS is empty, as it is on
my system.
Rename SYSCONFDIR macro to XML_SYSCONFDIR.
Use AX_RECURSIVE_EVAL with Autotools. This is GPL v2 with Autoconf
exception which shouldn't be a problem.
Finally support meson.
Unless we are on Windows, the following POSIX headers are required.
They're part of the earliest POSIX specs and it doesn't make sense to
check for them.
- fcntl.h
- unistd.h
- sys/stat.h
- sys/time.h
On Windows, io.h, fcntl.h and sys/stat.h are always available.
Simpler and easier to force enable.
Also removed wrong curses check. This is meant for static readline and
not needed with meson.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
The autotools build results in a pkgconfig file, which looks like this:
"
...
includedir=${prefix}/include
...
Cflags: -I${includedir}/libxml2
"
The latter part is missing when built with meson.
libdir is needed when searching for iconv, not includedir.
Remove OpenBSD from the bsd list. Something is wrong there and iconv.h
is installed somewhere else.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
on BSDs, icu is installed and included from /usr/local. When found,
libiconv headers override the normal ones and thus result in a missing
link. Work around this oddity and add the link.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Adding a configuration flag as an include directory is wrong and errors
on BSDs.
ERROR: Include dir -DU_DISABLE_RENAMING=1 does not exist.
Matches the autotools build now.
Requires has_argument to fix non BSDs because of an annoying meson
quirk.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Move source code for xmllint shell to shell.c and move it from the
libxml2 library to the xmllint executable.
Also allow shell to run without XPath and debug modules.
Add stubs for old shell API functions in legacy build mode.
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.