1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
Commit Graph

118 Commits

Author SHA1 Message Date
David Seifert
5ccdfa43ff configure.ac: produce tar.xz only (GNOME policy)
* This is part of a policy from 2011:
  https://mail.gnome.org/archives/distributor-list/2011-September/msg00000.html
2022-04-02 15:00:59 +00:00
David Seifert
7bce30083a configure.ac: make AM_SILENT_RULES([yes]) unconditional
* No need to support Automake 1.10 anymore.
2022-04-02 15:00:59 +00:00
Nick Wellnhofer
1366c5693d Don't try to recreate COPYING symlink
Since automake is initialized with "foreign" for quite some while,
it shouldn't touch these files anymore.
2022-04-02 15:36:22 +02:00
David Seifert
5c71ada83a
Detect libm using libtool's macros 2022-03-30 16:51:17 +02:00
David Seifert
dff686883c
configure.ac: disable static libraries by default 2022-03-30 16:51:16 +02:00
David Seifert
9e30435358
python/Makefile.am: rely on global AM_INIT_AUTOMAKE
* Even Debian oldoldstable has Automake 1.15 available nowadays.
2022-03-30 16:51:14 +02:00
David Seifert
7a4037bea2
configure.ac: remove useless AC_SUBST
* CPPFLAGS/LDFLAGS are always substituted
2022-03-30 16:51:12 +02:00
Nick Wellnhofer
456a0bf6cb Remove --with-html-dir option
Install documentation in $(docdir).
2022-03-29 16:24:19 +02:00
Nick Wellnhofer
7458096766 Rework documentation build system
Since several generated files are under version control, their
timestamps are essentially random and rebuilding documentation using
Makefile rules can't work reliably. Simply add a phony rebuild target
that regenerates the whole documentation and other files
unconditionally.

    make -C doc rebuild
2022-03-29 16:24:19 +02:00
David Seifert
d9335077dd
Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings
* `AM_PATH_PYTHON` is a much more common idiom for building
  and installing python modules than writing your own.
* It also makes cross-compiling the python bindings possible.
  Previously the `PYTHON_CFLAGS`/`PYTHON_LIBS` would have been
  based on the `--build` python and not the `--host` python.
  By using `pkg-config`, we can always redirect the python-X.Y.pc.

Bug: https://bugs.gentoo.org/582130
2022-03-29 13:37:16 +02:00
Nick Wellnhofer
4a8c71eb7c Remove DOCBparser
This code has been broken and deprecated since version 2.6.0, released
in 2003. Because of a bug in commit 961b535c, DOCBparser.c was never
compiled since 2012. I couldn't find a Debian package using any of its
symbols, so it seems safe to remove this module.
2022-03-04 22:56:21 +01:00
Nick Wellnhofer
21ddad5284 Remove ICONV_CONST test
We can simply cast the offending pointer to (void *).
2022-03-04 22:08:58 +01:00
Nick Wellnhofer
5c009c668b Remove obsolete AC_HEADER checks 2022-03-02 01:31:56 +01:00
Nick Wellnhofer
72119afe00 Don't check for standard C89 library functions
Don't check for

- fprintf
- localtime
- printf
- rand
- sprintf
- srand
- sscanf
- strftime
- time
- vfprintf
- vsprintf

If the C99 functions snprintf and vsnprintf are missing, Trio is
enabled.
2022-03-02 01:14:08 +01:00
Nick Wellnhofer
776d15d383 Don't check for standard C89 headers
Don't check for

- ctype.h
- errno.h
- float.h
- limits.h
- math.h
- signal.h
- stdarg.h
- stdlib.h
- string.h
- time.h

Stop including non-standard headers

- malloc.h
- strings.h
2022-03-02 00:43:54 +01:00
Nick Wellnhofer
b66ce0bba8 Don't include ICU headers in public headers
There's no need to make these implementation details public.
2022-03-01 13:02:49 +01:00
Nick Wellnhofer
6117700e2c Remove special configuration for certain maintainers 2022-02-20 21:49:05 +01:00
Nick Wellnhofer
aeaf02c0a3 Disable docbook support by default
The docbook code is broken and has been deprecated for years.
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
96889d195b Disable legacy support by default
If you need support for legacy APIs, you have to enable it explicitly:

    ./configure --with-legacy
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
a0a0f3be93 Disable FTP support by default
In the unlikely case that you really need FTP support, you have to
enable it explicitly with:

    ./configure --with-ftp
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
a075d256fd Release v2.9.13 2022-02-19 19:26:42 +01:00
Nick Wellnhofer
85a35ba068 Support custom prefix when installing Python module
Also fixes make distcheck.
2022-02-14 17:44:29 +01:00
Nick Wellnhofer
7fe9addcbc Remove CVS and SVN-related code 2022-02-13 23:35:18 +01:00
Nick Wellnhofer
97fe12791a Remove wrong tarname from AC_INIT
Remove the "tarname" added in commit 7c0253aa. Having a tarname
including a version number would result in tarballs named
libxml2-2.9.12-2.9.12.tar.gz.

