From: Michael Jerris Date: Thu, 5 Aug 2010 23:21:52 +0000 (-0400) Subject: honor localstate dir to adjust log dir and run dir X-Git-Tag: v1.2-rc1~526^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88aa159be279b216503af282af097995df98d68d;p=thirdparty%2Ffreeswitch.git honor localstate dir to adjust log dir and run dir --- 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])