From: Sebastian Pipping Date: Fri, 11 Aug 2017 20:22:59 +0000 (+0200) Subject: configure.ac: Add --without-xmlwf X-Git-Tag: R_2_2_4~17^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d950527a07783c104aada685384edf3f8f23f8a;p=libexpat configure.ac: Add --without-xmlwf --- diff --git a/expat/Changes b/expat/Changes index f32ea970..a3a6f626 100644 --- a/expat/Changes +++ b/expat/Changes @@ -10,6 +10,7 @@ Release 2.?.? ????????????????? #109 Fix "make check" for non-x86 architectures that default to unsigned type char (-128..127 rather than 0..255) #109 coverage.sh: Cover -funsigned-char + Autotools: Introduce --without-xmlwf argument #43 CMake: Auto-detect high quality entropy extractors, add new option USE_libbsd=ON to use arc4random_buf of libbsd #74 CMake: Add -fno-strict-aliasing only where supported diff --git a/expat/Makefile.in b/expat/Makefile.in index 418de268..f0acfe72 100644 --- a/expat/Makefile.in +++ b/expat/Makefile.in @@ -47,11 +47,16 @@ LIBRARY = libexpat.la DESTDIR = $(INSTALL_ROOT) -default: buildlib xmlwf/xmlwf@EXEEXT@ +XMLWF_ENABLED = test @with_xmlwf@ = yes + + +default: buildlib + if $(XMLWF_ENABLED) ; then $(MAKE) xmlwf/xmlwf@EXEEXT@ ; fi buildlib: $(LIBRARY) expat.pc -all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline $(MANFILE) +all: $(LIBRARY) expat.pc examples/elements examples/outline $(MANFILE) + if $(XMLWF_ENABLED) ; then $(MAKE) xmlwf/xmlwf@EXEEXT@ ; fi clean: cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs @@ -80,7 +85,8 @@ check: tests/runtests@EXEEXT@ tests/runtestspp@EXEEXT@ $(MANFILE): $(MAKE) -C doc xmlwf.1 -install: installlib installman installxmlwf +install: installlib + if $(XMLWF_ENABLED) ; then $(MAKE) installman installxmlwf ; fi .PHONY: installman installman: $(MANFILE) diff --git a/expat/README.md b/expat/README.md index 0a1777e7..61677e28 100644 --- a/expat/README.md +++ b/expat/README.md @@ -72,13 +72,16 @@ the directories into which things will be installed. If you are interested in building Expat to provide document information in UTF-16 encoding rather than the default UTF-8, follow -these instructions (after having run `make distclean`): +these instructions (after having run `make distclean`). +Please note that we configure with `--without-xmlwf` as xmlwf does not +support this mode of compilation (yet): 1. For UTF-16 output as unsigned short (and version/error strings as char), run:
- `./configure CPPFLAGS=-DXML_UNICODE`
+ `./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`
For UTF-16 output as `wchar_t` (incl. version/error strings), run:
- `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T` + `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T + --without-xmlwf`
Note: The latter requires libc compiled with `-fshort-wchar`, as well. 1. Edit `Makefile`, changing:
@@ -87,11 +90,11 @@ these instructions (after having run `make distclean`): `LIBRARY = libexpatw.la`
(Note the additional "w" in the library name.) -1. Run `make buildlib` (which builds the library only). - Or, to save step 2, run `make buildlib LIBRARY=libexpatw.la`. +1. Run `make` (which excludes xmlwf). + Or, to save step 2, run `make LIBRARY=libexpatw.la`. -1. Run `make installlib` (which installs the library only). - Or, if step 2 was omitted, run `make installlib LIBRARY=libexpatw.la`. +1. Run `make install` (again, excludes xmlwf). + Or, if step 2 was omitted, run `make install LIBRARY=libexpatw.la`. Using `DESTDIR` or `INSTALL_ROOT` is enabled, with `INSTALL_ROOT` being the default value for `DESTDIR`, and the rest of the make file using only diff --git a/expat/configure.ac b/expat/configure.ac index 6198707f..b9a00004 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -100,6 +100,11 @@ AC_TYPE_SIZE_T AC_CHECK_FUNCS(memmove bcopy) +AC_ARG_WITH([xmlwf], [ +AS_HELP_STRING([--without-xmlwf], [do not build xmlwf])], [], [with_xmlwf=yes]) +AC_SUBST(with_xmlwf) + + AC_ARG_WITH([libbsd], [ AS_HELP_STRING([--with-libbsd], [utilize libbsd (for arc4random_buf)]) ], [], [with_libbsd=no])