mirror of git://git.sysmocom.de/ofono
Use STORAGEDIR autoconf voodoo from Bluez.
This commit is contained in:
parent
3e6d4237cb
commit
049e573691
25
configure.ac
25
configure.ac
|
@ -8,8 +8,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
AC_LANG_C
|
||||
|
||||
AC_PROG_CC
|
||||
|
@ -96,10 +94,25 @@ AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
|
|||
|
||||
AM_CONDITIONAL(DATAFILES, test "${enable_datafiles}" != "no")
|
||||
|
||||
eval "eval LOCALSTATE_DIR=$localstatedir"
|
||||
AC_SUBST(LOCALSTATE_DIR)
|
||||
AC_DEFINE_UNQUOTED(CONFIG_LOCALSTATEDIR, "$LOCALSTATE_DIR",
|
||||
[Define to the location where state is stored.])
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
if (test "${prefix}" = "NONE"); then
|
||||
dnl no prefix and no localstatedir, so default to /var
|
||||
if (test "$localstatedir" = '${prefix}/var'); then
|
||||
AC_SUBST([localstatedir], ['/var'])
|
||||
fi
|
||||
|
||||
prefix="${ac_default_prefix}"
|
||||
fi
|
||||
|
||||
if (test "$localstatedir" = '${prefix}/var'); then
|
||||
storagedir="${prefix}/var/lib/ofono"
|
||||
else
|
||||
storagedir="${localstatedir}/lib/ofono"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(STORAGEDIR, "${storagedir}",
|
||||
[Directory for the storage files])
|
||||
|
||||
COMPILER_FLAGS
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ static void sim_op_error(struct ofono_modem *modem)
|
|||
}
|
||||
|
||||
#define SIM_CACHE_MODE 0600
|
||||
#define SIM_CACHE_PATH CONFIG_LOCALSTATEDIR "/lib/ofono/%s/%04x"
|
||||
#define SIM_CACHE_PATH STORAGEDIR "/%s/%04x"
|
||||
#define SIM_CACHE_PATH_LEN(imsilen) (strlen(SIM_CACHE_PATH) - 2 + imsilen)
|
||||
#define SIM_CACHE_HEADER_SIZE 6
|
||||
|
||||
|
|
Loading…
Reference in New Issue