htparser: Add a `Server' header if none previously present.
[ashd.git] / configure.in
CommitLineData
f0bbedf7 1AC_INIT(src/htparser.c)
49c114a9 2AM_INIT_AUTOMAKE([ashd], [0.3])
0b26618e
FT
3AM_CONFIG_HEADER(config.h)
4
5AC_PROG_CC
f0bbedf7 6AM_PROG_CC_C_O
0b26618e 7AC_PROG_INSTALL
f0bbedf7 8AC_PROG_RANLIB
0b26618e
FT
9
10dnl Add for libtool:
11dnl AM_PROG_LIBTOOL
12
13AC_HEADER_STDC
14
5518f5b5
FT
15HAS_MAGIC=yes
16AC_CHECK_LIB(magic, magic_open, [:], [HAS_MAGIC=no])
17AC_CHECK_HEADER(magic.h, [], [HAS_MAGIC=no])
18if test "$HAS_MAGIC" = no; then
19 AC_MSG_ERROR([*** cannot find libmagic on this system])
20fi
21
0328ac04
FT
22AH_TEMPLATE(HAVE_XATTR, [define to compile support for filesystem extended attributes])
23AC_ARG_WITH(xattr, [ --with-xattr Enable XATTR support])
24HAS_XATTR=""
25if test "$with_xattr" = no; then HAS_XATTR=no; fi
26if test -z "$HAS_XATTR"; then
27 AC_CHECK_LIB(attr, getxattr, [:], [HAS_XATTR=no])
28fi
29if test -z "$HAS_XATTR"; then
30 AC_CHECK_HEADER(attr/xattr.h, [], [HAS_XATTR=no])
31fi
32if test "$HAS_XATTR" != no; then HAS_XATTR=yes; fi
33if test "$with_xattr" = yes -a "$HAS_XATTR" = no; then
34 AC_MSG_ERROR([*** cannot find xattr support on this system])
35fi
36if test "$HAS_XATTR" = yes; then
37 XATTR_LIBS=-lattr
38 AC_DEFINE(HAVE_XATTR)
39fi
40AC_SUBST(XATTR_LIBS)
41
6ca53b2e
FT
42AH_TEMPLATE(HAVE_GNUTLS, [define to use the GnuTLS library for SSL support])
43AC_ARG_WITH(gnutls, [ --with-gnutls Enable SSL support with the GnuTLS library])
44HAS_GNUTLS=""
45if test "$with_gnutls" = no; then HAS_GNUTLS=no; fi
46if test -z "$HAS_GNUTLS"; then
47 AC_CHECK_LIB(gnutls, gnutls_global_init, [:], [HAS_GNUTLS=no])
48fi
49if test -z "$HAS_GNUTLS"; then
50 AC_CHECK_HEADER(gnutls/gnutls.h, [], [HAS_GNUTLS=no])
51fi
52if test "$HAS_GNUTLS" != no; then HAS_GNUTLS=yes; fi
53if test "$with_gnutls" = yes -a "$HAS_GNUTLS" = no; then
54 AC_MSG_ERROR([*** cannot find GnuTLS on this system])
55fi
56if test "$HAS_GNUTLS" = yes; then
57 GNUTLS_LIBS=-lgnutls
58 GNUTLS_CPPFLAGS=-D_GNU_SOURCE
59 AC_DEFINE(HAVE_GNUTLS)
60fi
61AC_SUBST(GNUTLS_CPPFLAGS)
62AC_SUBST(GNUTLS_LIBS)
63
0b26618e
FT
64AC_OUTPUT([
65Makefile
66src/Makefile
600a1ce7 67src/dirplex/Makefile
f0bbedf7 68lib/Makefile
5c9badda 69doc/Makefile
0b26618e 70])