1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3AC_PREREQ([2.65]) 4AC_INIT(data-oss, 1.0.0) 5AM_INIT_AUTOMAKE(data-oss, 1.0.0) 6AC_OUTPUT(Makefile rmnetctl/src/Makefile rmnetctl/cli/Makefile data-oss.pc) 7AC_CONFIG_SRCDIR([rmnetctl/src/librmnetctl.c]) 8#AC_CONFIG_HEADERS([config.h]) 9AC_CONFIG_MACRO_DIR([m4]) 10 11# Checks for programs. 12AC_PROG_CC 13AC_PROG_LIBTOOL 14 15# Checks for libraries. 16AC_ARG_WITH(sanitized-headers, 17 AS_HELP_STRING([--with-sanitized-headers=DIR], 18 [Specify the location of the sanitized Linux headers]), 19 [CPPFLAGS="$CPPFLAGS -idirafter $withval"]) 20 21AC_ARG_WITH([glib], 22 AC_HELP_STRING([--with-glib], 23 [enable glib, building HLOS systems which use glib])) 24 25if (test "x${with_glib}" = "xyes"); then 26 AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 27 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 28 AC_MSG_ERROR(GThread >= 2.16 is required)) 29 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 30 AC_MSG_ERROR(GLib >= 2.16 is required)) 31 GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 32 GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 33 AC_SUBST(GLIB_CFLAGS) 34 AC_SUBST(GLIB_LIBS) 35fi 36 37AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 38 39# Checks for header files. 40AC_CHECK_HEADERS([sys/socket.h stdint.h linux/netlink.h string.h stdio.h unistd.h stdlib.h linux/rmnet_data.h]) 41 42# Checks for typedefs, structures, and compiler characteristics. 43AC_TYPE_OFF_T 44 45# Checks for library functions. 46AC_FUNC_MALLOC 47 48#AC_FUNC_MMAP 49#AC_CHECK_FUNCS([memset malloc sendto recvfrom ]) 50AC_OUTPUT 51