• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.65])
5AC_INIT(data-ipa, 1.0.0)
6AM_INIT_AUTOMAKE(data-ipa, 1.0.0)
7AC_OUTPUT(Makefile ipanat/src/Makefile ipacm/src/Makefile)
8AC_CONFIG_SRCDIR([ipanat/src/ipa_nat_drv.c])
9AC_CONFIG_HEADERS([config.h])
10AC_CONFIG_MACRO_DIR([m4])
11
12# Checks for programs.
13AC_PROG_CC
14AC_PROG_LIBTOOL
15AC_PROG_CXX
16
17PKG_CHECK_MODULES([LIBXML], [libxml-2.0])
18AC_SUBST([LIBXML_CFLAGS])
19AC_SUBST([LIBXML_LIBS])
20
21# Checks for libraries.
22
23AC_ARG_WITH(sanitized-headers,
24      AS_HELP_STRING([--with-sanitized-headers=DIR],
25         [Specify the location of the sanitized Linux headers]),
26      [CPPFLAGS="$CPPFLAGS -idirafter $withval"])
27AM_CONDITIONAL(KERNELMODULES, [test -n -eq 0])
28
29AC_ARG_WITH([glib],
30      AC_HELP_STRING([--with-glib],
31         [enable glib, building HLOS systems which use glib]))
32
33if (test "x${with_glib}" = "xyes"); then
34        AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
35        PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
36                                AC_MSG_ERROR(GThread >= 2.16 is required))
37        PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
38                                AC_MSG_ERROR(GLib >= 2.16 is required))
39        GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
40        GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
41        AC_SUBST(GLIB_CFLAGS)
42        AC_SUBST(GLIB_LIBS)
43fi
44
45AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
46
47# Checks for header files.
48AC_CHECK_HEADERS([fcntl.h netinet/in.h sys/ioctl.h unistd.h])
49
50# Checks for typedefs, structures, and compiler characteristics.
51AC_TYPE_OFF_T
52
53# Checks for library functions.
54AC_FUNC_MALLOC
55AC_FUNC_MMAP
56AC_CHECK_FUNCS([memset munmap])
57
58AC_OUTPUT
59