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 62 63 64 65 66 67
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([swapspace], [1.18], [jacob@tookmund.com],[swapspace],[https://github.com/Tookmund/swapspace])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([src/config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MKDIR_P
# Enable large files
AC_SYS_LARGEFILE
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h limits.h locale.h stdlib.h string.h sys/param.h sys/statvfs.h syslog.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_REALLOC
AC_CHECK_FUNCS([atexit getcwd getpagesize memset setlocale strchr strerror strtol strtoul])
# Check for swapon and swapoff
AC_CHECK_FUNC([swapon],[
AC_DEFINE([HAVE_SWAPON],[],[Define if system has swapon ()])
])
AC_CHECK_FUNC([swapoff],[
AC_DEFINE([HAVE_SWAPOFF],[],[Define if system has swapoff()])
])
AC_CHECK_FUNC([posix_fallocate],[
AC_DEFINE([HAVE_PFALLOCATE],[],[Define if system has posix_fallocate()])
])
# Check args for NO_CONFIG, NO_DEBUG
AC_ARG_ENABLE([noconfig],[
AS_HELP_STRING([--enable-noconfig],
[Enable ultra-lightweight unconfigurable version]
)],
[
AC_DEFINE([NO_CONFIG],[],[Ultra-lightweight unconfigurable version])
],
[])
AC_ARG_ENABLE([nodebug],[
AS_HELP_STRING([--enable-nodebug],
[Disable assertions and consistancy checking]
)],
[
AC_DEFINE([NO_DEBUG],[],[Disable assertions and consistancy checking])
],
[])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT
|