summaryrefslogtreecommitdiff
path: root/autoconf/m4/pa_sym.m4
diff options
context:
space:
mode:
Diffstat (limited to 'autoconf/m4/pa_sym.m4')
-rw-r--r--autoconf/m4/pa_sym.m47
1 files changed, 7 insertions, 0 deletions
diff --git a/autoconf/m4/pa_sym.m4 b/autoconf/m4/pa_sym.m4
new file mode 100644
index 00000000..742a534a
--- /dev/null
+++ b/autoconf/m4/pa_sym.m4
@@ -0,0 +1,7 @@
+dnl --------------------------------------------------------------------------
+dnl PA_SYM(prefix, string)
+dnl
+dnl Convert a (semi-) arbitrary string to a CPP symbol
+dnl --------------------------------------------------------------------------
+AC_DEFUN([PA_SYM],
+[m4_normalize([$1])m4_bpatsubsts(m4_toupper([$2]),[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]+],[_],[^._?\(.*\)_.$],[[\1]])])