1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([fastrpc], [0.0.1])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(1.10 foreign subdir-objects)
LT_INIT(disable-static)
AS_CASE([$host],
[*-linux-android], [
compile_for_android=yes
], [
compile_for_android=no
]
)
AM_CONDITIONAL([ANDROID_CC],
[test "$compile_for_android" = yes])
# Add shared object versioning
m4_define([LT_MAJOR], [1])
m4_define([LT_MINOR], [0])
m4_define([LT_PATCH], [0])
AC_SUBST([LT_VERSION], LT_MAJOR.LT_MINOR)
AC_SUBST([LT_VERSION_NUMBER], LT_MAJOR:LT_MINOR:LT_PATCH)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AM_PROG_CC_C_O
# Checks for libraries.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
# Enable pkg-config
PKG_PROG_PKG_CONFIG
# Check for libyaml only if not Android
AS_IF([test "$compile_for_android" = no], [
PKG_CHECK_MODULES([YAML], [yaml-0.1], [],
[AC_MSG_ERROR([libyaml (yaml-0.1) is required but not found.])])
AC_SUBST(YAML_CFLAGS)
AC_SUBST(YAML_LIBS)
])
# Configure config base path option (--with-config-base-dir)
AC_ARG_WITH([config-base-dir],
[AS_HELP_STRING([--with-config-base-dir=PATH],
[Base directory for config files (default: /usr/share/qcom)])],
[config_base_dir="$withval"],
[config_base_dir="/usr/share/qcom/"])
AC_MSG_NOTICE([Config base path: $config_base_dir])
AC_SUBST([CONFIG_BASE_DIR], ["$config_base_dir"])
AC_CONFIG_FILES([
Makefile
inc/Makefile
src/Makefile
test/Makefile
])
AC_OUTPUT
|