honor localstate dir to adjust log dir and run dir

This commit is contained in:
Michael Jerris 2010-08-05 19:21:52 -04:00
parent 33c6f7a22e
commit 88aa159be2
1 changed files with 8 additions and 2 deletions

View File

@ -38,13 +38,19 @@ AC_ARG_WITH([modinstdir],
AC_SUBST(modulesdir)
AC_DEFINE_UNQUOTED([SWITCH_MOD_DIR],"${modulesdir}",[where to install the modules to])
if test "$localstatedir" = "\${prefix}/var" ; then
rundir="$prefix/run"
logfiledir="${prefix}/log"
else
rundir="$localstatedir/run/freeswitch"
logfiledir="$localstatedir/log/freeswitch"
fi
# Where to put pidfile
AC_ARG_WITH([rundir],
[AS_HELP_STRING([--with-rundir=DIR], [Put pidfile into this location (default: $prefix/run)])], [runtimedir="$withval"], [runtimedir="${prefix}/run"])
[AS_HELP_STRING([--with-rundir=DIR], [Put pidfile into this location (default: $prefix/run)])], [runtimedir="$withval"], [runtimedir="$rundir"])
AC_SUBST(runtimedir)
AC_DEFINE_UNQUOTED([SWITCH_RUN_DIR],"${runtimedir}",[where to put pidfile to])
logfiledir="${prefix}/log"
AC_SUBST(logfiledir)
AC_DEFINE_UNQUOTED([SWITCH_LOG_DIR],"${logfiledir}",[where to put log files])