mirror of
https://github.com/nfc-tools/mfcuk.git
synced 2025-12-23 18:50:06 +00:00
69 lines
1.8 KiB
Plaintext
69 lines
1.8 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ([2.64])
|
|
AC_INIT([mfcuk], [0.3], [zveriu@gmail.com])
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
|
|
|
# Checks for libnfc.
|
|
WITH_NFC=0
|
|
## Search libnfc with command line option (default prefix: auto)
|
|
LIBNFC_PREFIX="auto"
|
|
AC_ARG_WITH(libnfc,[--with-libnfc=DIR location of the libnfc],
|
|
[if test "$withval" != no; then
|
|
if test "$withval" != yes; then
|
|
LIBNFC_PREFIX=$withval
|
|
fi
|
|
fi])
|
|
if test x"$LIBNFC_PREFIX" != "xauto"; then
|
|
LIBNFC_CFLAGS="-L$LIBNFC_PREFIX/lib/ -I$LIBNFC_PREFIX/include/"
|
|
LIBNFC_LIBS="-lnfc"
|
|
fi
|
|
|
|
# Search using pkg-config
|
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, [AC_MSG_WARN([pkg-config not found.])])
|
|
if test x"$WITH_NFC" = "x0"; then
|
|
if test x"$PKG_CONFIG" != "x"; then
|
|
PKG_CHECK_MODULES([LIBNFC], [libnfc], [WITH_NFC=1], [WITH_NFC=0])
|
|
fi
|
|
fi
|
|
CFLAGS="$CFLAGS $LIBNFC_CFLAGS"
|
|
AC_CHECK_HEADERS([nfc/nfc.h],[WITH_NFC=1], AC_MSG_ERROR([A version of libnfc greater than or equal to 1.3 is required]))
|
|
|
|
if test x"$WITH_NFC" = "x0"; then
|
|
AC_MSG_ERROR([A version of libnfc greater than or equal to 1.3 is required.])
|
|
fi
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
|
|
# Checks for libraries.
|
|
AC_CHECK_LIB([nfc], [nfc_version])
|
|
|
|
# Checks for header files.
|
|
AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/time.h unistd.h])
|
|
|
|
# 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])
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
src/Makefile])
|
|
AC_OUTPUT
|