From ce7f251a0ae83a08946e9818cddfd5f7f39a4ce3 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 4 Mar 2024 08:09:55 -0500 Subject: [PATCH] Update configure script defaults to install as libmxml4 with mxml4 pkg-config name (to allow for installing both old and new Mini-XML...) --- .gitignore | 14 +- Makefile.in | 80 +++++++--- configure | 144 ++++++++---------- configure.ac | 118 ++++++-------- mxml.pc.in => mxml4.pc.in | 0 testmxml.c | 6 +- ...2_native.nuspec => libmxml4_native.nuspec} | 0 ...ml2_native.props => libmxml4_native.props} | 0 ...t.nuspec => libmxml4_native.redist.nuspec} | 0 vcnet/mxml.sln | 2 +- vcnet/{mxml2.def => mxml4.def} | 0 vcnet/{mxml2.vcxproj => mxml4.vcxproj} | 30 ++-- ....vcxproj.filters => mxml4.vcxproj.filters} | 0 ...{mxml2.vcxproj.user => mxml4.vcxproj.user} | 0 14 files changed, 195 insertions(+), 199 deletions(-) rename mxml.pc.in => mxml4.pc.in (100%) rename vcnet/{libmxml2_native.nuspec => libmxml4_native.nuspec} (100%) rename vcnet/{libmxml2_native.props => libmxml4_native.props} (100%) rename vcnet/{libmxml2_native.redist.nuspec => libmxml4_native.redist.nuspec} (100%) rename vcnet/{mxml2.def => mxml4.def} (100%) rename vcnet/{mxml2.vcxproj => mxml4.vcxproj} (94%) rename vcnet/{mxml2.vcxproj.filters => mxml4.vcxproj.filters} (100%) rename vcnet/{mxml2.vcxproj.user => mxml4.vcxproj.user} (100%) diff --git a/.gitignore b/.gitignore index 6df6658..b3cff7e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,14 +4,18 @@ /config.h /config.log /config.status -/libmxml.1.dylib +/libmxml.2.dylib /libmxml.a /libmxml.dylib /libmxml.so -/libmxml.so.1 -/libmxml.so.1.6 -/mxml.pc -/mxml1.dll +/libmxml.so.2 +/libmxml4.2.dylib +/libmxml4.a +/libmxml4.dylib +/libmxml4.so +/libmxml4.so.2 +/mxml4.pc +/mxml4.dll /scratch /testmxml /vcnet/.vs diff --git a/Makefile.in b/Makefile.in index 1f10cac..70a4dee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,7 +55,9 @@ INSTALL_MAN = $(INSTALL) -c -m 444 # LIBMXML = @LIBMXML@ +LIBMXML_BASE = @LIBMXML_BASE@ LIBMXML_STATIC = @LIBMXML_STATIC@ +MXML_PC = @MXML_PC@ # @@ -171,13 +173,13 @@ all: $(TARGETS) clean: echo Cleaning build files... $(RM) $(OBJS) $(ALLTARGETS) - $(RM) mxml2.dll - $(RM) mxml2.lib - $(RM) libmxml.a - $(RM) libmxml.so - $(RM) libmxml.so.2 - $(RM) libmxml.2.dylib - $(RM) libmxml.dylib + $(RM) mxml4.dll + $(RM) mxml4.lib + $(RM) libmxml4.a + $(RM) libmxml4.so + $(RM) libmxml4.so.1 + $(RM) libmxml4.1.dylib + $(RM) libmxml4.dylib # @@ -211,7 +213,7 @@ install: $(TARGETS) install-$(LIBMXML) @INSTALL_STATIC@ $(INSTALL_DATA) mxml.h $(BUILDROOT)$(includedir) echo Installing pkgconfig files in $(BUILDROOT)$(libdir)/pkgconfig... $(INSTALL_DIR) $(BUILDROOT)$(libdir)/pkgconfig - $(INSTALL_DATA) mxml.pc $(BUILDROOT)$(libdir)/pkgconfig + $(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 @@ -237,6 +239,27 @@ install-libmxml.2.dylib: libmxml.2.dylib $(RM) $(BUILDROOT)$(libdir)/libmxml.dylib $(LN) libmxml.2.dylib $(BUILDROOT)$(libdir)/libmxml.dylib +install-libmxml4.a: libmxml4.a + echo Installing libmxml4.a to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml4.a $(BUILDROOT)$(libdir) + $(RANLIB) $(BUILDROOT)$(libdir)/libmxml4.a + +install-libmxml4.so.2: libmxml4.so.2 + echo Installing libmxml4.so to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml4.so.2 $(BUILDROOT)$(libdir) + $(RM) $(BUILDROOT)$(libdir)/libmxml4.so + $(LN) libmxml4.so.2 $(BUILDROOT)$(libdir)/libmxml4.so + $(LDCONFIG) + +install-libmxml4.2.dylib: libmxml4.2.dylib + echo Installing libmxml4.dylib to $(BUILDROOT)$(libdir)... + $(INSTALL_DIR) $(BUILDROOT)$(libdir) + $(INSTALL_LIB) libmxml4.2.dylib $(BUILDROOT)$(libdir) + $(RM) $(BUILDROOT)$(libdir)/libmxml4.dylib + $(LN) libmxml4.2.dylib $(BUILDROOT)$(libdir)/libmxml4.dylib + # # Uninstall everything... @@ -267,6 +290,21 @@ uninstall-libmxml.2.dylib: $(RM) $(BUILDROOT)$(libdir)/libmxml.dylib $(RM) $(BUILDROOT)$(libdir)/libmxml.2.dylib +uninstall-libmxml4.a: + echo Uninstalling libmxml4.a from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml4.a + +uninstall-libmxml4.so.2: + echo Uninstalling libmxml4.so from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml4.so + $(RM) $(BUILDROOT)$(libdir)/libmxml4.so.2 + $(LDCONFIG) + +uninstall-libmxml4.2.dylib: + echo Uninstalling libmxml4.dylib from $(BUILDROOT)$(libdir)... + $(RM) $(BUILDROOT)$(libdir)/libmxml4.dylib + $(RM) $(BUILDROOT)$(libdir)/libmxml4.2.dylib + # # Test everything... @@ -315,7 +353,7 @@ sloc: # libmxml.a # -libmxml.a: $(LIBOBJS) +libmxml.a libmxml4.a: $(LIBOBJS) echo Creating $@... $(RM) $@ $(AR) $(ARFLAGS) $@ $(LIBOBJS) @@ -328,7 +366,7 @@ $(LIBOBJS): mxml.h mxml-private.h # libmxml2.dll # -libmxml2.dll: $(LIBOBJS) +libmxml.dll libmxml4.dll: $(LIBOBJS) echo Creating $@... $(DSO) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBS) @@ -337,35 +375,35 @@ libmxml2.dll: $(LIBOBJS) # libmxml.so.2 # -libmxml.so.2: $(LIBOBJS) +libmxml.so.2 libmxml4.so.2: $(LIBOBJS) echo Creating $@... - $(DSO) $(DSOFLAGS) -o libmxml.so.2 $(LIBOBJS) $(LIBS) - $(RM) libmxml.so - $(LN) libmxml.so.2 libmxml.so + $(DSO) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBS) + $(RM) `basename $@ .2` + $(LN) $@ `basename $@ .2` # # libmxml.2.dylib # -libmxml.2.dylib: $(LIBOBJS) +libmxml.2.dylib libmxml4.2.dylib: $(LIBOBJS) echo Creating $@... - $(DSO) $(DSOFLAGS) -o libmxml.2.dylib \ - -install_name $(libdir)/libmxml.dylib \ + $(DSO) $(DSOFLAGS) -o $@ \ + -install_name $(libdir)/`basename $@ .2.dylib`.dylib \ -current_version 2.0.0 \ -compatibility_version 2.0.0 \ $(LIBOBJS) $(LIBS) - $(RM) libmxml.dylib - $(LN) libmxml.2.dylib libmxml.dylib + $(RM) `basename $@ .2.dylib`.dylib + $(LN) $@ `basename $@ .2.dylib`.dylib # # testmxml # -testmxml: libmxml.a testmxml.o +testmxml: $(LIBMXML_STATIC) testmxml.o echo Linking $@... - $(CC) $(LDFLAGS) -o $@ testmxml.o libmxml.a $(LIBS) + $(CC) $(LDFLAGS) -o $@ testmxml.o $(LIBMXML_STATIC) $(LIBS) testmxml-vg: $(LIBOBJS) testmxml.o echo Linking $@... diff --git a/configure b/configure index 77f7f1d..f5b0c68 100755 --- a/configure +++ b/configure @@ -659,6 +659,8 @@ UNINSTALL_STATIC LIBMXML_STATIC LIBMXML INSTALL_STATIC +MXML_PC +LIBMXML_BASE ARFLAGS LN RMDIR @@ -730,6 +732,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_libmxml4_prefix enable_threads enable_static enable_shared @@ -1370,6 +1373,8 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-libmxml4-prefix + do not add libmxml4 prefix to header/library files --disable-threads disable multi-threading support, default=no --disable-static do not install static library --disable-shared do not install shared library @@ -1379,7 +1384,7 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-sanitizer build with address, leak, memory, thread, or + --with-sanitizer=... build with address, leak, memory, thread, or undefined sanitizer, default=no --with-dsoflags=... Specify additional DSOFLAGS --with-ldflags=... Specify additional LDFLAGS @@ -3974,6 +3979,33 @@ fi +# Check whether --enable-libmxml4-prefix was given. +if test ${enable_libmxml4_prefix+y} +then : + enableval=$enable_libmxml4_prefix; +fi + + +if test x$enable_libmxml4_prefix != xno +then : + + MXML_PC="mxml4.pc" + INCLUDE_PREFIX="/libmxml4" + LIBMXML_BASE="libmxml4" + LINK_MXML="-lmxml4" + +else $as_nop + + MXML_PC="mxml.pc" + INCLUDE_PREFIX="" + LIBMXML_BASE="libmxml" + LINK_MXML="-lmxml" + +fi + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 printf %s "checking for inline... " >&6; } @@ -4272,32 +4304,32 @@ then : fi -LIBMXML_STATIC="libmxml.a" +LIBMXML_STATIC="$LIBMXML_BASE.a" if test x$enable_shared != xno then : case "$host_os_name" in #( linux* | gnu*) : - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared" ;; #( *bsd*) : - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared -lc" ;; #( darwin*) : - LIBMXML="libmxml.2.dylib" + LIBMXML="$LIBMXML_BASE.2.dylib" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-no_warn_inits -dynamiclib -lc" ;; #( sunos*) : - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G" ;; #( @@ -4305,15 +4337,15 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - LIBMXML="libmxml2.dll" + LIBMXML="$LIBMXML_BASE.dll" DSO="\$(CC)" - DSOFLAGS="$DSOFLAGS -shared -Wl,--out-implib,libmxml2.a,--no-undefined,--enable-runtime-pseudo-reloc" + DSOFLAGS="$DSOFLAGS -shared -Wl,--out-implib,$LIBMXML_BASE.a,--no-undefined,--enable-runtime-pseudo-reloc" ;; #( *) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Warning: Shared libraries may not work, trying -shared option." >&5 printf "%s\n" "$as_me: Warning: Shared libraries may not work, trying -shared option." >&6;} - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared" ;; #( @@ -4326,8 +4358,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Installing static libraries..." >&5 printf "%s\n" "$as_me: Installing static libraries..." >&6;} - INSTALL_STATIC="install-libmxml.a" - UNINSTALL_STATIC="uninstall-libmxml.a" + INSTALL_STATIC="install-$LIBMXML_BASE.a" + UNINSTALL_STATIC="uninstall-$LIBMXML_BASE.a" else $as_nop @@ -4339,7 +4371,7 @@ fi else $as_nop INSTALL_STATIC="" - LIBMXML="libmxml.a" + LIBMXML="$LIBMXML_BASE.a" UNINSTALL_STATIC="" fi @@ -4635,36 +4667,24 @@ fi +if test "$prefix" = NONE +then : + # Default prefix isn't bound until AC_OUTPUT... + realprefix="/usr/local" +else $as_nop + realprefix="$prefix" +fi +if test "$includedir" = NONE -o "$includedir" = "\${prefix}/include" +then : + includedir="\${prefix}/include$INCLUDE_PREFIX" - - - - - - - - - - - - - - - - - - - - - - - +fi if test "$build" = "$host" @@ -4680,62 +4700,20 @@ fi -if test "$prefix" = NONE +if test "$includedir" != "/usr/include" -a "$includedir" != "/usr/local/include" then : - # Default prefix isn't bound until AC_OUTPUT... - realprefix="/usr/local" + PKGCONFIG_CFLAGS="-I\${includedir} $PKGCONFIG_CFLAGS" else $as_nop - realprefix="$prefix" + PKGCONFIG_CFLAGS="" fi - -if test "$datarootdir" = "\${prefix}/share" -then : - - if test "$prefix" = "/" -then : - - datarootdir="/usr/share" - -else $as_nop - - datarootdir="$realprefix/share" - -fi - -fi - -if test "$datadir" = "\${prefix}/share" -then : - - if test "$prefix" = "/" -then : - - datadir="/usr/share" - -else $as_nop - - datadir="$realprefix/share" - -fi - -elif test "$datadir" = "\${datarootdir}" -then : - - datadir="$datarootdir" - -fi - - -PKGCONFIG_CFLAGS="" -PKGCONFIG_LIBS="-lmxml" +PKGCONFIG_LIBS="$LINK_MXML" if test "$realprefix" != "/usr" -a "$realprefix" != "/usr/local" then : - PKGCONFIG_CFLAGS="-I\${includedir}" PKGCONFIG_LIBS="-L\${libdir} $PKGCONFIG_LIBS" fi @@ -4744,7 +4722,7 @@ fi -ac_config_files="$ac_config_files Makefile mxml.pc" +ac_config_files="$ac_config_files Makefile mxml4.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -5433,7 +5411,7 @@ do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "mxml.pc") CONFIG_FILES="$CONFIG_FILES mxml.pc" ;; + "mxml4.pc") CONFIG_FILES="$CONFIG_FILES mxml4.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.ac b/configure.ac index f7f7d68..919504d 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,24 @@ AS_IF([test "$ac_cv_prog_ranlib" = ":"], [ AC_SUBST([ARFLAGS]) +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_PC="mxml4.pc" + INCLUDE_PREFIX="/libmxml4" + LIBMXML_BASE="libmxml4" + LINK_MXML="-lmxml4" +], [ + MXML_PC="mxml.pc" + INCLUDE_PREFIX="" + LIBMXML_BASE="libmxml" + LINK_MXML="-lmxml" +]) +AC_SUBST([LIBMXML_BASE]) +AC_SUBST([MXML_PC]) + + dnl Inline functions... AC_C_INLINE @@ -125,47 +143,47 @@ dnl Library targets... AC_ARG_ENABLE([static], AS_HELP_STRING([--disable-static], [do not install static library])) AC_ARG_ENABLE([shared], AS_HELP_STRING([--disable-shared], [do not install shared library])) -LIBMXML_STATIC="libmxml.a" +LIBMXML_STATIC="$LIBMXML_BASE.a" AS_IF([test x$enable_shared != xno], [ AS_CASE(["$host_os_name"], [linux* | gnu*], [ - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared" ], [*bsd*], [ - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared -lc" ], [darwin*], [ - LIBMXML="libmxml.2.dylib" + LIBMXML="$LIBMXML_BASE.2.dylib" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-no_warn_inits -dynamiclib -lc" ], [sunos*], [ - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G" ], [mingw], [ AC_MSG_RESULT([yes]) - LIBMXML="libmxml2.dll" + LIBMXML="$LIBMXML_BASE.dll" DSO="\$(CC)" - DSOFLAGS="$DSOFLAGS -shared -Wl,--out-implib,libmxml2.a,--no-undefined,--enable-runtime-pseudo-reloc" + DSOFLAGS="$DSOFLAGS -shared -Wl,--out-implib,$LIBMXML_BASE.a,--no-undefined,--enable-runtime-pseudo-reloc" ], [*], [ AC_MSG_NOTICE([Warning: Shared libraries may not work, trying -shared option.]) - LIBMXML="libmxml.so.2" + LIBMXML="$LIBMXML_BASE.so.2" DSO="\$(CC)" DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared" ]) AS_IF([test x$enable_static != xno], [ AC_MSG_NOTICE([Installing static libraries...]) - INSTALL_STATIC="install-libmxml.a" - UNINSTALL_STATIC="uninstall-libmxml.a" + INSTALL_STATIC="install-$LIBMXML_BASE.a" + UNINSTALL_STATIC="uninstall-$LIBMXML_BASE.a" ], [ INSTALL_STATIC="" UNINSTALL_STATIC="" ]) ], [ INSTALL_STATIC="" - LIBMXML="libmxml.a" + LIBMXML="$LIBMXML_BASE.a" UNINSTALL_STATIC="" ]) @@ -178,7 +196,7 @@ AC_SUBST([UNINSTALL_STATIC]) dnl Extra compiler options... AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging, default=no])) AC_ARG_ENABLE([maintainer], AS_HELP_STRING([--enable-maintainer], [turn on maintainer mode, default=no])) -AC_ARG_WITH([sanitizer], AS_HELP_STRING([--with-sanitizer], [build with address, leak, memory, thread, or undefined sanitizer, default=no]), [], [with_sanitizer=no]) +AC_ARG_WITH([sanitizer], AS_HELP_STRING([--with-sanitizer=...], [build with address, leak, memory, thread, or undefined sanitizer, default=no]), [], [with_sanitizer=no]) AS_IF([test "x$with_sanitizer" = xyes], [ with_sanitizer="address" ], [test "$with_sanitizer" != address -a "$with_sanitizer" != leak -a "$with_sanitizer" != memory -a "$with_sanitizer" != no -a "$with_sanitizer" != thread -a "$with_sanitizer" != undefined], [ @@ -313,36 +331,16 @@ AC_ARG_WITH([docdir], AS_HELP_STRING([--with-docdir], [set directory for documen ]) AC_SUBST(docdir) +AS_IF([test "$prefix" = NONE], [ + # Default prefix isn't bound until AC_OUTPUT... + realprefix="/usr/local" +], [ + realprefix="$prefix" +]) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +AS_IF([test "$includedir" = NONE -o "$includedir" = "\${prefix}/include"], [ + includedir="\${prefix}/include$INCLUDE_PREFIX" +]) dnl Determine whether we are cross-compiling... @@ -354,38 +352,14 @@ AS_IF([test "$build" = "$host"], [ AC_SUBST([TARGETS]) -dnl Fix installation directories... -AS_IF([test "$prefix" = NONE], [ - # Default prefix isn't bound until AC_OUTPUT... - realprefix="/usr/local" -], [ - realprefix="$prefix" -]) - -AS_IF([test "$datarootdir" = "\${prefix}/share"], [ - AS_IF([test "$prefix" = "/"], [ - datarootdir="/usr/share" - ], [ - datarootdir="$realprefix/share" - ]) -]) - -AS_IF([test "$datadir" = "\${prefix}/share"], [ - AS_IF([test "$prefix" = "/"], [ - datadir="/usr/share" - ], [ - datadir="$realprefix/share" - ]) -], [test "$datadir" = "\${datarootdir}"], [ - datadir="$datarootdir" -]) - - dnl pkg-config flags... -PKGCONFIG_CFLAGS="" -PKGCONFIG_LIBS="-lmxml" +AS_IF([test "$includedir" != "/usr/include" -a "$includedir" != "/usr/local/include"], [ + PKGCONFIG_CFLAGS="-I\${includedir} $PKGCONFIG_CFLAGS" +], [ + PKGCONFIG_CFLAGS="" +]) +PKGCONFIG_LIBS="$LINK_MXML" AS_IF([test "$realprefix" != "/usr" -a "$realprefix" != "/usr/local"], [ - PKGCONFIG_CFLAGS="-I\${includedir}" PKGCONFIG_LIBS="-L\${libdir} $PKGCONFIG_LIBS" ]) @@ -394,5 +368,5 @@ AC_SUBST([PKGCONFIG_LIBS]) dnl Output generated files... -AC_CONFIG_FILES([Makefile mxml.pc]) +AC_CONFIG_FILES([Makefile mxml4.pc]) AC_OUTPUT diff --git a/mxml.pc.in b/mxml4.pc.in similarity index 100% rename from mxml.pc.in rename to mxml4.pc.in diff --git a/testmxml.c b/testmxml.c index b509e77..aba7b25 100644 --- a/testmxml.c +++ b/testmxml.c @@ -35,7 +35,7 @@ int event_counts[7]; // Local functions... // -void sax_cb(mxml_node_t *node, mxml_sax_event_t event, void *data); +bool sax_cb(mxml_node_t *node, mxml_sax_event_t event, void *data); mxml_type_t type_cb(mxml_node_t *node); const char *whitespace_cb(mxml_node_t *node, int where); @@ -653,7 +653,7 @@ main(int argc, // I - Number of command-line args // 'sax_cb()' - Process nodes via SAX. // -void +bool // O - `true` to continue, `false` to stop sax_cb(mxml_node_t *node, // I - Current node mxml_sax_event_t event, // I - SAX event void *data) // I - SAX user data @@ -677,6 +677,8 @@ sax_cb(mxml_node_t *node, // I - Current node fprintf(stderr, "ERROR: SAX callback for event %s has NULL node.\n", events[event]); event_counts[event] ++; + + return (true); } diff --git a/vcnet/libmxml2_native.nuspec b/vcnet/libmxml4_native.nuspec similarity index 100% rename from vcnet/libmxml2_native.nuspec rename to vcnet/libmxml4_native.nuspec diff --git a/vcnet/libmxml2_native.props b/vcnet/libmxml4_native.props similarity index 100% rename from vcnet/libmxml2_native.props rename to vcnet/libmxml4_native.props diff --git a/vcnet/libmxml2_native.redist.nuspec b/vcnet/libmxml4_native.redist.nuspec similarity index 100% rename from vcnet/libmxml2_native.redist.nuspec rename to vcnet/libmxml4_native.redist.nuspec diff --git a/vcnet/mxml.sln b/vcnet/mxml.sln index 0149c6c..77982e6 100644 --- a/vcnet/mxml.sln +++ b/vcnet/mxml.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30204.135 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml2", "mxml2.vcxproj", "{E5AA9476-9751-4654-8109-B1A2112D5E73}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml4", "mxml4.vcxproj", "{E5AA9476-9751-4654-8109-B1A2112D5E73}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testmxml", "testmxml.vcxproj", "{75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}" ProjectSection(ProjectDependencies) = postProject diff --git a/vcnet/mxml2.def b/vcnet/mxml4.def similarity index 100% rename from vcnet/mxml2.def rename to vcnet/mxml4.def diff --git a/vcnet/mxml2.vcxproj b/vcnet/mxml4.vcxproj similarity index 94% rename from vcnet/mxml2.vcxproj rename to vcnet/mxml4.vcxproj index 12307ce..336f0d7 100644 --- a/vcnet/mxml2.vcxproj +++ b/vcnet/mxml4.vcxproj @@ -100,15 +100,15 @@ EditAndContinue - $(Platform)\$(Configuration)\$(ProductName)\mxml2.dll + $(Platform)\$(Configuration)\$(ProductName)\mxml4.dll oldnames.lib;%(IgnoreSpecificDefaultLibraries) - .\mxml2.def + .\mxml4.def true - $(OutDir)mxml2.pdb + $(OutDir)mxml4.pdb Windows false - $(Configuration)\$(Platform)\$(ProductName)\mxml2.lib + $(Configuration)\$(Platform)\$(ProductName)\mxml4.lib MachineX86 @@ -122,16 +122,16 @@ ProgramDatabase - $(Platform)\$(Configuration)\$(ProductName)\mxml2.dll + $(Platform)\$(Configuration)\$(ProductName)\mxml4.dll oldnames.lib;%(IgnoreSpecificDefaultLibraries) - .\mxml2.def + .\mxml4.def false Windows true true false - $(Configuration)\$(Platform)\$(ProductName)\mxml2.lib + $(Configuration)\$(Platform)\$(ProductName)\mxml4.lib MachineX86 @@ -151,15 +151,15 @@ ProgramDatabase - $(Platform)\$(Configuration)\$(ProductName)\mxml2.dll + $(Platform)\$(Configuration)\$(ProductName)\mxml4.dll oldnames.lib;%(IgnoreSpecificDefaultLibraries) - .\mxml2.def + .\mxml4.def true - $(OutDir)mxml2.pdb + $(OutDir)mxml4.pdb Windows false - $(Configuration)\$(Platform)\$(ProductName)\mxml2.lib + $(Configuration)\$(Platform)\$(ProductName)\mxml4.lib MachineX64 @@ -176,16 +176,16 @@ ProgramDatabase - $(Platform)\$(Configuration)\$(ProductName)\mxml2.dll + $(Platform)\$(Configuration)\$(ProductName)\mxml4.dll oldnames.lib;%(IgnoreSpecificDefaultLibraries) - .\mxml2.def + .\mxml4.def false Windows true true false - $(Configuration)\$(Platform)\$(ProductName)\mxml2.lib + $(Configuration)\$(Platform)\$(ProductName)\mxml4.lib MachineX64 @@ -206,7 +206,7 @@ - + diff --git a/vcnet/mxml2.vcxproj.filters b/vcnet/mxml4.vcxproj.filters similarity index 100% rename from vcnet/mxml2.vcxproj.filters rename to vcnet/mxml4.vcxproj.filters diff --git a/vcnet/mxml2.vcxproj.user b/vcnet/mxml4.vcxproj.user similarity index 100% rename from vcnet/mxml2.vcxproj.user rename to vcnet/mxml4.vcxproj.user