Commit 2075e719 authored by Sébastien Villemot's avatar Sébastien Villemot

New upstream version 0.4.3

parent 47f17f77
Makefile
Makefile.in
aclocal.m4 aclocal.m4
autom4te.cache/ autom4te.cache/
config/aux/
config/m4/libtool.m4
config/m4/lt*.m4
build/ build/
.build-aux/
config.*
configure configure
libtool config.h.in*
m4/l*.m4 Makefile.in
src/.*
*.lo
*.o
*.la
src/signalfd_test
.deps/
.dirstamp
.libs/
src/lib/libfixposix.h
src/tests/signalfd_test
src/tests/spawn_test
branches:
only:
- master
os:
- linux
- osx
language: c
compiler:
- gcc
- clang
matrix:
allow_failures:
- os: osx
notifications:
email:
on_success: change
on_failure: always
irc:
channels:
- "chat.freenode.net#iolib"
on_success: change
on_failure: always
use_notice: true
skip_join: true
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -qq check; fi
env:
global:
# Coverity Scan token
secure: "jJirBkZOyJ8KuYXMbjUpKem2FGaCsLBq7roP9oHs5mz8wIKENGB3i7pBe5USVLCwVAuqJ+TPjbfSo4nSnCIf5mLdJoNnyrq8FAYhSRzA/zl4COW6eN0Of9dgCOzcOriPY9rXUVbIapWoMogntnAS6MpmbiSxQCsq99VsIHq3TYk="
script:
- autoreconf -f -i
- ./configure --enable-tests
- make -j2
- make check
addons:
coverity_scan:
project:
name: sionescu/libfixposix
build_command_prepend: autoreconf -f -i && ./configure --enable-tests
build_command: make -j4
branch_pattern: coverity
notification_email: sionescu@cddr.org
...@@ -6,13 +6,22 @@ ...@@ -6,13 +6,22 @@
# # # #
######################################################################## ########################################################################
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I config/m4
AM_CPPFLAGS = $(LFP_CPPFLAGS) AM_CFLAGS = $(LFP_CFLAGS) -fvisibility=hidden
AM_CFLAGS = $(LFP_CFLAGS) AM_CPPFLAGS = -include $(top_builddir)/config.h \
-include $(top_srcdir)/src/lib/aux/macros.h \
-I$(top_srcdir)/src/include \
-I$(top_builddir)/src/include
INCLUDES = -I$(top_builddir)/src/include -I$(top_srcdir)/src/include EXTRA_DIST = \
LICENCE \
VERSION \
libfixposix.spec \
debian \
src/tests/lib \
$(wildcard $(top_srcdir)/src/tests/*.in)
...@@ -23,7 +32,7 @@ INCLUDES = -I$(top_builddir)/src/include -I$(top_srcdir)/src/include ...@@ -23,7 +32,7 @@ INCLUDES = -I$(top_builddir)/src/include -I$(top_srcdir)/src/include
######################################################################## ########################################################################
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libfixposix.pc pkgconfig_DATA = src/libfixposix.pc
...@@ -38,7 +47,11 @@ lib_LTLIBRARIES = src/lib/libfixposix.la ...@@ -38,7 +47,11 @@ lib_LTLIBRARIES = src/lib/libfixposix.la
# Private headers, used only for internal definitions # Private headers, used only for internal definitions
# The only purpose of this definition it to ensure that # The only purpose of this definition it to ensure that
# «make dist» knows about them # «make dist» knows about them
noinst_HEADERS = src/lib/utils.h src/lib/spawn.h noinst_HEADERS = \
src/lib/aux/inlines.h \
src/lib/aux/macros.h \
src/lib/bitset.h \
src/lib/spawn.h
include_HEADERS = src/include/lfp.h include_HEADERS = src/include/lfp.h
...@@ -47,10 +60,12 @@ include_lfp_HEADERS = \ ...@@ -47,10 +60,12 @@ include_lfp_HEADERS = \
src/include/lfp/aux.h \ src/include/lfp/aux.h \
src/include/lfp/stdlib.h \ src/include/lfp/stdlib.h \
src/include/lfp/string.h \ src/include/lfp/string.h \
src/include/lfp/strerror.h \
src/include/lfp/errno.h \ src/include/lfp/errno.h \
src/include/lfp/fcntl.h \ src/include/lfp/fcntl.h \
src/include/lfp/stat.h \ src/include/lfp/stat.h \
src/include/lfp/unistd.h \ src/include/lfp/unistd.h \
src/include/lfp/ioctl.h \
src/include/lfp/mman.h \ src/include/lfp/mman.h \
src/include/lfp/select.h \ src/include/lfp/select.h \
src/include/lfp/socket.h \ src/include/lfp/socket.h \
...@@ -58,35 +73,47 @@ include_lfp_HEADERS = \ ...@@ -58,35 +73,47 @@ include_lfp_HEADERS = \
src/include/lfp/signal.h \ src/include/lfp/signal.h \
src/include/lfp/spawn.h \ src/include/lfp/spawn.h \
src/include/lfp/dirent.h \ src/include/lfp/dirent.h \
src/include/lfp/time.h \ $(top_builddir)/src/include/lfp/time.h \
src/include/lfp/resource.h \ src/include/lfp/resource.h \
src/include/lfp/sendfile.h \ src/include/lfp/sendfile.h \
src/include/lfp/syslog.h src/include/lfp/syslog.h \
src/include/lfp/buildinfo.h
# src/include/lfp/signalfd.h # src/include/lfp/signalfd.h
src_lib_libfixposix_la_SOURCES = \ src_lib_libfixposix_la_SOURCES = \
src/libfixposix.libtool \
src/lib/stdlib.c \ src/lib/stdlib.c \
src/lib/string.c \ src/lib/string.c \
src/lib/strerror.c \
src/lib/errno.c \ src/lib/errno.c \
src/lib/fcntl.c \ src/lib/fcntl.c \
src/lib/stat.c \ src/lib/stat.c \
src/lib/unistd.c \ src/lib/unistd.c \
src/lib/ioctl.c \
src/lib/mman.c \ src/lib/mman.c \
src/lib/select.c \ src/lib/select.c \
src/lib/socket.c \ src/lib/socket.c \
src/lib/wait.c \ src/lib/wait.c \
src/lib/signal.c \ src/lib/signal.c \
src/lib/spawnattr.c \ src/lib/spawnattr.c \
src/lib/bitset.c \
src/lib/spawn_file_actions.c \ src/lib/spawn_file_actions.c \
src/lib/spawn.c \ src/lib/spawn.c \
src/lib/dirent.c \ src/lib/dirent.c \
src/lib/time.c \ src/lib/time.c \
src/lib/resource.c \ src/lib/resource.c \
src/lib/sendfile.c \ src/lib/sendfile.c \
src/lib/syslog.c src/lib/syslog.c \
src/lib/buildinfo.c
# src/lib/install_signalfd.c # src/lib/install_signalfd.c
src_lib_libfixposix_la_LIBADD = $(LFP_LDFLAGS) src_lib_libfixposix_la_DEPENDENCIES = \
src/libfixposix.libtool
src_lib_libfixposix_la_LIBADD = $(LFP_LIBS)
src_lib_libfixposix_la_LDFLAGS = $(LFP_LDFLAGS) -no-undefined \
-version-info `@AWK@ '/^Version:/ { print $$2 }' $(top_srcdir)/src/libfixposix.libtool`
...@@ -96,22 +123,50 @@ src_lib_libfixposix_la_LIBADD = $(LFP_LDFLAGS) ...@@ -96,22 +123,50 @@ src_lib_libfixposix_la_LIBADD = $(LFP_LDFLAGS)
# # # #
######################################################################## ########################################################################
check_PROGRAMS = src/tests/spawn src/tests/select if TESTS
check_SCRIPTS = LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \
TOP_SRCDIR=$(top_srcdir) \
TOP_BUILDDIR=$(top_builddir) \
$(SHELL) $(top_srcdir)/config/aux/tap-driver.sh
TESTS = ${check_PROGRAMS} ${check_SCRIPTS} compile_tests = \
XFAIL_TESTS = src/tests/buildinfo
run_tests = \
src/tests/spawn \
src/tests/select \
src/tests/mkstemp
# src_tests_signalfd_SOURCES = src/tests/signalfd.c check_PROGRAMS = $(compile_tests) $(run_tests)
# src_tests_signalfd_LDADD = src/lib/libfixposix.la check_SCRIPTS = \
src/tests/buildinfo.bats
src_tests_spawn_SOURCES = src/tests/spawn.c # Bats tests must be created by /.configure to get the correct path of
# the Bats interpreter, but the configure script fails to preserve the
# execute bit, so we restore it here.
%.bats: %.bats.in $(top_builddir)/Makefile
sed 's:\@BATSPATH\@:$(BATSPATH):' < $< > $@
chmod +x $@
src_tests_spawn_LDADD = src/lib/libfixposix.la TESTS = ${run_tests} ${check_SCRIPTS}
XFAIL_TESTS =
src_tests_buildinfo_SOURCES = src/tests/buildinfo.c
src_tests_buildinfo_CFLAGS = @CHECK_CFLAGS@
src_tests_buildinfo_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_spawn_SOURCES = src/tests/spawn.c
src_tests_spawn_CFLAGS = @CHECK_CFLAGS@
src_tests_spawn_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_select_SOURCES = src/tests/select.c src_tests_select_SOURCES = src/tests/select.c
src_tests_select_CFLAGS = @CHECK_CFLAGS@
src_tests_select_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_mkstemp_SOURCES = src/tests/mkstemp.c
src_tests_mkstemp_CFLAGS = @CHECK_CFLAGS@
src_tests_mkstemp_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_select_LDADD = src/lib/libfixposix.la endif
-*- outline -*- -*- markdown -*-
The purpose of libfixposix is to offer replacements for parts of POSIX The purpose of libfixposix is to offer replacements for parts of POSIX
whose behaviour is inconsistent across *NIX flavours. whose behaviour is inconsistent across *NIX flavours.
...@@ -7,9 +7,10 @@ whose behaviour is inconsistent across *NIX flavours. ...@@ -7,9 +7,10 @@ whose behaviour is inconsistent across *NIX flavours.
If you've downloaded this library through git, you'll first need to If you've downloaded this library through git, you'll first need to
generate the ./configure script; in order to do that you need to have generate the ./configure script; in order to do that you need to have
at least autoconf-2.67, automake-1.10 and libtool-2.2.6b and run at least autoconf-2.67, automake-1.10, libtool-2.2.6b, pkg-config and check (for
this inside the top directory: the test suite: see http://check.sf.net) then run this inside the top
> autoreconf -i directory:
> autoreconf -i -f
For best results use a dedicated build directory instead of running For best results use a dedicated build directory instead of running
the configure script directly in the source tree: the configure script directly in the source tree:
...@@ -20,3 +21,14 @@ the configure script directly in the source tree: ...@@ -20,3 +21,14 @@ the configure script directly in the source tree:
On Linux, you might need to run «ldconfig» as superuser after On Linux, you might need to run «ldconfig» as superuser after
installing, otherwise the *nix linker won't be able to find the library installing, otherwise the *nix linker won't be able to find the library
* Installation through distro repositories
For a certain number of Linux distributions, there are officially
supported repositories.
You can find the instructions to configure the binary repository at
https://software.opensuse.org/download.html?project=home:sionescu&package=libfixposix.
Just click on your distribution, if present.
http://article.gmane.org/gmane.lisp.iolib.devel/422 also has a set of
older instructions about installing on Debian-based distros.
# -*- Autoconf -*-
AC_DEFUN([LFP_TESTS_CHECK], [
AC_ARG_ENABLE([tests],
[AS_HELP_STRING([--enable-tests],
[enable test suite using CHECK @<:@default=no@:>@])],
[],
[enable_tests=no])
AS_CASE($enable_tests,
[yes], [PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
AC_SUBST([CHECK_CFLAGS])
AC_SUBST([CHECK_LIBS])],
[no], [],
AC_MSG_ERROR(
[--enable-tests was given an illegal value: "$enable_tests"])
)
AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
])
AC_DEFUN([LFP_INIT], [
# Build flags
LFP_CFLAGS=""
AC_SUBST(LFP_CFLAGS)
LFP_LDFLAGS=""
AC_SUBST(LFP_LDFLAGS)
LFP_LIBS=""
AC_SUBST(LFP_LIBS)
# Version Info
major=`echo $1 | cut -d . -f 1`
AC_SUBST(LFP_MAJOR_VERSION, $major)
minor=`echo $1 | cut -d . -f 2`
AC_SUBST(LFP_MINOR_VERSION, $minor)
micro=`echo $1 | cut -d . -f 3`
AC_SUBST(LFP_MICRO_VERSION, $micro)
AC_CHECK_PROG([GIT], [git], [yes])
if test "x$ac_cv_prog_GIT" = xyes
then
vcsid=`git rev-parse --short HEAD`
fi
AC_SUBST(LFP_VCSID, $vcsid)
])
AC_DEFUN([LFP_SYS_PLATFORM_SPECIFIC_DEFINITIONS], [
case "$host_os" in
linux*)
LFP_CFLAGS="$LFP_CFLAGS -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1"
;;
freebsd*)
LFP_CFLAGS="$LFP_CFLAGS -D_XOPEN_SOURCE=600 -D__BSD_VISIBLE"
;;
netbsd*)
LFP_CFLAGS="$LFP_CFLAGS -D_XOPEN_SOURCE=600 -D_NETBSD_SOURCE"
;;
openbsd*)
LFP_CFLAGS="$LFP_CFLAGS -D__BSD_VISIBLE"
;;
darwin*)
LFP_CFLAGS="$LFP_CFLAGS -D_DARWIN_C_SOURCE"
;;
sunos* | solaris*)
LFP_CFLAGS="$LFP_CFLAGS -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
;;
esac
])
AC_DEFUN([LFP_SYS_LARGEFILE], [
LFP_GETCONF_UNDEF([LFS_CFLAGS], [LFS_CFLAGS])
LFP_GETCONF_UNDEF([LFS_LDFLAGS], [LFS_LDFLAGS])
LFP_GETCONF_UNDEF([LFS_LIBS], [LFS_LIBS])
])
AC_DEFUN([LFP_CHECK_POSIX_REALTIME_CLOCK_TYPES], [
LFP_REQUIRE_TYPE([clockid_t], [sys/time.h time.h])
AC_SUBST([HAVE_CLOCKID_T], [1])
LFP_REQUIRE_DECL([CLOCK_REALTIME], [sys/time.h time.h])
LFP_REQUIRE_DECL([CLOCK_MONOTONIC], [sys/time.h time.h])
])
AC_DEFUN([LFP_CHECK_POSIX_REALTIME_CLOCK_ALTERNATIVES], [
case "$host_os" in
darwin*)
LFP_REQUIRE_HEADERS([mach/mach.h mach/clock.h])
LFP_REQUIRE_FUNCS([host_get_clock_service clock_get_attributes])
dnl LFP_REQUIRE_DECL([CLOCK_GET_TIME_RES], [mach/mach.h mach/clock.h])
dnl LFP_REQUIRE_DECL([CALENDAR_CLOCK], [mach/mach.h mach/clock.h])
dnl LFP_REQUIRE_DECL([REALTIME_CLOCK], [mach/mach.h mach/clock.h])
;;
*)
AC_MSG_ERROR([clock_gettime not found and no workaround available])
;;
esac
])
AC_DEFUN([LFP_REQUIRE_MONOTONIC_CLOCK], [
LFP_SEARCH_LIBS([clock_gettime], [rt], [
AC_SUBST([HAVE_CLOCK_GETTIME], [1])
LFP_CHECK_POSIX_REALTIME_CLOCK_TYPES
AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
[We have the function clock_gettime()])],
[AC_SUBST([HAVE_CLOCK_GETTIME], [0])
AC_SUBST([HAVE_CLOCKID_T], [0])
LFP_CHECK_POSIX_REALTIME_CLOCK_ALTERNATIVES])
])
AC_DEFUN([LFP_REQUIRE_GETPEEREID], [
AC_CHECK_FUNCS([getpeereid],
[AC_DEFINE([HAVE_GETPEEREID], [1], [We have the function getpeereid()])],
AC_CHECK_FUNCS([getpeerucred],
[LFP_REQUIRE_HEADERS([ucred.h])
AC_DEFINE([HAVE_GETPEERUCRED], [1], [We have the function getpeerucred()])],
[LFP_REQUIRE_DECL([SO_PEERCRED], [sys/types.h sys/socket.h])]))
])
AC_DEFUN([LFP_ARG_ENABLE_EMULATED_SIGNALFD], [
AC_ARG_ENABLE([emulated-signalfd],
[AS_HELP_STRING([--enable-emulated-signalfd={yes|no|check}],
[Use emulated signalfd @<:@default=check@:>@])],
[],
[enable_emulated_signalfd=check])
AS_CASE($enable_emulated_signalfd,
[yes], [AC_DEFINE(HAVE_EMULATED_SIGNALFD, 1, [Whether to use signalfd emulation])
AC_SUBST(HAVE_EMULATED_SIGNALFD, 1)
],
[check], [if test x"$ac_cv_header_sys_signalfd_h" = xyes ; then
AC_DEFINE(HAVE_EMULATED_SIGNALFD, 0, [Whether to use signalfd emulation])
AC_SUBST(HAVE_EMULATED_SIGNALFD, 0)
else
AC_DEFINE(HAVE_EMULATED_SIGNALFD, 1, [Whether to use signalfd emulation])
AC_SUBST(HAVE_EMULATED_SIGNALFD, 1)
fi],
[no], [if test x"$ac_cv_header_sys_signalfd_h" = xyes ; then
AC_DEFINE(HAVE_EMULATED_SIGNALFD, 0, [Whether to use signalfd emulation])
AC_SUBST(HAVE_EMULATED_SIGNALFD, 0)
else
AC_MSG_FAILURE([signalfd emulation was disabled although <sys/signalfd.h> is absent])
fi],
[AC_MSG_FAILURE(
[--enable-emulated-signalfd was given an illegal value: "$enable_emulated_signalfd"])])
])
# -*- Autoconf -*-
AC_DEFUN([LFP_SAVE_FLAGS], [
_lfp_saved_cppflags_$1=$CPPFLAGS
_lfp_saved_cflags_$1=$CFLAGS
_lfp_saved_ldflags_$1=$LDFLAGS
_lfp_saved_libs_$1=$LIBS
CPPFLAGS="$LFP_CPPFLAGS"
CFLAGS="$LFP_CFLAGS"
LDFLAGS="$LFP_LDFLAGS"
LIBS="$LFP_LIBS"
])
AC_DEFUN([LFP_RESTORE_FLAGS], [
CPPFLAGS="$_lfp_saved_cppflags_$1"
CFLAGS="$_lfp_saved_cflags_$1"
LDFLAGS="$_lfp_saved_ldflags_$1"
LIBS="$_lfp_saved_libs_$1"
])
# Check for some headers and print an error if not found
AC_DEFUN([LFP_REQUIRE_HEADERS], [
LFP_SAVE_FLAGS(AS_TR_CPP($1))
AC_CHECK_HEADERS($1,,AC_MSG_FAILURE([Cannot find header $ac_header]))
LFP_RESTORE_FLAGS(AS_TR_CPP($1))
])
# Check for a function and print an error if not found
AC_DEFUN([LFP_REQUIRE_FUNCS], [
LFP_SAVE_FLAGS(AS_TR_CPP($1))
AC_CHECK_FUNCS($1,,AC_MSG_FAILURE([Cannot find function $ac_func]))
LFP_RESTORE_FLAGS(AS_TR_CPP($1))
])
# Check for a type and print an error if not found
AC_DEFUN([LFP_REQUIRE_TYPE], [
LFP_SAVE_FLAGS(AS_TR_CPP($1))
AC_CHECK_TYPES($1,,AC_MSG_FAILURE([Cannot find type $1 in $2]),
[m4_foreach_w([header], [$2], [[#]include [<]header[>]
])])
LFP_RESTORE_FLAGS(AS_TR_CPP($1))
])
# Check for a declaration and print an error if not found
AC_DEFUN([LFP_REQUIRE_DECL], [
LFP_SAVE_FLAGS(AS_TR_CPP($1))
AC_CHECK_DECL($1,,AC_MSG_FAILURE([Cannot find $1 in <$2>]),
[m4_foreach_w([header], [$2], [[#]include [<]header[>]
])])
LFP_RESTORE_FLAGS(AS_TR_CPP($1))
])
# Check for a library and print an error if not found
AC_DEFUN([LFP_SEARCH_LIBS], [
LFP_SAVE_FLAGS(AS_TR_CPP($1))
AC_SEARCH_LIBS($1,$2,$3
[if test -n "$LIBS"; then LFP_LIBS="$LFP_LIBS $LIBS"; fi],
m4_default_nblank_quoted([$4],AC_MSG_FAILURE([Cannot find $1 in <$2>])))
LFP_RESTORE_FLAGS(AS_TR_CPP($1))
])
AC_DEFUN([LFP_REQUIRE_PROG], [
AC_CHECK_PROG($1, $2, [yes])
if test "x$ac_cv_prog_$1" != xyes
then
AC_MSG_FAILURE([Program $2 not found])
fi
])
# Check for a declaration and print an error if not found
# Syntax: LFP_GETCONF(VARIABLE, SYSTEM_VAR,
# ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
AC_DEFUN([LFP_GETCONF], [
$1=`(getconf $2) 2>/dev/null`
AC_SUBST($1)
if test $? -eq 0 ; then
: ; $3
else
: ; $4
fi
])
# Check for a declaration and print an error if not found or is undefined
# Syntax: LFP_GETCONF(VARIABLE, SYSTEM_VAR,
# ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
AC_DEFUN([LFP_GETCONF_UNDEF], [
$1=`(getconf $2) 2>/dev/null`
AC_SUBST($1)
if test $? -eq 0 && test x"$$1" != xundefined ; then
: ; $3
else
: ; $4
fi
])
...@@ -9,19 +9,33 @@ dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the ...@@ -9,19 +9,33 @@ 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 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl Minimum Autoconf version required. dnl Minimum Autoconf version required.
AC_INIT([LibFixPOSIX], [0.1], [iolib-devel@common-lisp.net],
[libfixposix], [http://common-lisp.net/project/iolib/])
AC_PREREQ([2.67]) AC_PREREQ([2.67])
AC_INIT([LibFixPOSIX], m4_esyscmd_s([cat VERSION]),
[iolib-devel@common-lisp.net],
[libfixposix], [https://github.com/sionescu/libfixposix])
AC_COPYRIGHT([Copyright © 2010-2018 Stelian Ionescu <sionescu@cddr.org>])
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]) AC_CONFIG_HEADERS([config.h])
dnl Where to generate output; srcdir location. dnl Where to generate output; srcdir location.
AC_CONFIG_SRCDIR([src/lib/spawn.c]) AC_CONFIG_SRCDIR([src/lib/spawn.c])
dnl Auxiliary M4 macros dnl Auxiliary M4 macros
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([config/m4])
dnl Must come before AM_INIT_AUTOMAKE. dnl Must come before AM_INIT_AUTOMAKE.
AC_CONFIG_AUX_DIR([.build-aux]) AC_CONFIG_AUX_DIR([config/aux])
AM_INIT_AUTOMAKE([1.10 foreign silent-rules subdir-objects AM_INIT_AUTOMAKE([1.10 foreign silent-rules subdir-objects
color-tests parallel-tests]) color-tests parallel-tests])
...@@ -31,49 +45,68 @@ AM_SILENT_RULES([yes]) ...@@ -31,49 +45,68 @@ AM_SILENT_RULES([yes])
dnl Contains replacement functions dnl Contains replacement functions
# AC_CONFIG_LIBOBJ_DIR([lib]) # AC_CONFIG_LIBOBJ_DIR([lib])
AC_LANG([C])
dnl Checks for programs. dnl Checks for programs.
# We need a C compiler. # We need a C compiler.
AC_PROG_CC_C99 AC_PROG_CC_C99
AC_PROG_AWK
# And we need libtool for building the shared library # And we need libtool for building the shared library
LT_INIT LT_INIT([pic-only disable-static disable-fast-install])
LT_PREREQ([2.2.6])
LFP_FLAGS_INIT AC_SUBST([PACKAGE_VERSION])
LFP_INIT($PACKAGE_VERSION)
dnl Checks for programs dnl Checks for programs
AC_CHECK_PROG([GETCONF], [getconf], [yes]) LFP_REQUIRE_PROG([GETCONF], [getconf])
if test "x$ac_cv_prog_GETCONF" != xyes
then
AC_MSG_FAILURE([Program getconf not found])
fi
dnl Set compiler & linker flags dnl Set compiler & linker flags
LFP_SYS_PLATFORM_SPECIFIC_DEFINITIONS LFP_SYS_PLATFORM_SPECIFIC_DEFINITIONS
AX_PTHREAD AX_PTHREAD
LFP_SYS_LARGEFILE LFP_SYS_LARGEFILE
LFP_CPPFLAGS+=" $LFS_CFLAGS"
LFP_CFLAGS+=" $PTHREAD_CFLAGS"
LFP_LDFLAGS+=" $PTHREAD_LIBS $LFS_LDFLAGS $LFS_LIBS"
dnl Checks for C99 & POSIX headers dnl Checks for C99 & POSIX headers
AC_HEADER_ASSERT AC_HEADER_ASSERT
AC_HEADER_STDBOOL
LFP_REQUIRE_HEADERS([stdlib.h stdio.h string.h errno.h time.h]) LFP_REQUIRE_HEADERS([stdlib.h stdio.h string.h errno.h time.h])
LFP_REQUIRE_HEADERS([sys/types.h unistd.h fcntl.h signal.h]) LFP_REQUIRE_HEADERS([sys/types.h unistd.h fcntl.h sys/signal.h signal.h])
AC_CHECK_HEADER([sys/signalfd.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 dnl Checks for declarations
LFP_REQUIRE_DECLS([NSIG], [signal.h]) 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])
dnl Checks for non-standard headers
AC_CHECK_HEADER([sys/signalfd.h])
dnl Checks for functions dnl Checks for functions
AC_CHECK_FUNCS([__xpg_strerror_r strnlen strndup]) AC_CHECK_FUNCS([__xpg_strerror_r strnlen strndup clearenv])
AC_CHECK_FUNCS([accept4 pipe2 sendfile]) LFP_REQUIRE_FUNCS([strtok_r])
LFP_REQUIRE_FUNCS([pselect vsyslog]) LFP_SEARCH_LIBS([socket], [socket nsl])
LFP_CHECK_POSIX_MONOTONIC_CLOCK AC_CHECK_FUNCS([accept4 pipe2 sendfile pselect ptsname_r])
LFP_REQUIRE_FUNCS([vsyslog ptsname posix_openpt])
LFP_REQUIRE_MONOTONIC_CLOCK
LFP_REQUIRE_GETPEEREID
dnl Checks for types dnl Checks for types
dnl Configuration switches dnl Configuration switches
# LFP_ARG_ENABLE_EMULATED_SIGNALFD # LFP_ARG_ENABLE_EMULATED_SIGNALFD
AC_CONFIG_FILES([Makefile libfixposix.pc]) # Test suite.
LFP_TESTS_CHECK
AC_SUBST([BATSPATH], [$srcdir/src/tests/lib])
AC_CONFIG_FILES([Makefile
libfixposix.spec
src/libfixposix.pc
src/lib/buildinfo.c
src/include/lfp/time.h])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_OUTPUT AC_OUTPUT
libfixposix (0.4.3) unstable; urgency=low
* Release 0.4.3
-- Stelian Ionescu <sionescu@cddr.org> Mon, 19 Feb 2018 21:00:00 +0100
libfixposix (0.4.2) unstable; urgency=low
* Release 0.4.2
-- Stelian Ionescu <sionescu@cddr.org> Sat, 17 Feb 2018 15:00:00 +0100
libfixposix (0.4.1) unstable; urgency=low
* Release 0.4.1
-- Stelian Ionescu <sionescu@cddr.org> Thu, 23 Jun 2016 21:00:00 +0200
</