From e91b5ae2f587ce1032306ae8a8e5341c660453c6 Mon Sep 17 00:00:00 2001 From: nbk Date: Sat, 15 Jul 2006 16:36:22 +0000 Subject: [PATCH] Add an option --with-docdir, so we can chose the directory where the documentation files will be installed. --- configure.in | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 4ac2239..29cf7ff 100644 --- a/configure.in +++ b/configure.in @@ -100,6 +100,28 @@ dnl awk '{print " "$0}'])) AC_ARG_ENABLE(strict-dependencies, [ --enable-strict-dependencies Fail configure on lack of module dependancy.]) +dnl extra argument: --with-docdir +docdir='${datadir}/doc/freeradius' +AC_MSG_CHECKING(docdir) +AC_ARG_WITH(docdir, +[ --with-docdir=DIR Directory for documentation [DATADIR/doc/freeradius] ], +[ case "$withval" in + no) + AC_MSG_ERROR(Need docdir) + ;; + yes) + ;; + [[\\/$]]* | ?:[[\\/]]* ) + docdir="$withval" + ;; + *) + AC_MSG_ERROR([expected an absolute directory name for --with-docdir: $withval]) + ;; + esac ] +) +AC_SUBST(docdir) +AC_MSG_RESULT($docdir) + dnl extra argument: --with-logdir logdir='${localstatedir}/log/radius' AC_MSG_CHECKING(logdir) @@ -111,9 +133,12 @@ AC_ARG_WITH(logdir, ;; yes) ;; - *) + [[\\/$]]* | ?:[[\\/]]* ) logdir="$withval" ;; + *) + AC_MSG_ERROR([expected an absolute directory name for --with-logdir: $withval]) + ;; esac ] ) AC_SUBST(logdir) @@ -123,16 +148,19 @@ dnl extra argument: --with-radacctdir radacctdir='${logdir}/radacct' AC_MSG_CHECKING(radacctdir) AC_ARG_WITH(radacctdir, -[ --with-radacctdir=PATH Directory for detail files [LOGDIR/radacct] ], +[ --with-radacctdir=DIR Directory for detail files [LOGDIR/radacct] ], [ case "$withval" in no) AC_MSG_ERROR(Need radacctdir) ;; yes) ;; - *) + [[\\/$]]* | ?:[[\\/]]* ) radacctdir="$withval" ;; + *) + AC_MSG_ERROR([expected an absolute directory name for --with-radacctdir: $withval]) + ;; esac ] ) AC_SUBST(radacctdir) @@ -149,9 +177,12 @@ AC_ARG_WITH(raddbdir, ;; yes) ;; - *) + [[\\/$]]* | ?:[[\\/]]* ) raddbdir="$withval" ;; + *) + AC_MSG_ERROR([expected an absolute directory name for --with-raddbdir: $withval]) + ;; esac ] ) AC_SUBST(raddbdir) -- 2.1.4