1AC_DEFUN([CHECK_ENABLE_OPTION], 2[dnl 3 dnl $1: option name 4 dnl $2: default value ("yes" or "no") 5 dnl $3: define $3 if yes 6 AC_ARG_ENABLE($1, 7 [AS_HELP_STRING([--enable-$1], 8 [turn on $1 (default is $2)])], 9 [], 10 [enable_$1=$2]) 11 AM_CONDITIONAL([$3],[test "x${enable_$1}" == "xyes" ]) 12 AS_IF([test "x${enable_$1}" = "xyes"], 13 [AC_DEFINE($3, 1, [Enable $1])] 14 ) 15]) 16