dirplex: Moved to its own directory and split off configuration code.
[ashd.git] / configure.in
CommitLineData
f0bbedf7
FT
1AC_INIT(src/htparser.c)
2AM_INIT_AUTOMAKE([ashd], [0.1])
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
0328ac04
FT
15AH_TEMPLATE(HAVE_XATTR, [define to compile support for filesystem extended attributes])
16AC_ARG_WITH(xattr, [ --with-xattr Enable XATTR support])
17HAS_XATTR=""
18if test "$with_xattr" = no; then HAS_XATTR=no; fi
19if test -z "$HAS_XATTR"; then
20 AC_CHECK_LIB(attr, getxattr, [:], [HAS_XATTR=no])
21fi
22if test -z "$HAS_XATTR"; then
23 AC_CHECK_HEADER(attr/xattr.h, [], [HAS_XATTR=no])
24fi
25if test "$HAS_XATTR" != no; then HAS_XATTR=yes; fi
26if test "$with_xattr" = yes -a "$HAS_XATTR" = no; then
27 AC_MSG_ERROR([*** cannot find xattr support on this system])
28fi
29if test "$HAS_XATTR" = yes; then
30 XATTR_LIBS=-lattr
31 AC_DEFINE(HAVE_XATTR)
32fi
33AC_SUBST(XATTR_LIBS)
34
6ca53b2e
FT
35AH_TEMPLATE(HAVE_GNUTLS, [define to use the GnuTLS library for SSL support])
36AC_ARG_WITH(gnutls, [ --with-gnutls Enable SSL support with the GnuTLS library])
37HAS_GNUTLS=""
38if test "$with_gnutls" = no; then HAS_GNUTLS=no; fi
39if test -z "$HAS_GNUTLS"; then
40 AC_CHECK_LIB(gnutls, gnutls_global_init, [:], [HAS_GNUTLS=no])
41fi
42if test -z "$HAS_GNUTLS"; then
43 AC_CHECK_HEADER(gnutls/gnutls.h, [], [HAS_GNUTLS=no])
44fi
45if test "$HAS_GNUTLS" != no; then HAS_GNUTLS=yes; fi
46if test "$with_gnutls" = yes -a "$HAS_GNUTLS" = no; then
47 AC_MSG_ERROR([*** cannot find GnuTLS on this system])
48fi
49if test "$HAS_GNUTLS" = yes; then
50 GNUTLS_LIBS=-lgnutls
51 GNUTLS_CPPFLAGS=-D_GNU_SOURCE
52 AC_DEFINE(HAVE_GNUTLS)
53fi
54AC_SUBST(GNUTLS_CPPFLAGS)
55AC_SUBST(GNUTLS_LIBS)
56
0b26618e
FT
57AC_OUTPUT([
58Makefile
59src/Makefile
600a1ce7 60src/dirplex/Makefile
f0bbedf7 61lib/Makefile
0b26618e 62])