fix big in RADIUS session viewing when using an ignored-accounting export
[freeside.git] / rt / m4 / rt_enable_layout.m4
1 dnl
2 dnl @synopsis RT_ENABLE_LAYOUT()
3 dnl
4 dnl Enable a specific directory layout for the installation to use.
5 dnl This configures a command-line parameter that can be specified
6 dnl at ./configure invocation.
7 dnl
8 dnl The use of this feature in this way is a little hackish, but
9 dnl better than a heap of options for every directory.
10 dnl
11 dnl This code is heavily borrowed *cough* from the Apache 2 code.
12 dnl
13
14 AC_DEFUN([RT_ENABLE_LAYOUT],[
15 AC_ARG_ENABLE(layout,
16               AC_HELP_STRING([--enable-layout=LAYOUT],
17                              [Use a specific directory layout (Default: RT3)]),
18               LAYOUT=$enableval)
19
20 if test "x$LAYOUT" = "x"; then
21         LAYOUT="RT3"
22 fi
23 RT_LAYOUT($srcdir/config.layout, $LAYOUT)
24 AC_MSG_CHECKING(for chosen layout)
25 if test "x$rt_layout_name" = "xno"; then
26         if test "x$LAYOUT" = "xno"; then
27                 AC_MSG_RESULT(none)
28         else
29                 AC_MSG_RESULT($LAYOUT)
30         fi
31         AC_MSG_ERROR([a valid layout must be specified (or the default used)])
32 else
33         AC_SUBST(rt_layout_name)
34         AC_MSG_RESULT($rt_layout_name)
35 fi
36 ])