mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
More macro updates from the pa_autoconf library. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
15 lines
663 B
Plaintext
15 lines
663 B
Plaintext
dnl --------------------------------------------------------------------------
|
|
dnl PA_SHSYM(...)
|
|
dnl
|
|
dnl Convert a (semi-) arbitrary string to a shell symbol
|
|
dnl Convert non-shell characters to underscores, except + which is converted
|
|
dnl to x (so C++ -> cxx). Unlike PA_SYM(), do not compact multiple
|
|
dnl underscores.
|
|
dnl
|
|
dnl This currently differs from PA_CSYM only in not doing case conversion.
|
|
dnl --------------------------------------------------------------------------
|
|
AC_DEFUN([PA_SHSYM],
|
|
[m4_bpatsubsts(m4_quote(m4_normalize([$*])),
|
|
[[ ]+],[],[\+],[x],[[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]],[_],
|
|
[^._\(.*\)_.$],[[[\1]]])])
|