1# configure.ac -- Autoconf script for gps loc-core 2# 3# Process this file with autoconf to produce a configure script 4 5# Requires autoconf tool later than 2.61 6AC_PREREQ(2.61) 7# Initialize the gps loc-hal package version 1.0.0 8AC_INIT([loc-core],1.0.0) 9# Does not strictly follow GNU Coding standards 10AM_INIT_AUTOMAKE([foreign subdir-objects]) 11# Disables auto rebuilding of configure, Makefile.ins 12AM_MAINTAINER_MODE 13# Verifies the --srcdir is correct by checking for the path 14AC_CONFIG_SRCDIR([loc-core.pc.in]) 15# defines some macros variable to be included by source 16AC_CONFIG_HEADERS([config.h]) 17AC_CONFIG_MACRO_DIR([m4]) 18 19# Checks for programs. 20AC_PROG_LIBTOOL 21AC_PROG_CXX 22AC_PROG_CC 23AM_PROG_CC_C_O 24AC_PROG_AWK 25AC_PROG_CPP 26AC_PROG_INSTALL 27AC_PROG_LN_S 28AC_PROG_MAKE_SET 29PKG_PROG_PKG_CONFIG 30 31# Checks for libraries. 32PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 33AC_SUBST([GPSUTILS_CFLAGS]) 34AC_SUBST([GPSUTILS_LIBS]) 35 36AC_ARG_WITH([core_includes], 37 AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 38 [Specify the location of the core headers]), 39 [core_incdir=$withval], 40 with_core_includes=no) 41 42if test "x$with_core_includes" != "xno"; then 43 CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 44fi 45 46AC_ARG_WITH([locpla_includes], 47 AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 48 [specify the path to locpla-includes in loc-pla_git.bb]), 49 [locpla_incdir=$withval], 50 with_locpla_includes=no) 51 52if test "x$with_locpla_includes" != "xno"; then 53 AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 54fi 55 56AC_SUBST([CPPFLAGS]) 57 58AC_ARG_WITH([glib], 59 AC_HELP_STRING([--with-glib], 60 [enable glib, building HLOS systems which use glib])) 61 62if (test "x${with_glib}" = "xyes"); then 63 AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 64 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 65 AC_MSG_ERROR(GThread >= 2.16 is required)) 66 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 67 AC_MSG_ERROR(GLib >= 2.16 is required)) 68 GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 69 GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 70 71 AC_SUBST(GLIB_CFLAGS) 72 AC_SUBST(GLIB_LIBS) 73fi 74 75AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 76 77AC_ARG_WITH([auto_feature], 78 AC_HELP_STRING([--with-auto_feature=@<:@dir@:>@], 79 [Using Automotive feature]), 80 [], 81 with_auto_feature=no) 82 83if test "x$with_auto_feature" != "xno"; then 84 CPPFLAGS="${CPPFLAGS} -DFEATURE_AUTOMOTIVE" 85fi 86 87AM_CONDITIONAL(USE_FEATURE_AUTOMOTIVE, test "x${with_auto_feature}" = "xyes") 88 89# External AP 90AC_ARG_WITH([external_ap], 91 AC_HELP_STRING([--with-external_ap=@<:@dir@:>@], 92 [Using External Application Processor]), 93 [], 94 with_external_ap=no) 95 96if test "x$with_external_ap" != "xno"; then 97 CPPFLAGS="${CPPFLAGS} -DFEATURE_EXTERNAL_AP" 98fi 99 100AM_CONDITIONAL(USE_EXTERNAL_AP, test "x${with_external_ap}" = "xyes") 101 102AC_CONFIG_FILES([ \ 103 Makefile \ 104 loc-core.pc \ 105 ]) 106 107AC_OUTPUT 108