diff --git a/core/ContextBase.cpp b/core/ContextBase.cpp index d5c3108f..22ac849c 100644 --- a/core/ContextBase.cpp +++ b/core/ContextBase.cpp @@ -171,9 +171,14 @@ void ContextBase::readConfig() /* default configuration value of constrained time uncertainty mode: feature disabled, time uncertainty threshold defined by modem, and unlimited power budget */ +#ifdef FEATURE_AUTOMOTIVE + mGps_conf.CONSTRAINED_TIME_UNCERTAINTY_ENABLED = 1; +#else mGps_conf.CONSTRAINED_TIME_UNCERTAINTY_ENABLED = 0; +#endif mGps_conf.CONSTRAINED_TIME_UNCERTAINTY_THRESHOLD = 0.0; mGps_conf.CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET = 0; + /* default configuration value of position assisted clock estimator mode */ mGps_conf.POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED = 0; /* default configuration QTI GNSS H/W */ diff --git a/core/Makefile.am b/core/Makefile.am index ffd93579..1199a523 100644 --- a/core/Makefile.am +++ b/core/Makefile.am @@ -56,6 +56,10 @@ libloc_core_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) endif +if USE_FEATURE_AUTOMOTIVE +AM_CFLAGS += -DFEATURE_AUTOMOTIVE +endif + libloc_core_la_LIBADD = -ldl $(GPSUTILS_LIBS) #Create and Install libraries diff --git a/core/configure.ac b/core/configure.ac index c3e062b6..548c5e59 100644 --- a/core/configure.ac +++ b/core/configure.ac @@ -74,6 +74,18 @@ fi AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") +AC_ARG_WITH([auto_feature], + AC_HELP_STRING([--with-auto_feature=@<:@dir@:>@], + [Using Automotive feature]), + [], + with_auto_feature=no) + +if test "x$with_auto_feature" != "xno"; then + CPPFLAGS="${CPPFLAGS} -DFEATURE_AUTOMOTIVE" +fi + +AM_CONDITIONAL(USE_FEATURE_AUTOMOTIVE, test "x${with_auto_feature}" = "xyes") + AC_CONFIG_FILES([ \ Makefile \ loc-core.pc \