Files
libpostal/configure.ac
2015-08-09 00:01:44 -04:00

61 lines
1.5 KiB
Plaintext

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([libpostal], [0.1])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([src])
LT_INIT([shared])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC_C99
AC_PROG_INSTALL
# Checks for libraries.
AC_SEARCH_LIBS([snappy_compress],
[snappy],,[AC_MSG_ERROR([Could not find snappy])
])
AC_SEARCH_LIBS([log],
[m],,[AC_MSG_ERROR([Could not find math library])])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h locale.h malloc.h memory.h stddef.h stdint.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([getcwd gettimeofday memmove memset munmap regcomp setlocale sqrt strdup strndup])
AC_CONFIG_FILES([Makefile
src/Makefile
src/sparkey/Makefile])
AM_CONDITIONAL([HAVE_DATE_STAT], [date -r . >/dev/null 2>&1])
AM_CONDITIONAL([HAVE_STAT], [stat -f %Sm . >/dev/null 2>&1])
LAST_UPDATED_PATH=$srcdir/libpostal_data_last_updated
AC_SUBST([LIBPOSTAL_DATA_UPDATED_PATH], $LAST_UPDATED_PATH)
AC_OUTPUT