source: trunk/third/libdaemon/configure.ac @ 20386

Revision 20386, 3.2 KB checked in by amb, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20385, which included commits to RCS files with non-trunk default branches.
Line 
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
22AC_PREREQ(2.59)
23AC_INIT([libdaemon],[0.6],[mzqnrzba (at) 0pointer (dot) de])
24AC_CONFIG_SRCDIR([src/dfork.c])
25AC_CONFIG_HEADERS([config.h])
26AM_INIT_AUTOMAKE([foreign -Wall])
27
28AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libdaemon/])
29
30if 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}"
33fi
34
35# Checks for programs.
36AC_PROG_CC
37AC_PROG_CXX
38AC_PROG_MAKE_SET
39AC_PROG_LIBTOOL()
40
41# If using GCC specifiy some additional parameters
42if test "x$GCC" = "xyes" ; then
43   CFLAGS="$CFLAGS -pipe -Wall"
44fi
45
46# Checks for header files.
47AC_HEADER_STDC
48AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h syslog.h unistd.h])
49AC_HEADER_SYS_WAIT
50
51# Checks for typedefs, structures, and compiler characteristics.
52AC_C_CONST
53AC_TYPE_PID_T
54AC_HEADER_TIME
55AC_C_VOLATILE
56
57# Checks for library functions.
58AC_FUNC_FORK
59AC_FUNC_SELECT_ARGTYPES
60AC_FUNC_VPRINTF
61AC_CHECK_FUNCS([select strerror dup2 memset strrchr])
62AC_TYPE_MODE_T
63
64# DOXYGEN documentation generation
65AC_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) ;;
71esac],[doxygen=yes])
72
73if 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
79fi
80
81AM_CONDITIONAL([USE_DOXYGEN], [test "x$doxygen" = xyes])
82
83# LYNX documentation generation
84AC_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) ;;
90esac],[lynx=yes])
91
92if 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
98fi
99
100AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
101
102AC_CONFIG_FILES([src/Makefile Makefile doc/Makefile doc/README.html doc/doxygen.conf examples/Makefile libdaemon.spec libdaemon.pc])
103AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.