--- configure.in +++ configure.in @@ -38,12 +38,12 @@ 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" +if test "${localstatedir}" = "\${prefix}/var" ; then + rundir="${prefix}/run" logfiledir="${prefix}/log" else - rundir="$localstatedir/run/freeswitch" - logfiledir="$localstatedir/log/freeswitch" + rundir="${localstatedir}/run/freeswitch" + logfiledir="${localstatedir}/log/freeswitch" fi # Where to put pidfile AC_ARG_WITH([rundir], @@ -54,34 +54,34 @@ AC_DEFINE_UNQUOTED([SWITCH_RUN_DIR],"${runtimedir}",[where to put pidfile to]) AC_SUBST(logfiledir) AC_DEFINE_UNQUOTED([SWITCH_LOG_DIR],"${logfiledir}",[where to put log files]) -dbdir="${prefix}/db" +dbdir="${localstatedir}/db/freeswitch" AC_SUBST(dbdir) AC_DEFINE_UNQUOTED([SWITCH_DB_DIR],"${dbdir}",[where to put db files]) -htdocsdir="${prefix}/htdocs" +htdocsdir="${prefix}/www/freeswitch/htdocs" AC_SUBST(htdocsdir) AC_DEFINE_UNQUOTED([SWITCH_HTDOCS_DIR],"${htdocsdir}",[where to put htdocs files]) -soundsdir="${prefix}/sounds" +soundsdir="${prefix}/share/freeswitch/sounds" AC_SUBST(soundsdir) AC_DEFINE_UNQUOTED([SWITCH_SOUNDS_DIR],"${soundsdir}",[where to put sounds files]) -grammardir="${prefix}/grammar" +grammardir="${prefix}/etc/freeswitch/grammar" AC_SUBST(grammardir) AC_DEFINE_UNQUOTED([SWITCH_GRAMMAR_DIR],"${grammardir}",[where to put grammar files]) -scriptdir="${prefix}/scripts" +scriptdir="${prefix}/etc/freeswitch/scripts" AC_SUBST(scriptdir) AC_DEFINE_UNQUOTED([SWITCH_SCRIPT_DIR],"${scriptdir}",[where to put script files]) -recordingsdir="${prefix}/recordings" +recordingsdir="${localstatedir}/freeswitch/recordings" AC_SUBST(recordingsdir) AC_DEFINE_UNQUOTED([SWITCH_RECORDINGS_DIR],"${recordingsdir}",[where to put recording files]) if test "$sysconfdir" = "\${prefix}/etc" ; then - confdir="$prefix/conf" + confdir="${prefix}/conf" else - confdir="$sysconfdir" + confdir="${sysconfdir}" fi sysconfdir="$confdir" @@ -89,6 +89,14 @@ sysconfdir="$confdir" AC_SUBST(confdir) AC_DEFINE_UNQUOTED([SWITCH_CONF_DIR],"${confdir}",[directory for configuration files]) +storagedir="${localstatedir}/freeswitch" +AC_SUBST(storagedir) +AC_DEFINE_UNQUOTED([SWITCH_STORAGE_DIR],"${storagedir}",[where to put extra files]) + +voicemaildir="${localstatedir}/spool/freeswitch/voicemail" +AC_SUBST(voicemaildir) +AC_DEFINE_UNQUOTED([SWITCH_VOICEMAIL_DIR],"${voicemaildir}",[where to put voicemail]) + AC_SUBST(libdir) AC_SUBST(bindir) AC_SUBST(includedir)