libfreefare/configure.ac

60 lines
1.5 KiB
Text
Raw Normal View History

2009-12-18 21:32:25 +01:00
AC_INIT([libfreefare], [0.0.0])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_CONFIG_HEADERS([config.h])
2009-12-18 21:32:25 +01:00
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
2009-12-18 21:32:25 +01:00
AC_HEADER_STDBOOL
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset])
2009-12-18 21:32:25 +01:00
AC_CHECK_HEADERS([endian.h sys/endian.h])
if test $ac_cv_header_endian_h = "no" -a $ac_cv_header_sys_endian_h = "no"; then
AC_MSG_ERROR(["Can't locate header endian.h."]);
fi
AC_CHECK_HEADERS([byteswap.h])
AC_DEFINE([_XOPEN_SOURCE], [600], [Define to 500 if Single Unix conformance is wanted, 600 for sixth revision.])
CFLAGS="$CFLAGS -std=c99"
2009-12-18 21:32:25 +01:00
# Checks for pkg-config modules.
LIBNFC_REQUIRED_VERSION=1.3.4
PKG_CHECK_MODULES([LIBNFC], [libnfc >= $LIBNFC_REQUIRED_VERSION], [], [AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])])
2009-12-18 21:32:25 +01:00
PKG_CONFIG_REQUIRES="libnfc"
AC_SUBST([PKG_CONFIG_REQUIRES])
2010-01-11 21:14:30 +01:00
m4_ifdef([AC_CHECK_CUTTER], [AC_CHECK_CUTTER], [ac_cv_use_cutter="no"])
AM_CONDITIONAL([WITH_CUTTER], [test "$ac_cv_use_cutter" != "no"])
m4_ifdef([AC_CHECK_COVERAGE], [AC_CHECK_COVERAGE])
if test x$ac_cv_enable_coverage = xyes; then
CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
fi
AC_OUTPUT([Makefile examples/Makefile libfreefare/Makefile libfreefare.pc test/Makefile])