aboutsummaryrefslogtreecommitdiffstats
path: root/tools/m4/enable_feature.m4
diff options
context:
space:
mode:
Diffstat (limited to 'tools/m4/enable_feature.m4')
-rw-r--r--tools/m4/enable_feature.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/m4/enable_feature.m4 b/tools/m4/enable_feature.m4
new file mode 100644
index 0000000000..054a143f57
--- /dev/null
+++ b/tools/m4/enable_feature.m4
@@ -0,0 +1,13 @@
+AC_DEFUN([AX_ARG_ENABLE_AND_EXPORT],
+[AC_ARG_ENABLE([$1],
+ AS_HELP_STRING([--enable-$1], [$2]))
+
+AS_IF([test "x$enable_$1" = "xyes"], [
+ ax_cv_$1="y"
+], [test "x$enable_$1" = "xno"], [
+ ax_cv_$1="n"
+], [test -z $ax_cv_$1], [
+ ax_cv_$1="n"
+])
+$1=$ax_cv_$1
+AC_SUBST($1)])