summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2020-04-15 07:10:08 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2020-04-15 07:10:08 +0200
commit50b320952e99ea20f9b77c6c501280fe37fd2598 (patch)
tree0215ee4665cba0a2b8853583fa978def9862eebd /configure.ac
parentsm: Support rsaPSS verification also for CMS signatures. (diff)
downloadgnupg2-50b320952e99ea20f9b77c6c501280fe37fd2598.tar.xz
gnupg2-50b320952e99ea20f9b77c6c501280fe37fd2598.zip
regexp: Fix generation of _unicode_mapping.c.
* configure.ac (AWK_HEX_NUMBER_OPTION): Detect GNU Awk. * regexp/Makefile.am: Use AWK_HEX_NUMBER_OPTION. * regexp/parse-unidata.awk: Don't use strtonum. GnuPG-bug-id: 4915 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 917420e35..9eb25bd02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -633,6 +633,16 @@ AC_ISC_POSIX
AC_SYS_LARGEFILE
+# GNU AWK requires -n option to interpret "0xHH" as a number
+if $AWK 'BEGIN { if (PROCINFO@<:@"version"@:>@) exit 1 }'; then
+ AWK_HEX_NUMBER_OPTION=''
+ AC_MSG_NOTICE([awk with no option for hexadecimal])
+else
+ AWK_HEX_NUMBER_OPTION='-n'
+ AC_MSG_NOTICE([awk with an option -n for hexadecimal])
+fi
+AC_SUBST(AWK_HEX_NUMBER_OPTION)
+
# We need to compile and run a program on the build machine. A
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
# the AC archive is broken for autoconf 2.57. Given that there is no