Commit | Line | Data |
---|---|---|
f0bbedf7 | 1 | AC_INIT(src/htparser.c) |
46db3a23 | 2 | AM_INIT_AUTOMAKE([ashd], [0.6]) |
0b26618e FT |
3 | AM_CONFIG_HEADER(config.h) |
4 | ||
5 | AC_PROG_CC | |
f0bbedf7 | 6 | AM_PROG_CC_C_O |
0b26618e | 7 | AC_PROG_INSTALL |
f0bbedf7 | 8 | AC_PROG_RANLIB |
0b26618e FT |
9 | |
10 | dnl Add for libtool: | |
11 | dnl AM_PROG_LIBTOOL | |
12 | ||
13 | AC_HEADER_STDC | |
14 | ||
5518f5b5 FT |
15 | HAS_MAGIC=yes |
16 | AC_CHECK_LIB(magic, magic_open, [:], [HAS_MAGIC=no]) | |
17 | AC_CHECK_HEADER(magic.h, [], [HAS_MAGIC=no]) | |
18 | if test "$HAS_MAGIC" = no; then | |
19 | AC_MSG_ERROR([*** cannot find libmagic on this system]) | |
20 | fi | |
21 | ||
28260620 FT |
22 | AH_TEMPLATE(HAVE_VALGRIND, [define to include debugging support for Valgrind]) |
23 | AC_CHECK_HEADER(valgrind/memcheck.h, [AC_DEFINE(HAVE_VALGRIND)], []) | |
24 | ||
16accb88 FT |
25 | AH_TEMPLATE(HAVE_EPOLL, [define to enable epoll support]) |
26 | AC_ARG_WITH(epoll, [ --with-epoll Enable epoll(2) support]) | |
27 | HAS_EPOLL="" | |
28 | if test "$with_epoll" = no; then HAS_EPOLL=no; fi | |
29 | if test -z "$HAS_EPOLL"; then | |
30 | AC_CHECK_LIB(c, epoll_ctl, [:], [HAS_EPOLL=no]) | |
31 | fi | |
32 | if test -z "$HAS_EPOLL"; then | |
33 | AC_CHECK_HEADER(sys/epoll.h, [], [HAS_EPOLL=no]) | |
34 | fi | |
35 | if test "$HAS_EPOLL" != no; then HAS_EPOLL=yes; fi | |
36 | if test "$with_epoll" = yes -a "$HAS_EPOLL" = no; then | |
37 | AC_MSG_ERROR([*** cannot find epoll support on this system]) | |
38 | fi | |
39 | if test "$HAS_EPOLL" = yes; then | |
40 | AC_DEFINE(HAVE_EPOLL) | |
41 | fi | |
42 | ||
0328ac04 FT |
43 | AH_TEMPLATE(HAVE_XATTR, [define to compile support for filesystem extended attributes]) |
44 | AC_ARG_WITH(xattr, [ --with-xattr Enable XATTR support]) | |
45 | HAS_XATTR="" | |
46 | if test "$with_xattr" = no; then HAS_XATTR=no; fi | |
47 | if test -z "$HAS_XATTR"; then | |
48 | AC_CHECK_LIB(attr, getxattr, [:], [HAS_XATTR=no]) | |
49 | fi | |
50 | if test -z "$HAS_XATTR"; then | |
51 | AC_CHECK_HEADER(attr/xattr.h, [], [HAS_XATTR=no]) | |
52 | fi | |
53 | if test "$HAS_XATTR" != no; then HAS_XATTR=yes; fi | |
54 | if test "$with_xattr" = yes -a "$HAS_XATTR" = no; then | |
55 | AC_MSG_ERROR([*** cannot find xattr support on this system]) | |
56 | fi | |
57 | if test "$HAS_XATTR" = yes; then | |
58 | XATTR_LIBS=-lattr | |
59 | AC_DEFINE(HAVE_XATTR) | |
60 | fi | |
61 | AC_SUBST(XATTR_LIBS) | |
62 | ||
6ca53b2e FT |
63 | AH_TEMPLATE(HAVE_GNUTLS, [define to use the GnuTLS library for SSL support]) |
64 | AC_ARG_WITH(gnutls, [ --with-gnutls Enable SSL support with the GnuTLS library]) | |
65 | HAS_GNUTLS="" | |
66 | if test "$with_gnutls" = no; then HAS_GNUTLS=no; fi | |
67 | if test -z "$HAS_GNUTLS"; then | |
68 | AC_CHECK_LIB(gnutls, gnutls_global_init, [:], [HAS_GNUTLS=no]) | |
69 | fi | |
70 | if test -z "$HAS_GNUTLS"; then | |
71 | AC_CHECK_HEADER(gnutls/gnutls.h, [], [HAS_GNUTLS=no]) | |
72 | fi | |
73 | if test "$HAS_GNUTLS" != no; then HAS_GNUTLS=yes; fi | |
74 | if test "$with_gnutls" = yes -a "$HAS_GNUTLS" = no; then | |
75 | AC_MSG_ERROR([*** cannot find GnuTLS on this system]) | |
76 | fi | |
77 | if test "$HAS_GNUTLS" = yes; then | |
78 | GNUTLS_LIBS=-lgnutls | |
79 | GNUTLS_CPPFLAGS=-D_GNU_SOURCE | |
80 | AC_DEFINE(HAVE_GNUTLS) | |
81 | fi | |
82 | AC_SUBST(GNUTLS_CPPFLAGS) | |
83 | AC_SUBST(GNUTLS_LIBS) | |
84 | ||
0b26618e FT |
85 | AC_OUTPUT([ |
86 | Makefile | |
87 | src/Makefile | |
600a1ce7 | 88 | src/dirplex/Makefile |
f0bbedf7 | 89 | lib/Makefile |
5c9badda | 90 | doc/Makefile |
0b26618e | 91 | ]) |