1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(fair, 0.5.1, wsl-fair-bugs@fruit.je)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([src/address.c])
AC_CONFIG_HEADER([src/config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
# Export certain paths to the application
AC_DEFINE_DIR(FAIRCONF_PATH, sysconfdir/$PACKAGE.conf, [Full path to the config file])
# Checks for libraries.
AC_CHECK_LIB([avl], [avl_init_node], , [
AC_MSG_FAILURE([No libavl found. Please install it before proceeding.])
exit 1
])
AC_CHECK_LIB([m], [exp], , [
AC_MSG_FAILURE([No math library found. Please install it before proceeding.])
exit 1
])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h netdb.h stdint.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h], , [
AC_MSG_FAILURE([Required system header files not found.])
exit 1
])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([memset strcasecmp strdup], , [
AC_MSG_FAILURE([Function not found. A sufficiently BSD compatible OS is required.])
exit 1
])
AC_CHECK_FUNCS([getaddrinfo gethostname gettimeofday memchr regcomp select socket strchr strerror strtoull], , [
AC_MSG_FAILURE([Function not found. A sufficiently modern POSIX OS is required.])
exit 1
])
dnl AC_CONFIG_FILES([src/Makefile])
AC_OUTPUT([Makefile src/Makefile doc/Makefile])
|