Newer
Older
dnl Process this file with autoconf to produce a configure script.
dnl
dnl This file is free software; as a special exception the author gives
dnl unlimited permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl Minimum Autoconf version required.
AC_INIT([LibFixPOSIX], [0.3.0], [iolib-devel@common-lisp.net],
[libfixposix], [http://common-lisp.net/project/iolib/])
AC_COPYRIGHT([Copyright © 2010-2013 Stelian Ionescu <sionescu@cddr.org>])
Stelian Ionescu
committed
AC_MSG_NOTICE([srcdir: $srcdir])
AC_MSG_NOTICE([builddir: $builddir])
AC_MSG_NOTICE([CPPFLAGS: $CPPFLAGS])
AC_MSG_NOTICE([CFLAGS: $CFLAGS])
AC_MSG_NOTICE([LDFLAGS: $LDFLAGS])
AS_IF([test "`/bin/pwd`" = "`cd $srcdir; /bin/pwd`"], [
AC_MSG_WARN([you should configure in a separate build directory])
AC_CONFIG_HEADERS([config.h])
dnl Where to generate output; srcdir location.
AC_CONFIG_SRCDIR([src/lib/spawn.c])
dnl Auxiliary M4 macros
AM_INIT_AUTOMAKE([1.10 foreign silent-rules subdir-objects
color-tests parallel-tests])
dnl Have Kbuild-like build output
AM_SILENT_RULES([yes])
dnl Contains replacement functions
# AC_CONFIG_LIBOBJ_DIR([lib])
dnl Checks for programs.
# We need a C compiler.
AC_PROG_CC_C99
# And we need libtool for building the shared library
LT_INIT([pic-only disable-static disable-fast-install])
dnl Set compiler & linker flags
AX_PTHREAD
LFP_SYS_LARGEFILE
LFP_REQUIRE_HEADERS([stdlib.h stdio.h string.h errno.h time.h])
LFP_REQUIRE_HEADERS([sys/types.h unistd.h fcntl.h sys/signal.h signal.h])
LFP_CFLAGS="$LFP_CFLAGS $LFS_CFLAGS $PTHREAD_CFLAGS"
LFP_LDFLAGS="$LFP_LDFLAGS $LFS_LDFLAGS"
LFP_LIBS="$LFP_LIBS $PTHREAD_LIBS $LFS_LIBS"
dnl Checks for declarations
LFP_REQUIRE_DECL([TIOCSCTTY], [sys/ioctl.h])
LFP_REQUIRE_DECL([NSIG], [sys/types.h sys/signal.h signal.h])
LFP_REQUIRE_DECL([IP_HDRINCL], [sys/types.h sys/socket.h netinet/in.h])
AC_CHECK_HEADER([sys/signalfd.h])
AC_CHECK_FUNCS([__xpg_strerror_r strnlen strndup clearenv])
LFP_SEARCH_LIBS([socket], [socket nsl])
AC_CHECK_FUNCS([accept4 pipe2 sendfile pselect ptsname_r])
LFP_REQUIRE_FUNCS([vsyslog ptsname posix_openpt])
LFP_REQUIRE_MONOTONIC_CLOCK
dnl Configuration switches
# LFP_ARG_ENABLE_EMULATED_SIGNALFD
AC_CONFIG_FILES([Makefile
src/include/lfp/time.h])