I may need to add a lot of AC_ARG_ENABLE
, currently I'm using the syntax below which is the only I got working, but I wonder if there's already some m4 macro for a simple action-if-given test as I'm using (I did some search but found nothing yet) or a better cleaner syntax.
I've seen some example with it empty []
but just can't get it working, do I need to create a new macro?
AC_ARG_ENABLE([welcome],
AS_HELP_STRING([--enable-welcome], [Enable welcome route example @<:@default=yes@:>@]),
[case "${enableval}" in
yes) enable_welcome=true ;;
no) enable_welcome=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-welcome]) ;;
esac],[enable_welcome=true])
AM_CONDITIONAL([ENABLE_WELCOME], [test x$enable_welcome = xtrue])
here how I use it on the Makefile.am
if ENABLE_WELCOME
...
endif