From fe50da3d8cd916001debbbfbc1eaa37b4eada3ae Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 21 May 2015 16:55:02 -0400 Subject: [PATCH] FS-7507: fix expansion of dirs compiled into freeswitch --- configure.ac | 22 ++++++++++++---------- src/switch_core.c | 8 ++++---- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 33bef51059..2eecbfd4d6 100644 --- a/configure.ac +++ b/configure.ac @@ -82,22 +82,24 @@ default_imagesdir="$prefix/images" if test "${enable_fhs}" = "yes"; then eval full_datadir="${datadir}/freeswitch" eval datadir=$full_datadir - default_cachedir="$localstatedir/cache/freeswitch" + eval full_localstatedir="${localstatedir}" + eval localstatedir=$full_localstatedir + default_cachedir="${localstatedir}/cache/freeswitch" localstatedir="${localstatedir}/lib/freeswitch" default_scriptdir="${datadir}/scripts" default_grammardir="${datadir}/grammar" default_soundsdir="${datadir}/sounds" default_htdocsdir="${datadir}/htdocs" default_fontsdir="${datadir}/fonts" - default_modulesdir="$libdir/freeswitch/mod" - default_dbdir="$localstatedir/db" - default_storagedir="$localstatedir/storage" - default_recordingsdir="$localstatedir/recordings" - default_imagesdir="$localstatedir/images" - rundir="$localstatedir/run/freeswitch" - logdir="$localstatedir/log/freeswitch" - confdir="$sysconfdir/freeswitch" - default_certsdir="$confdir/tls" + default_modulesdir="${libdir}/freeswitch/mod" + default_dbdir="${localstatedir}/db" + default_storagedir="${localstatedir}/storage" + default_recordingsdir="${localstatedir}/recordings" + default_imagesdir="${localstatedir}/images" + rundir="${localstatedir}/run/freeswitch" + logdir="${localstatedir}/log/freeswitch" + eval confdir="${sysconfdir}/freeswitch" + eval default_certsdir="${confdir}/tls" else if test "$datadir" = "\${datarootdir}" ; then datadir="${prefix}" diff --git a/src/switch_core.c b/src/switch_core.c index 5bc6ff6dab..753dfa5a26 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -789,8 +789,8 @@ SWITCH_DECLARE(void) switch_core_set_globals(void) if (SWITCH_GLOBAL_dirs.base_dir) switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s%sfonts", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR); else -#ifdef SWITCH_FONT_DIR - switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s", SWITCH_FONT_DIR); +#ifdef SWITCH_FONTS_DIR + switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s", SWITCH_FONTS_DIR); #else switch_snprintf(SWITCH_GLOBAL_dirs.fonts_dir, BUFSIZE, "%s%sfonts", base_dir, SWITCH_PATH_SEPARATOR); #endif @@ -800,8 +800,8 @@ SWITCH_DECLARE(void) switch_core_set_globals(void) if (SWITCH_GLOBAL_dirs.base_dir) switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s%simages", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR); else -#ifdef SWITCH_IMAGE_DIR - switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s", SWITCH_IMAGE_DIR); +#ifdef SWITCH_IMAGES_DIR + switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s", SWITCH_IMAGES_DIR); #else switch_snprintf(SWITCH_GLOBAL_dirs.images_dir, BUFSIZE, "%s%simages", base_dir, SWITCH_PATH_SEPARATOR); #endif