mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
configure: rewrote 3 ARG_ENABLEs to get them to behave properly
In addition to proper quoting for M4, the macro would not behave totally as expected: for example, providing '--disable-modelock' would enable the feature instead of keeping it disabled as the default. The definitions now properly behave as expectable, so the user can explicitly specify how he wants the feature even if it is the default; it will also fail on improper use which is always a good idea to ease possible future evolution. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
85a3fb13cc
commit
c7843e3f3b
33
configure.ac
33
configure.ac
@@ -588,8 +588,14 @@ AC_CHECK_LIB([X11], [XConvertCase],
|
||||
|
||||
dnl XKB keyboard language status
|
||||
dnl ============================
|
||||
AC_ARG_ENABLE(modelock, AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support]),
|
||||
AC_DEFINE(XKB_MODELOCK, 1, [whether XKB language MODELOCK should be enabled]))
|
||||
AC_ARG_ENABLE([modelock],
|
||||
[AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support])],
|
||||
[AS_CASE([$enableval],
|
||||
[yes|no], [],
|
||||
[AC_MSG_ERROR([bad value '$enableval' for --enable-modelock])])],
|
||||
[enable_modelock=no])
|
||||
AS_IF([test "x$enable_modelock" = "xyes"],
|
||||
[AC_DEFINE([XKB_MODELOCK], [1], [whether XKB language MODELOCK should be enabled]) ])
|
||||
|
||||
|
||||
dnl XDND Drag-nd-Drop support
|
||||
@@ -599,10 +605,11 @@ AC_ARG_ENABLE([xdnd],
|
||||
[AS_CASE(["$enableval"],
|
||||
[yes|no], [],
|
||||
[AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
|
||||
[enable_xdnd=yes
|
||||
supported_xext="$supported_xext XDnD"
|
||||
AC_DEFINE(XDND, 1, [whether Drag-nd-Drop support should be enabled])
|
||||
])
|
||||
[enable_xdnd=yes])
|
||||
AS_IF([test "x$enable_xdnd" = "xyes"],
|
||||
[supported_xext="$supported_xext XDnD"
|
||||
AC_DEFINE([XDND], [1], [whether Drag-nd-Drop support should be enabled])],
|
||||
[unsupported="$unsupported XDnd"])
|
||||
|
||||
|
||||
dnl XShape support
|
||||
@@ -922,11 +929,15 @@ AC_SUBST(wprefs_bindir)
|
||||
|
||||
dnl Enable User Defined Menu thing
|
||||
dnl ==============================
|
||||
AC_ARG_ENABLE(usermenu, AS_HELP_STRING([--enable-usermenu], [user defined menus for applications]),
|
||||
if test "$enableval" = yes; then
|
||||
AC_DEFINE(USER_MENU, 1, [define if you want user defined menus for applications])
|
||||
fi
|
||||
)
|
||||
AC_ARG_ENABLE([usermenu],
|
||||
[AS_HELP_STRING([--enable-usermenu], [user defined menus for applications])],
|
||||
[AS_CASE([$enableval],
|
||||
[yes|no], [],
|
||||
[AC_MSG_ERROR([bad value '$enableval' for --enable-usermenu])])],
|
||||
[enable_usermenu=no])
|
||||
AS_IF([test "x$enable_usermenu" = "xyes"],
|
||||
[AC_DEFINE([USER_MENU], [1],
|
||||
[define if you want user defined menus for applications])])
|
||||
|
||||
|
||||
dnl Support for removing non-public symbols from a library
|
||||
|
||||
Reference in New Issue
Block a user