File: configure.ac

package info (click to toggle)
ctrlproxy 3.0.7-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 1,668 kB
  • ctags: 2,045
  • sloc: ansic: 15,358; sh: 2,805; xml: 1,078; python: 346; makefile: 302; perl: 18
file content (104 lines) | stat: -rw-r--r-- 2,684 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(ctrlproxy, 3.0.7, [jelmer@samba.org])
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE", [ Package name])

AC_SUBST(BZR_CHECKOUT)
BZR_CHECKOUT=no
AC_MSG_CHECKING([whether this is a bzr checkout])
if ! which bzr >/dev/null 2>/dev/null; then
	AC_MSG_RESULT(no)
else 
	BZR_CHECKOUT=yes
	REVISION="`bzr revno .`"
	if test -n "$REVISION"; then
		AC_MSG_RESULT($REVISION)
		BZRVERSION="-`bzr nick .`bzr-r$REVISION"
	else
		AC_MSG_RESULT(no)
	fi
fi

AC_DEFINE_UNQUOTED(VERSION,"$VERSION$BZRVERSION", [ Package version])
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_CONFIG_SRCDIR([src/admin-cmd.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PATH_PROG(LD,ld)
AC_PATH_PROG(IRCDTORTURE,ircdtorture)

AC_ARG_ENABLE(gcov,
[ --enable-gcov		Enable GCOV support ],
[ WITH_GCOV=1 ], [ WITH_GCOV=0 ])
AC_SUBST(WITH_GCOV)


# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(
[stdlib.h string.h unistd.h execinfo.h sys/time.h sys/socket.h syslog.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_TYPE_UID_T

# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_TYPE_SIGNAL

AC_CHECK_FUNCS([gethostbyname gethostname memset strchr strerror strstr uname backtrace_symbols gettimeofday strrchr daemon])

PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(COMMON, glib-2.0 >= 2.6.0 gmodule-2.0)
PKG_CHECK_MODULES(CHECK, check, [], [ echo -n "" ])

###############################################################################
# GNUTLS support
###############################################################################
PKG_CHECK_MODULES(GNUTLS, gnutls, [
		AC_DEFINE(HAVE_GNUTLS, 1, [Whether GNUTLS is available])
		SSL_OBJS="src/gnutls.o src/tlscert.o"
		AC_SUBST(SSL_OBJS)
		], [ AC_MSG_WARN([GNUTLS not found, SSL will not be available]) ])

AC_CHECK_LIB(readline, readline, [ 
	AC_DEFINE(HAVE_READLINE, 1, [Whether readline is available])
	BINS="$BINS linestack-cmd$ac_cv_exeext ctrlproxy-admin$ac_cv_exeext" 
	LIBS="$LIBS -lreadline"
])

###############################################################################
# SWIG support
###############################################################################
AC_PATH_PROG(SWIG,[swig])

AC_PATH_PROG(XSLTPROC, xsltproc)

AC_SUBST(XSLTPROC)

if test -n "$XSLTPROC"
then
	EXTRA_INSTALL_TARGETS="install-doc"
fi

AC_SUBST(EXTRA_INSTALL_TARGETS)

AC_SUBST(BINS)

AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extensions])

AC_CONFIG_FILES([Makefile.settings ctrlproxy.pc])
AC_OUTPUT