1 # Process this file with autoconf to produce a configure script.
2 # Copyright (C) 2002, 2003 Simon Josefsson.
4 # This file is part of Shishi.
6 # Shishi is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # Shishi is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Shishi; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
22 AC_INIT(shishi, 0.0.0, bug-shishi@josefsson.org)
24 # Interfaces removed: CURRENT++, AGE=0, REVISION=0
25 # Interfaces added: CURRENT++, AGE++, REVISION=0
26 # No interfaces changed: REVISION++
34 AM_INIT_AUTOMAKE(gnits)
35 AM_CONFIG_HEADER(config.h)
37 # Checks for programs.
38 AM_GNU_GETTEXT(use-libtool, need-ngettext)
39 AM_GNU_GETTEXT_VERSION(0.11.5)
42 AM_MISSING_PROG(PERL, perl, $missing_dir)
43 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
44 AM_MISSING_PROG(TEXI2PDF, texi2pdf, $missing_dir)
45 AM_MISSING_PROG(DOCBOOK2TXT, docbook2txt, $missing_dir)
46 AM_MISSING_PROG(DOCBOOK2HTML, docbook2html, $missing_dir)
47 AM_MISSING_PROG(DOCBOOK2PS, docbook2ps, $missing_dir)
48 AM_MISSING_PROG(DOCBOOK2PDF, docbook2pdf, $missing_dir)
49 AM_MISSING_PROG(ASN1PARSER, asn1Parser, $missing_dir)
52 # Checks for header files.
54 AC_CHECK_HEADERS([stdlib.h memory.h string.h strings.h sys/socket.h unistd.h])
55 AC_CHECK_HEADERS(getopt.h unistd.h strings.h netdb.h time.h sys/poll.h \
56 sys/time.h sys/types.h sys/select.h sys/socket.h sys/stat.h stdint.h \
57 termios.h signal.h pwd.h errno.h syslog.h)
58 AC_CHECK_HEADERS(netinet/in.h netinet/in6.h arpa/inet.h)
60 # Checks for typedefs, structures, and compiler characteristics.
66 AC_CHECK_DECLS(h_errno)
67 AC_CHECK_TYPE([socklen_t],, [AC_DEFINE([socklen_t], [size_t],
68 [Define to `size_t' if `socklen_t' is missing.])], [
69 #ifdef HAVE_SYS_TYPES_H
70 #include <sys/types.h>
72 #ifdef HAVE_SYS_SOCKET_H
73 #include <sys/socket.h>
82 AC_HELP_STRING([--disable-pam], [Don't use PAM even if available]))
83 if test "$enable_pam" != "no"; then
84 AC_CHECK_HEADERS(security/pam_appl.h)
85 AC_CHECK_HEADERS(security/pam_modules.h, [], [],
87 #if HAVE_SECURITY_PAM_APPL_H
88 #include <security/pam_appl.h>
91 AC_CHECK_HEADERS(security/_pam_macros.h)
92 enable_pam=$ac_cv_header_security_pam_modules_h
94 if test "$enable_pam" != "no"; then
97 AC_MSG_WARN([[The Shishi PAM module will not be built.]])
100 AC_MSG_CHECKING([if PAM should be used])
101 AC_MSG_RESULT($enable_pam)
105 AC_HELP_STRING([--disable-ipv6], [Don't use IPv6 even if available]))
106 if test "$enable_ipv6" != "no"; then
108 AC_CHECK_DECLS([AF_INET6, IN6ADDR_ANY_INIT],,enable_ipv6=no,[
109 #ifdef HAVE_SYS_TYPES_H
110 #include <sys/types.h>
112 #ifdef HAVE_SYS_SOCKET_H
113 #include <sys/socket.h>
115 #ifdef HAVE_NETINET_IN_H
116 #include <netinet/in.h>
118 #ifdef HAVE_NETINET_IN6_H
119 #include <netinet/in6.h>
122 AC_CHECK_TYPE(struct sockaddr_in6,,enable_ipv6=no,[
123 #ifdef HAVE_SYS_TYPES_H
124 #include <sys/types.h>
126 #ifdef HAVE_SYS_SOCKET_H
127 #include <sys/socket.h>
129 #ifdef HAVE_NETINET_IN_H
130 #include <netinet/in.h>
132 #ifdef HAVE_NETINET_IN6_H
133 #include <netinet/in6.h>
137 if test "$enable_ipv6" != "no"; then
138 AC_DEFINE(WITH_IPV6, 1, [Define to 1 if you want IPv6.])
140 AC_MSG_WARN([[IPv6 support is disabled.]])
142 AC_MSG_CHECKING([if IPv6 should be used])
143 AC_MSG_RESULT($enable_ipv6)
145 # Test if the libc includes a good enough argp.
146 AC_ARG_WITH(system-argp,
147 AC_HELP_STRING([--without-system-argp], [Don't use the system's argp]))
148 if test "$with_system_argp" != "no" ; then
149 AC_LIB_ARGP(,with_system_argp=no)
151 if test "$with_system_argp" = "no" ; then
152 ARGP_LIBS="\$(top_builddir)/argp/libargp.a"
153 ARGP_CFLAGS="-I\$(top_srcdir)/argp"
158 AC_SUBST(ARGP_CFLAGS)
159 AC_CONFIG_SUBDIRS(argp)
162 #AC_ARG_WITH(system-gdbm,
163 # AC_HELP_STRING([--without-system-gdbm], [Don't use the system's gdbm]))
164 #if test "$with_system_gdbm" != "no" ; then
165 # AC_CHECK_LIB(gdbm, gdbm_open,,with_system_gdbm=no)
168 #if test "$with_system_gdbm" = "no" ; then
169 # LIBGDBM="\$(top_builddir)/gdbm/libgdbm.a"
170 # CFLAGS="$CFLAGS -I\$(top_srcdir)/gdbm"
177 AC_ARG_WITH(system-idn,
178 AC_HELP_STRING([--without-system-idn],
179 [don't use the system's libidn]))
180 if test "$with_system_idn" != "no" ; then
181 PKG_CHECK_MODULES(LIBIDN, libidn >= 0.1.0,
185 if test "$with_system_idn" = "no"; then
188 The system's libidn 0.1.0 or later not used. Using copy distributed
189 with Shishi instead. See <http://www.gnu.org/software/libidn/>.
192 LIBIDN_CFLAGS="-I\$(top_srcdir)/libstringprep"
193 LIBIDN_LIBS="\$(top_builddir)/libstringprep/libidn.la"
196 AC_SUBST(LIBIDN_CFLAGS)
197 AC_SUBST(LIBIDN_LIBS)
199 AC_MSG_CHECKING([if system's libidn should be used])
200 AC_MSG_RESULT($with_system_idn)
201 AC_CONFIG_SUBDIRS(libstringprep)
204 AC_ARG_WITH(system-libtasn1,
205 AC_HELP_STRING([--without-system-libtasn1],
206 [don't use the system's libtasn1]))
207 if test "$with_system_libtasn1" != "no" ; then
208 AC_CHECK_LIB(tasn1, asn1_read_tag, [
209 LIBTASN1_LIBS="-ltasn1"
211 with_system_libtasn1=yes
213 with_system_libtasn1=no
216 if test "$with_system_libtasn1" = "no"; then
219 The system's libtasn1 0.2.0 or later not used. Using copy distributed
220 with Shishi instead. See <http://www.gnu.org/software/gnutls/>.
223 LIBTASN1_CFLAGS="-I\$(top_srcdir)/asn1/lib"
224 LIBTASN1_LIBS="\$(top_builddir)/asn1/lib/libtasn1.la"
227 AC_SUBST(LIBTASN1_CFLAGS)
228 AC_SUBST(LIBTASN1_LIBS)
230 AC_MSG_CHECKING([if system's libtasn1 should be used])
231 AC_MSG_RESULT($with_system_libtasn1)
232 AC_CONFIG_SUBDIRS(asn1)
234 # Check for libgcrypt
235 AC_ARG_WITH(system-libgcrypt,
236 AC_HELP_STRING([--without-system-libgcrypt],
237 [don't use the system's libgcrypt]))
238 if test "$with_system_libgcrypt" != "no" ; then
239 AM_PATH_LIBGCRYPT(1.1.13, [
240 with_system_libgcrypt=yes
242 with_system_libgcrypt=no
245 if test "$with_system_libgcrypt" = "no"; then
248 The system's libgcrypt 1.1.13 or later not used. Using copy distributed
249 with shishi instead. See <ftp://ftp.gnupg.org/pub/gcrypt/alpha/libgcrypt/>.
252 LIBGCRYPT_CFLAGS="-I\$(top_srcdir)/crypto/src"
253 LIBGCRYPT_LIBS="\$(top_builddir)/crypto/src/libgcrypt.la"
256 AC_SUBST(LIBGCRYPT_CFLAGS)
257 AC_SUBST(LIBGCRYPT_LIBS)
259 AC_MSG_CHECKING([if system's libgcrypt should be used])
260 AC_MSG_RESULT($with_system_libgcrypt)
261 AC_CONFIG_SUBDIRS(crypto)
263 # Checks for library functions.
265 AC_CHECK_FUNCS(signal select ngettext gethostbyname)
266 AC_REPLACE_FUNCS(setenv unsetenv strdup memmove memset strcasecmp \
267 strerror gethostname)
269 # Configure extra tools
270 enable_ftpd=no; export enable_ftpd
271 enable_inetd=no; export enable_inetd
272 enable_rexecd=no; export enable_rexecd
273 enable_rlogind=no; export enable_rlogind
274 enable_rshd=no; export enable_rshd
275 enable_syslogd=no; export enable_syslogd
276 enable_talkd=no; export enable_talkd
277 enable_telnetd=yes; export enable_telnetd
278 enable_tftpd=no; export enable_tftpd
279 enable_uucpd=no; export enable_uucpd
280 enable_ftp=no; export enable_ftp
281 enable_ping=no; export enable_ping
282 enable_rcp=no; export enable_rcp
283 enable_rlogin=no; export enable_rlogin
284 enable_rsh=yes; export enable_rsh
285 enable_logger=no; export enable_logger
286 enable_talk=no; export enable_talk
287 enable_telnet=yes; export enable_telnet
288 enable_tftp=no; export enable_tftp
289 enable_whois=no; export enable_whois
290 enable_ifconfig=no; export enable_ifconfig
291 enable_authentication=yes; export enable_authentication
292 enable_encryption=yes; export enable_encryption
293 with_shishi=yes; export with_shishi
294 AC_CONFIG_SUBDIRS(extra/inetutils)
297 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
298 if test "x$with_html_dir" = "x" ; then
299 HTML_DIR='${datadir}/gtk-doc/html'
301 HTML_DIR=$with_html_dir
304 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
305 gtk_doc_min_version=0.6
307 gtk_doc_version=`gtkdoc-mkdb --version`
308 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
310 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
311 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
320 # Let people disable the gtk-doc stuff.
321 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
322 if test x$enable_gtk_doc = xauto ; then
323 if test x$GTKDOC = xtrue ; then
329 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
331 AC_CONFIG_FILES(Makefile intl/Makefile po/Makefile.in m4/Makefile \
332 lib/Makefile lib/shishi.h src/Makefile tests/Makefile doc/Makefile \
333 doc/reference/Makefile extra/Makefile extra/pam_shishi/Makefile \
334 shishi.pc shishi.conf shishi.skel)