Tizen 2.1 base
[external/libdaemon.git] / configure.ac
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
22 AC_PREREQ(2.63)
23
24 AC_INIT([libdaemon],[0.14],[mzqnrzba (at) 0pointer (dot) de])
25 AC_CONFIG_SRCDIR([libdaemon/dfork.c])
26 AC_CONFIG_HEADERS([config.h])
27 AC_CONFIG_MACRO_DIR([m4])
28
29 AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
30
31 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libdaemon/])
32
33 AC_SUBST(LIBDAEMON_VERSION_INFO, [5:0:5])
34
35 if 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}"
38 fi
39
40 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
41
42 # Checks for programs.
43 AC_PROG_CC
44 AC_PROG_CC_C99 dnl This enable gnu99 if present
45 AM_PROG_CC_C_O
46
47 AC_USE_SYSTEM_EXTENSIONS
48
49 AC_PROG_INSTALL
50 AC_PROG_LN_S
51 AC_PROG_MAKE_SET
52 AC_PROG_LIBTOOL
53
54 CC_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.
57 AC_HEADER_ASSERT
58 AC_HEADER_STDC
59 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h sys/ioctl.h sys/time.h])
60 AC_HEADER_SYS_WAIT
61
62 # Checks for typedefs, structures, and compiler characteristics.
63 AC_C_CONST
64 AC_TYPE_PID_T
65 AC_HEADER_TIME
66 AC_C_VOLATILE
67
68 # Checks for library functions.
69 AC_FUNC_FORK
70 AC_FUNC_SELECT_ARGTYPES
71 AC_FUNC_VPRINTF
72 AC_CHECK_FUNCS([select strerror dup2 memset strrchr asprintf])
73 AC_TYPE_MODE_T
74 AC_FUNC_SETPGRP
75 AC_TYPE_SIGNAL
76 AC_TYPE_SIZE_T
77
78 AC_SYS_LARGEFILE
79
80 CC_NOUNDEFINED
81
82 ZP_LYNX_DOC
83
84 AC_ARG_ENABLE(examples,
85        AS_HELP_STRING([--disable-examples], [Don't build examples during make]),,
86        enable_examples="yes")
87 AM_CONDITIONAL(EXAMPLES, [test "$enable_examples" = "yes"])
88
89 AC_CONFIG_FILES([libdaemon/Makefile Makefile doc/Makefile doc/README.html doc/doxygen.conf examples/Makefile pkgconfig/libdaemon.pc pkgconfig/libdaemon-uninstalled.pc])
90 AC_OUTPUT