1 | # -*- Autoconf -*- |
---|
2 | # Process this file with autoconf to produce a configure script. |
---|
3 | |
---|
4 | # $Id: configure.ac,v 1.1.1.1 2004-04-09 20:08:38 amb Exp $ |
---|
5 | |
---|
6 | # This file is part of libdaemon. |
---|
7 | # |
---|
8 | # libdaemon is free software; you can redistribute it and/or modify it |
---|
9 | # under the terms of the GNU General Public License as published by |
---|
10 | # the Free Software Foundation; either version 2 of the License, or |
---|
11 | # (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 | # General Public License for more details. |
---|
17 | # |
---|
18 | # You should have received a copy of the GNU General Public License |
---|
19 | # along with libdaemon; if not, write to the Free Software Foundation, |
---|
20 | # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
---|
21 | |
---|
22 | AC_PREREQ(2.59) |
---|
23 | AC_INIT([libdaemon],[0.6],[mzqnrzba (at) 0pointer (dot) de]) |
---|
24 | AC_CONFIG_SRCDIR([src/dfork.c]) |
---|
25 | AC_CONFIG_HEADERS([config.h]) |
---|
26 | AM_INIT_AUTOMAKE([foreign -Wall]) |
---|
27 | |
---|
28 | AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libdaemon/]) |
---|
29 | |
---|
30 | if type -p stow > /dev/null && test -d /usr/local/stow ; then |
---|
31 | AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) |
---|
32 | ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}" |
---|
33 | fi |
---|
34 | |
---|
35 | # Checks for programs. |
---|
36 | AC_PROG_CC |
---|
37 | AC_PROG_CXX |
---|
38 | AC_PROG_MAKE_SET |
---|
39 | AC_PROG_LIBTOOL() |
---|
40 | |
---|
41 | # If using GCC specifiy some additional parameters |
---|
42 | if test "x$GCC" = "xyes" ; then |
---|
43 | CFLAGS="$CFLAGS -pipe -Wall" |
---|
44 | fi |
---|
45 | |
---|
46 | # Checks for header files. |
---|
47 | AC_HEADER_STDC |
---|
48 | AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h]) |
---|
49 | AC_HEADER_SYS_WAIT |
---|
50 | |
---|
51 | # Checks for typedefs, structures, and compiler characteristics. |
---|
52 | AC_C_CONST |
---|
53 | AC_TYPE_PID_T |
---|
54 | AC_HEADER_TIME |
---|
55 | AC_C_VOLATILE |
---|
56 | |
---|
57 | # Checks for library functions. |
---|
58 | AC_FUNC_FORK |
---|
59 | AC_FUNC_SELECT_ARGTYPES |
---|
60 | AC_FUNC_VPRINTF |
---|
61 | AC_CHECK_FUNCS([select strerror dup2 memset strrchr]) |
---|
62 | AC_TYPE_MODE_T |
---|
63 | |
---|
64 | # DOXYGEN documentation generation |
---|
65 | AC_ARG_ENABLE(doxygen, |
---|
66 | AS_HELP_STRING(--disable-doxygen,Turn off doxygen usage for documentation generation), |
---|
67 | [case "${enableval}" in |
---|
68 | yes) doxygen=yes ;; |
---|
69 | no) doxygen=no ;; |
---|
70 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-doxygen) ;; |
---|
71 | esac],[doxygen=yes]) |
---|
72 | |
---|
73 | if test x$doxygen = xyes ; then |
---|
74 | AC_CHECK_PROG(have_doxygen, doxygen, yes, no) |
---|
75 | |
---|
76 | if test x$have_doxygen = xno ; then |
---|
77 | AC_MSG_ERROR([*** Sorry, you have to install doxygen or use --disable-doxygen ***]) |
---|
78 | fi |
---|
79 | fi |
---|
80 | |
---|
81 | AM_CONDITIONAL([USE_DOXYGEN], [test "x$doxygen" = xyes]) |
---|
82 | |
---|
83 | # LYNX documentation generation |
---|
84 | AC_ARG_ENABLE(lynx, |
---|
85 | AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation), |
---|
86 | [case "${enableval}" in |
---|
87 | yes) lynx=yes ;; |
---|
88 | no) lynx=no ;; |
---|
89 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;; |
---|
90 | esac],[lynx=yes]) |
---|
91 | |
---|
92 | if test x$lynx = xyes ; then |
---|
93 | AC_CHECK_PROG(have_lynx, lynx, yes, no) |
---|
94 | |
---|
95 | if test x$have_lynx = xno ; then |
---|
96 | AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***]) |
---|
97 | fi |
---|
98 | fi |
---|
99 | |
---|
100 | AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes]) |
---|
101 | |
---|
102 | AC_CONFIG_FILES([src/Makefile Makefile doc/Makefile doc/README.html doc/doxygen.conf examples/Makefile libdaemon.spec libdaemon.pc]) |
---|
103 | AC_OUTPUT |
---|