fix big in RADIUS session viewing when using an ignored-accounting export
[freeside.git] / rt / m4 / rt_expand_var.m4
1 dnl
2 dnl @synopsis   RT_EXPAND_VAR(baz, $fraz)
3 dnl
4 dnl Iteratively expands the second parameter, until successive iterations
5 dnl yield no change. The result is then assigned to the first parameter.
6 dnl
7 dnl This code is heavily borrowed from the Apache 2 codebase.
8 dnl
9
10 AC_DEFUN([RT_EXPAND_VAR],[
11         ap_last=''
12         ap_cur='$2'
13         while test "x${ap_cur}" != "x${ap_last}"; do
14                 ap_last="${ap_cur}"
15                 ap_cur=`eval "echo ${ap_cur}"`
16         done
17         $1="${ap_cur}"
18 ])