1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3 4# This file is part of libdaemon. 5# 6# Copyright 2003-2008 Lennart Poettering 7# 8# libdaemon is free software; you can redistribute it and/or modify it 9# under the terms of the GNU Lesser General Public License as 10# published by the Free Software Foundation, either version 2.1 of the 11# License, or (at your option) any later version. 12# 13# libdaemon is distributed in the hope that it will be useful, but 14# WITHOUT ANY WARRANTY; without even the implied warranty of 15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16# Lesser General Public License for more details. 17# 18# You should have received a copy of the GNU Lesser General Public 19# License along with libdaemon. If not, see 20# <http://www.gnu.org/licenses/>. 21 22AC_PREREQ(2.63) 23 24AC_INIT([libdaemon],[0.14],[mzqnrzba (at) 0pointer (dot) de]) 25AC_CONFIG_SRCDIR([libdaemon/dfork.c]) 26AC_CONFIG_HEADERS([config.h]) 27AC_CONFIG_MACRO_DIR([m4]) 28 29AM_INIT_AUTOMAKE([foreign 1.10 -Wall]) 30 31AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libdaemon/]) 32 33AC_SUBST(LIBDAEMON_VERSION_INFO, [5:0:5]) 34 35if type -p stow > /dev/null && test -d /usr/local/stow ; then 36 AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) 37 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}" 38fi 39 40m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 41 42# Checks for programs. 43AC_PROG_CC 44AC_PROG_CC_C99 dnl This enable gnu99 if present 45AM_PROG_CC_C_O 46 47AC_USE_SYSTEM_EXTENSIONS 48 49AC_PROG_INSTALL 50AC_PROG_LN_S 51AC_PROG_MAKE_SET 52AC_PROG_LIBTOOL 53 54CC_CHECK_CFLAGS_APPEND([-pipe -Wall -W -Wextra -pedantic -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -Wstrict-aliasing]) 55 56# Checks for header files. 57AC_HEADER_ASSERT 58AC_HEADER_STDC 59AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sys/ioctl.h sys/time.h]) 60AC_HEADER_SYS_WAIT 61 62# Checks for typedefs, structures, and compiler characteristics. 63AC_C_CONST 64AC_TYPE_PID_T 65AC_HEADER_TIME 66AC_C_VOLATILE 67 68# Checks for library functions. 69AC_FUNC_FORK 70AC_FUNC_SELECT_ARGTYPES 71AC_FUNC_VPRINTF 72AC_CHECK_FUNCS([select strerror dup2 memset strrchr asprintf]) 73AC_TYPE_MODE_T 74AC_FUNC_SETPGRP 75AC_TYPE_SIGNAL 76AC_TYPE_SIZE_T 77 78AC_SYS_LARGEFILE 79 80CC_NOUNDEFINED 81 82ZP_LYNX_DOC 83 84AC_ARG_ENABLE(examples, 85 AS_HELP_STRING([--disable-examples], [Don't build examples during make]),, 86 enable_examples="yes") 87AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"]) 88 89AC_CONFIG_FILES([libdaemon/Makefile Makefile doc/Makefile doc/README.html doc/doxygen.conf examples/Makefile pkgconfig/libdaemon.pc pkgconfig/libdaemon-uninstalled.pc]) 90AC_OUTPUT 91