Skip to content

Commit e6af52f

Browse files
committed
confdb: Add helper for creating comma-separated lists
PAC_APPEND_CSV will add string values to a comma-separated list, including an initial value if the list is empty.
1 parent b9cc3aa commit e6af52f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

confdb/aclocal_util.m4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
dnl PAC_APPEND_CSV - Append value to comma separated list
2+
dnl Usage: PAC_APPEND_CSV([foo], [bar])
3+
AC_DEFUN([PAC_APPEND_CSV],[
4+
AS_IF([test -n "$$2"],
5+
[$2="$$2, $1"],
6+
[$2=$1])
7+
])
8+
19
dnl Nesting safe macros for saving variables
210
dnl Usage: PAC_PUSH_FLAG(CFLAGS)
311
AC_DEFUN([PAC_PUSH_FLAG],[

0 commit comments

Comments
 (0)