Ilia Lin | f1c1fb3 | 2021-05-04 15:55:34 +0300 | [diff] [blame] | 1 | AC_PREREQ(2.64) |
| 2 | |
| 3 | AC_INIT([ipa-kernel-tests],[1.0.0]) |
| 4 | AM_INIT_AUTOMAKE([-Wall -Werror gnu foreign]) |
| 5 | |
| 6 | AM_MAINTAINER_MODE |
| 7 | |
| 8 | AC_CONFIG_HEADER([config.h]) |
| 9 | AC_CONFIG_MACRO_DIR([m4]) |
| 10 | |
| 11 | # Checks for programs. |
| 12 | AC_PROG_CC |
| 13 | AM_PROG_CC_C_O |
| 14 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
| 15 | AC_PROG_LIBTOOL |
| 16 | AC_PROG_CPP |
| 17 | AC_PROG_INSTALL |
| 18 | AC_PROG_MAKE_SET |
| 19 | AC_PROG_CXX |
| 20 | |
| 21 | |
| 22 | AS_CASE([$host], |
| 23 | [aarch64*], [ARM64=yes], |
| 24 | [ARM64=no] |
| 25 | ) |
| 26 | |
| 27 | AM_CONDITIONAL(ARM64, [test "x$ARM64" = "xyes"]) |
| 28 | |
| 29 | AC_ARG_WITH([glib], |
| 30 | AC_HELP_STRING([--with-glib], |
| 31 | [enable glib, building HLOS systems which use glib])) |
| 32 | |
| 33 | AC_ARG_WITH(ipanat-headers, |
| 34 | AS_HELP_STRING([--with-ipanat-headers=DIR], |
| 35 | [Specify the location of the ipanat headers]), |
| 36 | [CPPFLAGS="$CPPFLAGS -idirafter $withval"]) |
| 37 | |
| 38 | if (test "x${with_glib}" = "xyes"); then |
| 39 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) |
| 40 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, |
| 41 | AC_MSG_ERROR(GThread >= 2.16 is required)) |
| 42 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, |
| 43 | AC_MSG_ERROR(GLib >= 2.16 is required)) |
| 44 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" |
| 45 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" |
| 46 | |
| 47 | AC_SUBST(GLIB_CFLAGS) |
| 48 | AC_SUBST(GLIB_LIBS) |
| 49 | fi |
| 50 | |
| 51 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") |
| 52 | |
| 53 | AC_CONFIG_FILES([ |
| 54 | Makefile |
| 55 | ]) |
| 56 | AC_OUTPUT |