[libxml2] Fix autotools warnings
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix autotools warnings
- Date: Mon, 17 Aug 2020 12:11:28 +0000 (UTC)
commit 0ff527482d0b29b06bae8a5438a2c32ca69a11a8
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Mon Aug 17 02:54:28 2020 +0200
Fix autotools warnings
configure.ac | 23 ++++++++++++++---------
fuzz/Makefile.am | 9 +++++++++
2 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 32c47ac8f..a4c675bbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,15 +1,20 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
-AC_INIT
+
+m4_define([MAJOR_VERSION], 2)
+m4_define([MINOR_VERSION], 9)
+m4_define([MICRO_VERSION], 10)
+
+AC_INIT([libxml2],[MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
AC_CONFIG_SRCDIR([entities.c])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
-LIBXML_MAJOR_VERSION=2
-LIBXML_MINOR_VERSION=9
-LIBXML_MICRO_VERSION=10
+LIBXML_MAJOR_VERSION=MAJOR_VERSION
+LIBXML_MINOR_VERSION=MINOR_VERSION
+LIBXML_MICRO_VERSION=MICRO_VERSION
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION +
$LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
@@ -50,7 +55,7 @@ AC_SUBST(LIBXML_VERSION_EXTRA)
VERSION=${LIBXML_VERSION}
-AM_INIT_AUTOMAKE(libxml2, $VERSION)
+AM_INIT_AUTOMAKE([foreign])
# Support silent build rules, requires at least automake-1.11. Disable
# by either passing --disable-silent-rules to configure or passing V=1
@@ -1514,8 +1519,8 @@ else
AC_CHECK_HEADER(unicode/ucnv.h,
AC_MSG_CHECKING(for icu)
- AC_TRY_LINK([#include <unicode/ucnv.h>],[
- UConverter *utf = ucnv_open("UTF-8", NULL);],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unicode/ucnv.h>]], [[
+ UConverter *utf = ucnv_open("UTF-8", NULL);]])],[
AC_MSG_RESULT(yes)
have_libicu=yes],[
AC_MSG_RESULT(no)
@@ -1526,8 +1531,8 @@ else
LDFLAGS="${LDFLAGS} ${ICU_LIBS}"
LIBS="${LIBS} -licucore"
- AC_TRY_LINK([#include <unicode/ucnv.h>],[
- UConverter *utf = ucnv_open("UTF-8", NULL);],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unicode/ucnv.h>]], [[
+ UConverter *utf = ucnv_open("UTF-8", NULL);]])],[
AC_MSG_RESULT(yes)
have_libicu=yes
ICU_LIBS="${ICU_LIBS} -licucore"
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am
index 30883de5f..feba65be3 100644
--- a/fuzz/Makefile.am
+++ b/fuzz/Makefile.am
@@ -1,3 +1,4 @@
+AUTOMAKE_OPTIONS = -Wno-syntax
EXTRA_PROGRAMS = html htmlSeed regexp uri schema schemaSeed xml xmlSeed \
xpath xpathSeed
check_PROGRAMS = testFuzzer
@@ -20,10 +21,18 @@ XML_SEED_CORPUS_SRC = \
testFuzzer_SOURCES = testFuzzer.c fuzz.c
+.PHONY: tests clean-corpus
+
tests: testFuzzer$(EXEEXT)
@echo "## Running fuzzer tests"
@./testFuzzer$(EXEEXT)
+clean-corpus:
+ rm -rf seed/html.stamp seed/html
+ rm -rf seed/schema.stamp seed/schema
+ rm -rf seed/xml.stamp seed/xml
+ rm -rf seed/xpath.stamp seed/xpath
+
# XML fuzzer
xmlSeed_SOURCES = xmlSeed.c fuzz.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]