From ffecf1b2af777baf575f0d05163dd40333f701ad Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Wed, 26 Sep 2018 12:14:16 -0700 Subject: build: add ENABLE_EXAMPLE macro on enable-example condition Previously, the ENABLE_EXAMPLE was only an AM_CONDITIONAL and therefore not passed down to the source environment via config.h. This fixes that. Change-Id: I8e02112f12c4aaef22eda76cc9e50b9bf7f32dda Signed-off-by: Patrick Venture --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 05e87cd..97d54d6 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,10 @@ AC_ARG_ENABLE([example], AS_HELP_STRING([--enable-example], [Enable example blob handler]) ) AM_CONDITIONAL(ENABLE_EXAMPLE, [test "x$enable_example" = "xyes"]) +AS_IF([test "x$enable_example" = "xyes"], + [AC_DEFINE(ENABLE_EXAMPLE, [1], [Build and install the example handler.])], + [AC_DEFINE(ENABLE_EXAMPLE, [0], [Do not build and install the example handler.])] +) # Create configured output AC_CONFIG_FILES([Makefile test/Makefile]) -- cgit v1.2.3