From c81526ad841c6b404bbad364fab81440d123985c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 21 Apr 2024 16:55:44 -0400 Subject: [PATCH] Install mxml man page as mxml4 by default (Issue #324) --- CHANGES.md | 2 ++ Makefile.in | 7 ++++--- configure | 4 ++++ configure.ac | 3 +++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ed25461..f73ace4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,8 @@ Changes in Mini-XML 4.0.3 - The configure script now defaults the `DSOFLAGS` value to `LDFLAGS` if not set (Issue #325) +- Now install the man page as "mxml4" to allow parallel installation of Mini-XML + 4.x and 3.x (Issue #324) Changes in Mini-XML 4.0.2 diff --git a/Makefile.in b/Makefile.in index bfb462b..d6379a9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,6 +57,7 @@ INSTALL_MAN = $(INSTALL) -c -m 444 LIBMXML = @LIBMXML@ LIBMXML_BASE = @LIBMXML_BASE@ LIBMXML_STATIC = @LIBMXML_STATIC@ +MXML_MAN = @MXML_MAN@ MXML_PC = @MXML_PC@ @@ -219,7 +220,7 @@ install: $(TARGETS) install-$(LIBMXML) $(INSTALL_STATIC) $(INSTALL_DATA) mxml4.pc $(BUILDROOT)$(libdir)/pkgconfig/$(MXML_PC) echo Installing man pages in $(BUILDROOT)$(mandir)... $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3 - $(INSTALL_MAN) doc/mxml.3 $(BUILDROOT)$(mandir)/man3/mxml.3 + $(INSTALL_MAN) doc/mxml.3 $(BUILDROOT)$(mandir)/man3/$(MXML_MAN) install-libmxml.a: libmxml.a echo Installing libmxml.a to $(BUILDROOT)$(libdir)... @@ -274,9 +275,9 @@ uninstall: uninstall-$(LIBMXML) @UNINSTALL_STATIC@ echo Uninstalling headers from $(BUILDROOT)$(includedir)... $(RM) $(BUILDROOT)$(includedir)/mxml.h echo Uninstalling pkgconfig files from $(BUILDROOT)$(libdir)/pkgconfig... - $(RM) $(BUILDROOT)$(libdir)/pkgconfig/mxml.pc + $(RM) $(BUILDROOT)$(libdir)/pkgconfig/$(MXML_PC) echo Uninstalling man pages from $(BUILDROOT)$(mandir)... - $(RM) $(BUILDROOT)$(mandir)/man3/mxml.3 + $(RM) $(BUILDROOT)$(mandir)/man3/$(MXML_MAN) uninstall-libmxml.a: echo Uninstalling libmxml.a from $(BUILDROOT)$(libdir)... diff --git a/configure b/configure index ad8d60a..02f967e 100755 --- a/configure +++ b/configure @@ -660,6 +660,7 @@ LIBMXML_STATIC LIBMXML INSTALL_STATIC MXML_PC +MXML_MAN LIBMXML_BASE ARFLAGS LN @@ -3989,6 +3990,7 @@ fi if test x$enable_libmxml4_prefix != xno then : + MXML_MAN="mxml4.3" MXML_PC="mxml4.pc" INCLUDE_PREFIX="/libmxml4" LIBMXML_BASE="libmxml4" @@ -3996,6 +3998,7 @@ then : else $as_nop + MXML_MAN="mxml.3" MXML_PC="mxml.pc" INCLUDE_PREFIX="" LIBMXML_BASE="libmxml" @@ -4007,6 +4010,7 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} diff --git a/configure.ac b/configure.ac index 877dc0f..a6bc393 100644 --- a/configure.ac +++ b/configure.ac @@ -83,17 +83,20 @@ dnl Library prefix... AC_ARG_ENABLE([libmxml4-prefix], AS_HELP_STRING([--disable-libmxml4-prefix], [do not add libmxml4 prefix to header/library files])) AS_IF([test x$enable_libmxml4_prefix != xno], [ + MXML_MAN="mxml4.3" MXML_PC="mxml4.pc" INCLUDE_PREFIX="/libmxml4" LIBMXML_BASE="libmxml4" LINK_MXML="-lmxml4" ], [ + MXML_MAN="mxml.3" MXML_PC="mxml.pc" INCLUDE_PREFIX="" LIBMXML_BASE="libmxml" LINK_MXML="-lmxml" ]) AC_SUBST([LIBMXML_BASE]) +AC_SUBST([MXML_MAN]) AC_SUBST([MXML_PC])