source: trunk/third/ifplugd/configure.ac @ 20388

Revision 20388, 5.2 KB checked in by amb, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20387, 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:09:15 amb Exp $
5
6# This file is part of ifplugd.
7#
8# ifplugd 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# ifplugd 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 ifplugd; 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([ifplugd],[0.23],[mzvscyhtq (at) 0pointer (dot) de])
24AC_CONFIG_SRCDIR([src/ifplugd.c])
25AC_CONFIG_HEADERS([config.h])
26AM_INIT_AUTOMAKE([foreign -Wall])
27
28AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/ifplugd/])
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_CXX
37AC_PROG_CC
38AC_PROG_CPP
39AC_PROG_INSTALL
40AC_PROG_LN_S
41AC_PROG_MAKE_SET
42
43# If using GCC specifiy some additional parameters
44if test "x$GCC" = "xyes" ; then
45   CFLAGS="$CFLAGS -pipe -Wall"
46fi
47
48# Checks for header files.
49AC_HEADER_STDC
50AC_HEADER_SYS_WAIT
51AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/time.h syslog.h unistd.h])
52
53# Checks for typedefs, structures, and compiler characteristics.
54AC_C_CONST
55AC_TYPE_PID_T
56AC_HEADER_TIME
57AC_C_VOLATILE
58
59# Checks for library functions.
60AC_FUNC_FORK
61AC_PROG_GCC_TRADITIONAL
62AC_FUNC_SELECT_ARGTYPES
63AC_FUNC_MALLOC
64AC_TYPE_SIGNAL
65AC_FUNC_VPRINTF
66AC_CHECK_FUNCS([alarm dup2 memset select setenv socket strchr strdup strerror strrchr strspn])
67
68PKG_CHECK_MODULES(LIBDAEMON, [ libdaemon >= 0.5 ])
69AC_SUBST(LIBDAEMON_CFLAGS)
70AC_SUBST(LIBDAEMON_LIBS)
71
72# Init script location
73AC_ARG_WITH(initdir, AS_HELP_STRING(--with-initdir=DIR,Install init script in DIR (system dependent default)))
74
75test "x$with_initdir" = xyes -o "x$with_initdir" = xno && with_initdir=
76
77if test "x$with_initdir" = x ; then
78    if test -d /etc/init.d ; then
79        SYSINITDIR=/etc/init.d
80    else
81        if test -d /etc/rc.d/init.d ; then
82                SYSINITDIR=/etc/rc.d/init.d
83        else
84                AC_MSG_ERROR([missing --with-initdir=DIR])
85            fi
86    fi
87else
88   SYSINITDIR="$with_initdir"
89fi
90
91AC_MSG_NOTICE([*** Init sript will be installed in $SYSINITDIR ***])
92AC_SUBST(SYSINITDIR)
93
94# LYNX documentation generation
95AC_ARG_ENABLE(lynx,
96        AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
97[case "${enableval}" in
98  yes) lynx=yes ;;
99  no)  lynx=no ;;
100  *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
101esac],[lynx=yes])
102
103if test x$lynx = xyes ; then
104   AC_CHECK_PROG(have_lynx, lynx, yes, no)
105
106   if test x$have_lynx = xno ; then
107     AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
108   fi
109fi
110
111AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
112
113# XMLTOMAN manpage generation
114AC_ARG_ENABLE(xmltoman,
115        AS_HELP_STRING(--disable-xmltoman,Disable rebuilding of man pages with xmltoman),
116[case "${enableval}" in
117  yes) xmltoman=yes ;;
118  no)  xmltoman=no ;;
119  *) AC_MSG_ERROR([bad value ${enableval} for --disable-xmltoman]) ;;
120esac],[xmltoman=yes])
121
122if test x$xmltoman = xyes ; then
123   AC_CHECK_PROG(have_xmltoman, xmltoman, yes, no)
124
125   if test x$have_xmltoman = xno ; then
126     AC_MSG_WARN([*** Not rebuilding man pages as xmltoman is not found ***])
127     xmltoman=no
128   fi
129fi
130
131AM_CONDITIONAL([USE_XMLTOMAN], [test "x$xmltoman" = xyes])
132
133# subversion release number generation
134AC_ARG_ENABLE(subversion,
135        AS_HELP_STRING(--disable-subversion,Disable rebuilding of svn-release.h),
136[case "${enableval}" in
137  yes) subversion=yes ;;
138  no)  subversion=no ;;
139  *) AC_MSG_ERROR([bad value ${enableval} for --disable-subversion]) ;;
140esac],[subversion=yes])
141                                                                                                                                                                                     
142if test x$subversion = xyes ; then
143   AC_CHECK_PROG(have_subversion, svn, yes, no)
144                                                                                                                                                                                     
145   if test x$have_subversion = xno ; then
146     AC_MSG_WARN([*** Not rebuilding svn-release.h as subversion is not found ***])
147     subversion=no
148   fi
149fi
150                                                                                                                                                                                     
151AM_CONDITIONAL([USE_SUBVERSION], [test "x$subversion" = xyes])
152
153AC_CONFIG_FILES([src/Makefile Makefile man/Makefile conf/Makefile doc/Makefile doc/README.html patches/Makefile ifplugd.spec])
154AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.