autoconf: fix enable flags
This commit is contained in:
parent
9e8ad8b1fd
commit
18f40cd879
1 changed files with 23 additions and 10 deletions
33
configure.ac
33
configure.ac
|
@ -69,17 +69,30 @@ AM_CONDITIONAL(OS_LINUX, test "x$os" = xlinux)
|
|||
AM_CONDITIONAL(OS_DARWIN, test "x$os" = xdarwin)
|
||||
|
||||
# Examples build
|
||||
AC_ARG_ENABLE([disable-examples-build], [AS_HELP_STRING([--disable-examples-build],
|
||||
[disable building example applications [default=no]])],
|
||||
[disable_build_examples=$enableval],
|
||||
[disable_build_examples=no])
|
||||
AM_CONDITIONAL(BUILD_EXAMPLES, test "x$disable_build_examples" != xyes)
|
||||
AC_ARG_ENABLE([examples],
|
||||
AS_HELP_STRING([--enable-examples],
|
||||
[enable building example applications, default: yes]),
|
||||
[case "${enableval}" in
|
||||
yes) build_examples=true ;;
|
||||
no) build_examples=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-examples]) ;;
|
||||
esac],
|
||||
[build_examples=true]
|
||||
)
|
||||
AM_CONDITIONAL(BUILD_EXAMPLES, test x"$build_examples" == x"true")
|
||||
|
||||
# Debug enable
|
||||
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--debug],
|
||||
[turn on debugging [default=no]])],
|
||||
[debug=$enableval],
|
||||
[debug=no])
|
||||
AM_CONDITIONAL(DEBUG, test "x$debug" != xno)
|
||||
AC_ARG_ENABLE(debug,
|
||||
AS_HELP_STRING([--enable-debug],
|
||||
[enable debugging, default: no]),
|
||||
[case "${enableval}" in
|
||||
yes) debug=true ;;
|
||||
no) debug=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
|
||||
esac],
|
||||
[debug=false]
|
||||
)
|
||||
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
|
||||
|
||||
AC_SUBST(LTLDFLAGS)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue