From 88aa159be279b216503af282af097995df98d68d Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 5 Aug 2010 19:21:52 -0400 Subject: [PATCH] honor localstate dir to adjust log dir and run dir --- configure.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index c6d89f8d54..e8b462f54a 100644 --- a/configure.in +++ b/configure.in @@ -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])