1 |
dnl -*- Autoconf -*-
|
2 |
dnl Process this file with autoconf to produce a configure script.
|
3 |
|
4 |
AC_INIT([Undernet IRCD proxy scanner],[2.0],[mbuna@bugged.org],[pxyservd])
|
5 |
AM_INIT_AUTOMAKE
|
6 |
AC_CONFIG_SRCDIR([src/pxyservd.c])
|
7 |
AM_CONFIG_HEADER([config.h])
|
8 |
AC_CONFIG_SUBDIRS([libbcl])
|
9 |
AM_MAINTAINER_MODE
|
10 |
|
11 |
dnl Checks for programs.
|
12 |
AC_PROG_CC
|
13 |
AC_PROG_MAKE_SET
|
14 |
AC_CACHE_SAVE
|
15 |
|
16 |
dnl Checks for libraries.
|
17 |
AC_PATH_GENERIC(dbprim, 0.9.1, [
|
18 |
XIPH_VAR_APPEND([CFLAGS], [$DBPRIM_CFLAGS])
|
19 |
XIPH_VAR_APPEND([CFLAGS], [$DBPRIM_CFLAGS/dbprim])
|
20 |
XIPH_VAR_PREPEND([LIBS], [$DBPRIM_LIBS])
|
21 |
], [
|
22 |
dbprim_ldadd="../dbprim/.libs/libdbprim.a"
|
23 |
AC_SUBST(dbprim_ldadd)
|
24 |
AC_CONFIG_SUBDIRS([dbprim])
|
25 |
XIPH_VAR_APPEND([CFLAGS], [-I..])
|
26 |
XIPH_VAR_APPEND([CFLAGS], [-I../dbprim])
|
27 |
AC_MSG_NOTICE([Will use dbprim provided in this package (static linkage)])
|
28 |
])
|
29 |
|
30 |
XIPH_VAR_APPEND([CFLAGS], [-I../../libpeak])
|
31 |
XIPH_VAR_PREPEND([LIBS], [../../libpeak/peak/.libs/libpeak.a])
|
32 |
|
33 |
AC_PATH_GENERIC(xml2, 2.0.0,, AC_ERROR([required XML Library (libxml2) not found - See http://xmlsoft.org]))
|
34 |
XIPH_VAR_APPEND([CFLAGS], [$XML2_CFLAGS])
|
35 |
XIPH_VAR_PREPEND([LIBS], [$XML2_LIBS])
|
36 |
|
37 |
XIPH_VAR_APPEND([CFLAGS], [-I../../ipcache])
|
38 |
XIPH_VAR_APPEND([CFLAGS], [-I../../libopas])
|
39 |
|
40 |
dnl Checks for header files
|
41 |
AC_HEADER_STDC
|
42 |
AC_CHECK_HEADERS([signal.h])
|
43 |
|
44 |
dnl Checks for typedefs, structures, and compiler characteristics.
|
45 |
AC_C_INLINE
|
46 |
|
47 |
dnl Checks for library functions.
|
48 |
AC_FUNC_ALLOCA
|
49 |
AC_FUNC_FORK
|
50 |
AC_CHECK_FUNCS([gethostbyname gettimeofday memset select socket strerror])
|
51 |
AC_CHECK_FUNCS([strerror_r])
|
52 |
|
53 |
dnl The --enable-debug option
|
54 |
AC_MSG_CHECKING([whether to enable debug mode])
|
55 |
AC_ARG_ENABLE([debug],
|
56 |
[ --enable-debug turn on debugging mode],
|
57 |
[pxyservd_cv_enable_debug=$enable_debug],
|
58 |
[AC_CACHE_VAL(pxyservd_cv_enable_debug,
|
59 |
[pxyservd_cv_enable_debug=no])])
|
60 |
AC_MSG_RESULT([$pxyservd_cv_enable_debug])
|
61 |
if test x"$pxyservd_cv_enable_debug" = xyes; then
|
62 |
AC_DEFINE([DEBUG], , [Enable debugging code])
|
63 |
fi
|
64 |
|
65 |
dnl The --with-maxnicklen: maximum nick length supported
|
66 |
pxyservd_maxnicklen=15
|
67 |
AC_MSG_CHECKING([maximum nick length])
|
68 |
AC_ARG_WITH([maxnicklen],
|
69 |
[ --with-maxnicklen=NUMBER maximum nick length of network clients [[default=15]]],
|
70 |
[pxyservd_cv_with_maxnicklen=$with_maxnicklen],
|
71 |
[AC_CACHE_VAL(pxyservd_cv_with_maxnicklen,
|
72 |
[pxyservd_cv_with_maxnicklen=$pxyservd_maxnicklen])])
|
73 |
if test x"$pxyservd_cv_with_maxnicklen" = xyes -o "$pxyservd_cv_with_maxnicklen" = xno; then
|
74 |
pxyservd_cv_with_maxnicklen=$pxyservd_maxnicklen
|
75 |
fi
|
76 |
AC_MSG_RESULT([$pxyservd_cv_with_maxnicklen])
|
77 |
AC_DEFINE_UNQUOTED(NICKLEN, $pxyservd_cv_with_maxnicklen,
|
78 |
[Maximum nick length of network clients])
|
79 |
|
80 |
|
81 |
AC_CONFIG_FILES([Makefile src/Makefile])
|
82 |
AC_OUTPUT
|
83 |
|