mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
build: Improve GNUPG_BUILD_PROGRAM macro.
* acinclude.m4 (GNUPG_BUILD_PROGRAM): Allow for dash in options. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
c334fa8df0
commit
d8ee0d79a7
10
acinclude.m4
10
acinclude.m4
@ -165,23 +165,25 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
|
||||
# build_NAME and whether --enable-NAME or --disable-NAME is shown with
|
||||
# ./configure --help
|
||||
AC_DEFUN([GNUPG_BUILD_PROGRAM],
|
||||
[build_$1=$2
|
||||
[m4_define([my_build], [m4_bpatsubst(build_$1, [[^a-zA-Z0-9_]], [_])])
|
||||
my_build=$2
|
||||
m4_if([$2],[yes],[
|
||||
AC_ARG_ENABLE([$1], AC_HELP_STRING([--disable-$1],
|
||||
[do not build the $1 program]),
|
||||
build_$1=$enableval, build_$1=$2)
|
||||
my_build=$enableval, my_build=$2)
|
||||
],[
|
||||
AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1],
|
||||
[build the $1 program]),
|
||||
build_$1=$enableval, build_$1=$2)
|
||||
my_build=$enableval, my_build=$2)
|
||||
])
|
||||
case "$build_$1" in
|
||||
case "$my_build" in
|
||||
no|yes)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([only yes or no allowed for feature --enable-$1])
|
||||
;;
|
||||
esac
|
||||
m4_undefine([my_build])
|
||||
])
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user