blob: 97569885bb4c17c7d91ca1f33b908147fdf9f1c9 [file] [log] [blame]
Ilia Linf1c1fb32021-05-04 15:55:34 +03001AC_PREREQ(2.64)
2
3AC_INIT([ipa-kernel-tests],[1.0.0])
4AM_INIT_AUTOMAKE([-Wall -Werror gnu foreign])
5
6AM_MAINTAINER_MODE
7
8AC_CONFIG_HEADER([config.h])
9AC_CONFIG_MACRO_DIR([m4])
10
11# Checks for programs.
12AC_PROG_CC
13AM_PROG_CC_C_O
14m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
15AC_PROG_LIBTOOL
16AC_PROG_CPP
17AC_PROG_INSTALL
18AC_PROG_MAKE_SET
19AC_PROG_CXX
20
21
22AS_CASE([$host],
23 [aarch64*], [ARM64=yes],
24 [ARM64=no]
25)
26
27AM_CONDITIONAL(ARM64, [test "x$ARM64" = "xyes"])
28
29AC_ARG_WITH([glib],
30 AC_HELP_STRING([--with-glib],
31 [enable glib, building HLOS systems which use glib]))
32
33AC_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
38if (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)
49fi
50
51AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
52
53AC_CONFIG_FILES([
54 Makefile
55 ])
56AC_OUTPUT