This change also means that documentation will now be installed in
$(datadir)/doc/libxml2 instead of $(datadir)/doc/libxml2-$(version).
Having a version number in the documentation directory doesn't seem
helpful. The new location also matches the default autotools $(docdir).
2022-01-20 16:16:52 +01:00
Mattia Rizzolo
7c0253aadf Refactor the settings of $docdir
This is a completely noop change for this project, since before this
commit nothing was using $docdir nor PROGRAM_TARNAME.

Setting the fourth parameter of AC_INIT() makes it set PROGRAM_TARNAME,
which then used as the last path component of the default docdir,
effectively making $docdir be the same as the previous
$BASE_DIR/$DOC_MODULE.

Signed-off-by: Mattia Rizzolo <mattia@mapreri.org>
2022-01-16 14:47:35 +01:00
Ben Boeckel
51c88c6f8d configure: remove unused checks for functions
Nothing uses the results from these checks, so remove the checks. There
are some "uses" in order to suppress macro shadowing in MSVC's
implementation of `isinf` and `isnan` as macros, but those are
hard-coded and do not require checks to manage.
2022-01-16 14:34:37 +01:00
Ben Boeckel
1a013ba711 configure: remove unused checks for libraries
These libraries are queried for, but no code cares about the results, so
remove the checks.
2022-01-16 14:34:37 +01:00
Ben Boeckel
9669bd68a3 configure: remove unused checks for headers
These headers are checked for at configure time, but the code never
cares about the results of these checks, so skip them.
2022-01-16 14:34:37 +01:00
Daniel Veillard
b48e77cf4f Release of libxml2-2.9.12
Brown paper bag release, some recently added sources were missing from
the 2.9.11 tarball:
- configure.ac: bump version
- fuzz/Makefile.am: add fuzz.h and seed/regexp to EXTRA_DIST
2021-05-13 20:56:16 +02:00
Daniel Veillard
e1bcffea18 Release of libxml2-2.9.11
Prompted by CVE-2021-3541, but this includes an awful lot of serious bug
fixes by Nick and others.
- configure.ac: bumped to new release
- doc/* updated and regenerated
2021-05-13 15:35:21 +02:00
Nick Wellnhofer
0ff527482d Fix autotools warnings 2020-08-17 02:54:28 +02:00
Martin Vidner
43a8836cde Fix rebuilding docs, by hiding __attribute__((...)) behind a macro.
When enabled via `./configure --enable-rebuild-docs`,
`make -C doc libxml2-api.xml` will invoke apibuild.py
to rebuild libxml2-api.xml from the sources.
But the code added in
9fa3200cb3 made it error out with

```
Parsing ../parser.c
Parse Error: parsing type : expecting a name
('Got token ', ('sep', '('))
('Last token: ', ('sep', '('))
('Token queue: ', [('name', 'destructor'), ('sep', ')'), ('sep', ')')])
('Line 14689 end: ', '')
```
2020-06-24 19:55:52 +02:00
Nick Wellnhofer
00ed736eec Add a couple of libFuzzer targets
- XML fuzzer
  Currently tests the pull parser, push parser and reader, as well as
  serialization. Supports splitting fuzz data into multiple documents
  for things like external DTDs or entities. The seed corpus is built
  from parts of the test suite.

- Regexp fuzzer
  Seed corpus was statically generated from test suite.

- URI fuzzer
  Tests parsing and most other functions from uri.c.
2020-06-05 13:53:11 +02:00
Samuel Thibault
9fa3200cb3 Call xmlCleanupParser on ELF destruction
Fixes #153.
2020-05-04 13:53:11 +02:00
Nick Wellnhofer
20c60886e4 Fix typos
Resolves #133.
2020-03-08 17:41:53 +01:00
Daniel Veillard
41a34e1f4f Release of libxml2-2.9.10
* configure.ac doc/xml.html: updated for the release
* doc/*: regenerated docs, APIs, etc ...
2019-10-30 20:14:56 +01:00
Jared Yanovich
2a350ee9b4 Large batch of typo fixes
Closes #109.
2019-09-30 18:04:38 +02:00
Hugh McMaster
1fc410d3d3 xml2-config: Add a --dynamic switch to print only shared libraries
`xml2-config --libs` prints static library linking information by default.
This is un-necessary for most programs, so introduce a new option, --dynamic,
which, when combined with --libs, only prints shared library linking information.
2019-07-17 23:24:24 +10:00
Nick Wellnhofer
ad93f087d1 Remove -Wno-array-bounds
It's unsupported on GCC versions older than 4.3 and the false positives
seem to be fixed in newer versions.
2019-05-01 16:31:58 +02:00
Nick Wellnhofer
91d576de8b Make configure.ac work with older pkg-config
Older versions of pkg.m4 require the action-if-not-found argument of
the PKG_CHECK_MODULES macro to be non-empty. Use a colon (null command)
instead of an empty string.

Fixes #50.
2019-04-09 13:16:50 +02:00
Nick Wellnhofer
7f40ed01f7 Fix Python bindings under Windows
- Correct linker flags for MinGW-w64
- Adjust PATH to find libxml2.dll when running tests
2019-01-06 14:32:28 +01:00
Daniel Veillard
f8a8c1f59d Release of libxml2-2.9.9
* configure.ac doc/news.html doc/xml.html doc/libxml2.xsa: making changes for
    the release

Signed-off-by: Daniel Veillard <veillard@redhat.com>
2019-01-03 19:14:17 +01:00
Daniel Veillard
18890f471c Release of libxml2-2.9.8
* configure.ac doc/* libxml2.syms testapi.c: updated for the new release
2018-03-05 17:09:43 +01:00
Nick Wellnhofer
45efd0b05b Build with "-Wall -Wextra"
Remove warning options that are enabled with "-Wall -Wextra".

Disable -Warray-bounds warning that produces a (seemingly) false
positive in xpath.c.
2017-11-27 14:35:29 +01:00
Nick Wellnhofer
ff628d46a1 Stop including ansidecl.h
This seems to be an undocumented, internal GCC header added a long time
ago. I don't know why it was included, but I think it can be safely
removed.
2017-11-27 14:35:29 +01:00
Nick Wellnhofer
bf3b456350 Remove unused AC_CHECKs 2017-11-27 14:35:29 +01:00
Nick Wellnhofer
cb5541c9f3 Fix libz and liblzma detection
If libz or liblzma are detected with pkg-config, AC_CHECK_HEADERS must
not be run because the correct CPPFLAGS aren't set. It is actually not
required have separate checks for LIBXML_ZLIB_ENABLED and HAVE_ZLIB_H.
Only check for LIBXML_ZLIB_ENABLED and remove HAVE_ZLIB_H macro.

Fixes bug 764657, bug 787041.
2017-11-27 14:33:37 +01:00
Nick Wellnhofer
8cb8e31773 Don't touch CFLAGS in configure.ac
CFLAGS shouldn't be touched by configure.ac. The variable is supplied by
the user and must come after other flags, so flags like warning options
can be overridden.

Rename CFLAGS to EXTRA_CFLAGS and add the value to AM_CFLAGS. This also
makes it possible to override flags for each Automake program or library.
2017-11-14 16:03:36 +01:00
Daniel Veillard
bc5a5d6583 Release of libxnl2-2.9.7
* configure.ac doc/news.html : update for release
* doc/news.html doc/xmlcatalog.1 doc/xmlcatalog_man.html: regenerated
2017-11-02 21:26:55 +01:00
Nick Wellnhofer
8575c1170b Default to native threads on MinGW-w64 2017-10-09 16:52:14 +02:00
Nick Wellnhofer
e3890546d7 Fix the Windows header mess
Don't include windows.h and wsockcompat.h from config.h but only when
needed.

Don't define _WINSOCKAPI_ manually. This was apparently done to stop
windows.h from including winsock.h which is a problem if winsock2.h
wasn't included first. But on MinGW, this causes compiler warnings.
Define WIN32_LEAN_AND_MEAN instead which has the same effect.

Always use the compiler-defined _WIN32 macro instead of WIN32.
2017-10-09 14:35:40 +02:00
Daniel Veillard
4b4d3d8516 Release of libxml2-2.9.6
* configure.ac doc/xml.html doc/news.html: updated for release
2017-10-06 09:00:53 +02:00
Daniel Veillard
2960178fe8 Release of libxml2-2.9.5
* configure.ac, doc/xslt.html: updated for the release
* doc/*, python/setup.py, testapi.c: regenerated
2017-09-04 15:38:47 +02:00
David Kilzer
4472c3a5a5 Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029

Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports.
2016-05-23 15:01:07 +08:00
Mattias Hansson
40fd6d2a1b Correct the usage of LDFLAGS
For https://bugzilla.gnome.org/show_bug.cgi?id=761252

It is no longer necessary to save system LDFLAGS when checking
lib specific LDFLAGS.
2016-05-23 14:01:29 +08:00
Mattias Hansson
ebbd2b725f Revert the use of SAVE_LDFLAGS in configure.ac
For https://bugzilla.gnome.org/show_bug.cgi?id=761252

This reverts commit 7dc2496509.
2016-05-23 13:58:24 +08:00
Mike Frysinger
4892005592 libxml2 hardcodes -L/lib in zlib/lzma tests which breaks cross-compiles
For https://bugzilla.gnome.org/show_bug.cgi?id=749416

do not use -L$Z_DIR/lib when Z_DIR isn't actually set
2016-05-23 09:01:00 +08:00
Daniel Veillard
8effcb578e Fix apibuild for a recently added construct
commit c71f9305a9 added __XML_EXTERNC
cpp construct which not understood by apibuild, leading to make dist
failures, ask to ignore that construct.
2016-05-09 10:31:09 +08:00
Stewart Brodie
45f0abd427 Use pkg-config to locate zlib when possible
For https://bugzilla.gnome.org/show_bug.cgi?id=765979

This fallback to direct detection if not available, but current situation
this is broken for cross compilation
2016-05-09 10:13:12 +08:00
Stewart Brodie
3d75c2e828 Use pkg-config to locate ICU when possible
For https://bugzilla.gnome.org/show_bug.cgi?id=765979

This fallback to icu-config if not available, but current situation
this is broken for cross compilation
2016-05-09 10:11:05 +08:00
Baruch Siach
2e354d7432 Add xz to xml2-config --libs output
XML_LIBS should include LZMA_LIBS. This ensures that 'xml2-config --libs'
shows -llzma when xz is enabled. Otherwise static link fails because of
missing xz symbols.
2016-04-28 15:13:56 +08:00
David Kilzer
6e3af87055 Bug 760190: configure.ac should be able to build --with-icu without icu-config tool <https://bugzilla.gnome.org/show_bug.cgi?id=760190>
* configure.ac: Add fallback tests if the icu-config tool is not
installed (like on Mac OS X).  This also allows an include
prefix to be set using "--with-icu=/prefix/to/icu", similar to
--with-iconv.
2016-04-08 10:19:18 +08:00
orzen
b5ca260771 Add configure maintainer mode
For https://bugzilla.gnome.org/show_bug.cgi?id=761784

I wasn't able to build libxml2 because aclocal-1.13 was missing from
my machine. With AM_MAINTAINER_MODE, I'm able to configure libxml2 with
'--disable-maintainer-mode' which will disable checks for aclocal.
2016-02-09 17:23:48 +01:00
Daniel Veillard
6657afe83a Release of libxml2-2.9.3
* configure.ac: updated
* doc/*: regenerated
2015-11-20 17:55:11 +08:00
Daniel Veillard
18b8988511 Reenable xz support by default
For https://bugzilla.gnome.org/show_bug.cgi?id=757466

problem was introduced by commit f3f86ff465
for https://bugzilla.gnome.org/show_bug.cgi?id=711026
2015-11-03 15:46:29 +08:00
Roumen Petrov
974db365de AC_CONFIG_FILES and executable bit 2014-10-16 12:07:43 +08:00
Samuel Martin
fa23ac1a79 Provide cmake module
* add libxml2-config.cmake.in template
* configure.ac: add libxml2-config.cmake.in to the configured file list
* Makefile.am: install libxml2-config.cmake under ${libdir}/cmake/libxml2

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
2014-10-13 18:02:53 +08:00
Daniel Veillard
f985ada790 Preparing for upcoming release of 2.9.2
Moving configure.in to configure.ac since all tools complain about it
2014-10-09 23:59:36 +08:00