1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

configure: Minor changes to option parsing for consistency

The idea is to:
 - have a consistent looking file by using autoconf macros
 - provide better feedback on improper option usage

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-11-10 17:41:03 +01:00
committed by Carlos R. Mafra
parent f9c1265604
commit 324248ecde

View File

@@ -190,18 +190,18 @@ AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags t
dnl Boehm GC dnl Boehm GC
dnl ======== dnl ========
with_boehm_gc=no
AC_ARG_ENABLE([boehm-gc], AC_ARG_ENABLE([boehm-gc],
[AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])], [AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])],
[with_boehm_gc=$enableval]) [AS_CASE(["$enableval"],
[yes], [with_boehm_gc=yes],
[no], [with_boehm_gc=no],
[AC_MSG_ERROR([bad value $enableval for --enable-boehm-gc])] )],
[with_boehm_gc=no])
AS_IF([test "x$with_boehm_gc" = "xyes"], AS_IF([test "x$with_boehm_gc" = "xyes"],
AC_SEARCH_LIBS([GC_malloc], [gc], AC_SEARCH_LIBS([GC_malloc], [gc],
[AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])], [AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])],
[AC_MSG_FAILURE([--enable-boehm-gc specified but test for libgc failed])], [AC_MSG_FAILURE([--enable-boehm-gc specified but test for libgc failed])]))
[]
)
)
dnl LCOV dnl LCOV
dnl ==== dnl ====
@@ -212,13 +212,11 @@ AC_ARG_ENABLE([lcov],
AS_IF([test "x$enable_lcov" != "xno"], AS_IF([test "x$enable_lcov" != "xno"],
[AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage) [AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage)
if test "x$enable_lcov" = "xyes"; then AS_IF([test "x$enable_lcov" = "xyes"],
lcov_output_directory="coverage-report" [lcov_output_directory="coverage-report"],
else [lcov_output_directory="${enable_lcov}/coverage-report"])
lcov_output_directory="${enable_lcov}/coverage-report" AC_SUBST(lcov_output_directory)])
fi
AC_SUBST(lcov_output_directory)]
)
AM_CONDITIONAL([USE_LCOV], [test "x$enable_lcov" != "xno"]) AM_CONDITIONAL([USE_LCOV], [test "x$enable_lcov" != "xno"])
dnl dnl