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

Configure: Add an error message when using deprecated "--with-defsdatadir"

This commit is contained in:
Christophe CURIS
2021-08-08 09:58:45 +02:00
committed by Carlos R. Mafra
parent 24f5b32469
commit 54c8535365
2 changed files with 15 additions and 0 deletions

View File

@@ -846,6 +846,12 @@ AC_ARG_WITH([pkgconfdir],
[AC_MSG_ERROR([bad path '$withval' for pkgconfdir, expecting an absolute path])])],
[with_pkgconfdir=""])
dnl Provide a message when trying to use "--with-defsdatadir" so that user can update its
dnl arguments. Otherwise only a warning is issued, which is likely to be missed, which will
dnl lead to perceived misbehaviour much later (and hard to debug).
WM_DENY_ARG_WITH([defsdatadir],
[AC_MSG_ERROR([option "--with-defsdatadir" have been replaced by "--with-pkgconfdir"])])
AS_IF([test "x$with_pkgconfdir" != "x"],
[pkgconfdir="$with_pkgconfdir"],
[pkgconfdir='${sysconfdir}/${PACKAGE_TARNAME}'])

View File

@@ -24,6 +24,15 @@ m4_pattern_forbid([^_?WM_])
m4_pattern_allow([^WM_OSDEP(_[A-Z]*)?$])
# WM_DENY_ARG_WITH(PACKAGE, ACTION-IF-GIVEN)
#
# Check if the argument "--with-PACKAGE" was used, and if it is the case
# execute ACTION-IF-GIVEN which is supposed to call AC_MSG_ERROR to
# stop any further processing and tell the user its arguments are bad
AC_DEFUN([WM_DENY_ARG_WITH],
[AS_IF([test "${[with_]m4_translit([$1], [-+.], [___])+set}" = set], [$2])])
# WM_CHECK_XFT_VERSION(MIN_VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
#
# $XFT_CFLAGS should be defined before calling this macro,