mfcuk/configure.ac
rconty@il4p.fr 21678c9260 Fix endianness detection:
- To test "if defined(HAVE_BYTESWAP_H)" in sources, configure needs to check for it... (same for HAVE_SYS_TYPES_H, HAVE_SYS_ENDIAN_H, HAVE_ENDIAN_H, etc.);
 - (untested) alternatives to bswapXX should use C99 standard instead of non-constant integer types;
 - GCC version test was wrong
2011-10-17 15:07:17 +00:00

45 lines
1.0 KiB
Plaintext

AC_INIT([mfcuk], [0.3.3], [zveriu@gmail.com])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/mfcuk.c])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# Checks for pkg-config modules.
LIBNFC_REQUIRED_VERSION=1.5.1
PKG_CHECK_MODULES([LIBNFC], [libnfc >= $LIBNFC_REQUIRED_VERSION], [], [AC_MSG_ERROR([libnfc >= $LIBNFC_REQUIRED_VERSION is mandatory.])])
PKG_CONFIG_REQUIRES="libnfc"
AC_SUBST([PKG_CONFIG_REQUIRES])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset strchr])
# Checks for endianness convertion
AC_CHECK_HEADERS([endian.h sys/endian.h CoreFoundation/CoreFoundation.h])
AC_CHECK_HEADERS([byteswap.h])
# Help us to write great code ;-)
CFLAGS="$CFLAGS -Wall -pedantic -Wextra -std=c99"
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT