forked from mirrors/tftp-hpa-google
autoconf: modernize and modularize
Use my modular m4 library used for other things as well; update autoconf macros to 2.71 standard. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
33051a296c
commit
fefaa2cc5c
35 changed files with 680 additions and 461 deletions
11
autoconf/m4/pa_sym.m4
Normal file
11
autoconf/m4/pa_sym.m4
Normal file
|
@ -0,0 +1,11 @@
|
|||
dnl --------------------------------------------------------------------------
|
||||
dnl PA_SYM(prefix, string)
|
||||
dnl
|
||||
dnl Convert a (semi-) arbitrary string to a CPP symbol
|
||||
dnl Compact underscores and convert non-C characters to underscore,
|
||||
dnl except + which is converted to X (so C++ -> CXX).
|
||||
dnl --------------------------------------------------------------------------
|
||||
AC_DEFUN([PA_SYM],
|
||||
[m4_bpatsubsts(m4_quote(m4_toupper([$*])),
|
||||
[,],[],[\+],[X],[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]+],[_],dnl
|
||||
[^._?\(.*\)_.$],[[\1]])])
|
Loading…
Add table
Add a link
Reference in a new issue