File: configure.ac

package info (click to toggle)
sbnc 1.2-26
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,216 kB
  • sloc: cpp: 17,556; ansic: 15,514; sh: 13,419; tcl: 5,567; php: 448; makefile: 284
file content (135 lines) | stat: -rw-r--r-- 3,587 bytes parent folder | download | duplicates (2)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(shroudbnc, 1.2, gb@prco23.org)

AM_INIT_AUTOMAKE(shroudbnc, 1.2)
AM_CONFIG_HEADER(config.h src/c-ares/config.h)

AC_PROG_MAKE_SET

PACKAGE=sbnc
VERSION=1.2

AC_PREFIX_DEFAULT([\${HOME}/sbnc])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB

AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([winsock.h net/if.h arpa/inet.h arpa/nameser.h arpa/nameser_compat.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset mkdir select socket strchr strcspn strdup strerror strstr strtoul poll])
AC_LIB_LTDL

AC_CHECK_LIB(iphlpapi, main)
AC_CHECK_LIB(ws2_32, main)
AC_CHECK_LIB(shlwapi, main)
AC_CHECK_LIB(advapi32, main)
AC_CHECK_LIB(ssl, SSL_new)
AC_CHECK_LIB(crypto, X509_NAME_oneline)
AC_CHECK_LIB(eay32, X509_NAME_oneline)

sinclude(./tcl.m4)

sinclude(./cares2.m4)
sinclude(./cares.m4)

CURL_CHECK_NONBLOCKING_SOCKET

SC_PATH_TCLCONFIG

SUBST_MOD_DIR=usr/lib/sbnc

BNCTCL_MODULE=

if test x"${no_tcl}" = x ; then
	SC_LOAD_TCLCONFIG

	if test \( "$TCL_MAJOR_VERSION" -lt 8 \) -o \( \( "$TCL_MAJOR_VERSION" -eq 8 \) -a \( "$TCL_MINOR_VERSION" -lt 3 \) \); then
		AC_MSG_WARN([You need at least TCL 8.3 for the tcl module.])
	else
		CFLAGS_TMP=$CFLAGS
		CFLAGS=$TCL_INCLUDE_SPEC
		AC_LANG_PUSH(C)
		AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <tcl.h>]], []), TCLINC=ok)
		AC_LANG_POP(C)
		CFLAGS=$CFLAGS_TMP
	
		if test x"${TCLINC}" != x ; then
			BNCTCL_MODULE="bnctcl scripts"
		else
			AC_MSG_WARN([TCL header files could not be found.])
		fi
	fi
else
	AC_MSG_WARN([TCL is not installed. TCL module support disabled.])
fi

SSLCFLAGS=
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <openssl/ssl.h>]], []), [ USESSL=yes ], [ USESSL=no; AC_MSG_WARN([You need the OpenSSL headers for SSL support. SSL support has been disabled.]) ])

if test ${USESSL} = yes; then
	AC_CHECK_HEADERS([openssl/ssl.h])
	AC_CHECK_LIB(ssl, SSL_new, [ SSLCFLAGS=-DUSESSL ], AC_MSG_WARN([You need the OpenSSL libraries for SSL support. SSL support has been disabled.]))

	if test x"${SSLCFLAGS}" != x; then
		SSLLDFLAGS=-lssl
	fi
fi

AC_CHECK_LIB(ws2_32, main, [ IDENTD_MODULE=identd32; LIBS += -lws2_32 ], [ IDENTD_MODULE="" ])
AC_ARG_WITH(identd, enabled building the identd module (enabled by default if possible), [ IDENTD_MODULE="identd32" ])

AC_SUBST(TCL_INCLUDE_SPEC)
AC_SUBST(TCL_LIBS)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(BNCTCL_MODULE)
AC_SUBST(SSLCFLAGS)
AC_SUBST(SSLLDFLAGS)
AC_SUBST(SUBST_MOD_DIR)
AC_SUBST(IDENTD_MODULE)

AC_CONFIG_FILES([Makefile \
                 scripts/Makefile \
                 src/c-ares/Makefile \
                 src/snprintf/Makefile \
                 src/rpc/Makefile \
                 bnctcl/Makefile \
                 src/sbncloader/Makefile \
                 src/Makefile \
                 src/md5/Makefile \
                 identd32/Makefile \
                 php/Makefile \
                 bncmysql/Makefile])
AC_OUTPUT