summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-03-30 19:40:01 +0200
committerDavid Tardon <dtardon@redhat.com>2017-03-30 19:45:52 +0200
commit38d14756cfc03b3e827963f854b0233f38872aaf (patch)
tree9b0f659163b7067238f1a410267bf7b88438e04f /configure.ac
parentbc4bc8cd02c7065143c2a236f5d949dcfb04a07f (diff)
create a fuzzing driver for oss-fuzz
Change-Id: I0c89a14828fb25b7a6b0d16bf4055b8dd49e1013
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index eb45681..c98f391 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,19 @@ AC_ARG_ENABLE([tools],
[enable_tools="$enableval"],
[enable_tools=yes]
)
-AS_IF([test "x$enable_tools" = "xyes"], [
+AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"])
+
+# =======
+# Fuzzers
+# =======
+AC_ARG_ENABLE([fuzzers],
+ [AS_HELP_STRING([--enable-fuzzers], [Build fuzzer(s)])],
+ [enable_fuzzers="$enableval"],
+ [enable_fuzzers=no]
+)
+AM_CONDITIONAL(BUILD_FUZZERS, [test "x$enable_fuzzers" = "xyes"])
+
+AS_IF([test "x$enable_tools" = "xyes" -o "x$enable_fuzzers" = "xyes"], [
PKG_CHECK_MODULES([REVENGE_STREAM],[
librevenge-stream-0.0
])
@@ -65,7 +77,6 @@ AC_SUBST([REVENGE_STREAM_CFLAGS])
AC_SUBST([REVENGE_STREAM_LIBS])
AC_SUBST([REVENGE_GENERATORS_CFLAGS])
AC_SUBST([REVENGE_GENERATORS_LIBS])
-AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"])
# ==========
# Find lcms2
@@ -345,6 +356,7 @@ src/conv/svg/cmx2xhtml.rc
src/conv/text/Makefile
src/conv/text/cdr2text.rc
src/conv/text/cmx2text.rc
+src/fuzz/Makefile
src/lib/Makefile
src/lib/libcdr.rc
src/test/Makefile
@@ -366,6 +378,7 @@ AC_MSG_NOTICE([
Build configuration:
debug: ${enable_debug}
docs: ${build_docs}
+ fuzzers: ${enable_fuzzers}
tests: ${enable_tests}
tools: ${enable_tools}
werror: ${enable_werror}