From dcf3656fa0054f83fa4cd3918cf9760d46228b4e Mon Sep 17 00:00:00 2001 From: Ruben Laguna Date: Sun, 8 Mar 2015 10:52:22 +0100 Subject: [PATCH] Add AC_ARG_ENABLE --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index c4c32e3..d7d483e 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,19 @@ AC_CHECK_HEADER([stdlib.h]) # and DEPS_LIBS in Makefile.am # PKG_CHECK_MODULES([DEPS], [glib-2.0 >= 2.24.1]) +AC_ARG_ENABLE([myfeature], + AS_HELP_STRING([--enable-myfeature],[enable myfeature to get this and that])) + +if test "x${enable_myfeature}" == "xyes"; then + AC_DEFINE([MYFEATURE], 1, [myfeature is enabled]) +else + AC_MSG_WARN([ +----------------------------------------------------------------------------------- +Are you sure that you want to have myfeature disabled? You will lose this and that. +----------------------------------------------------------------------------------- + ]) +fi + AC_CONFIG_FILES([Makefile]) GLIB_TESTS AC_REQUIRE_AUX_FILE([tap-driver.sh])