ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.3/configure.ac
Revision: 924
Committed: Mon Nov 12 20:31:07 2007 UTC (16 years, 5 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.2/configure.ac
File size: 6773 byte(s)
Log Message:
- Added back --enable-assert

File Contents

# Content
1 # Inspired by work Copyright (C) 2006 Luca Filipozzi
2 # vim: set fdm=marker ts=2 sw=2 et:
3
4 AC_PREREQ(2.59)
5 AC_INIT([ircd-hybrid], [7.2.4])
6 AM_INIT_AUTOMAKE
7 AM_MAINTAINER_MODE
8 AC_CONFIG_HEADER(config.h)
9 AC_CONFIG_SRCDIR(src/ircd.c)
10
11
12 #ltdl stuff
13 AC_LIBLTDL_CONVENIENCE
14 AC_SUBST(INCLTDL)
15 AC_SUBST(LIBLTDL)
16 AC_LIBTOOL_DLOPEN
17 AM_DISABLE_STATIC
18 AM_ENABLE_SHARED
19
20
21 # Checks for programs.
22 AC_PROG_CC
23 AC_PROG_YACC
24 AM_PROG_LEX
25 AC_PROG_INSTALL
26 AC_PROG_LIBTOOL
27 LIBTOOL="$LIBTOOL --silent"
28
29
30 # Checks for libraries.
31 AX_CHECK_LIB_IPV4
32 AX_CHECK_LIB_IPV6
33
34
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_C_CONST
37 AC_C_INLINE
38 AC_C_BIGENDIAN
39
40 AC_CHECK_SIZEOF(int64_t)
41 AC_CHECK_SIZEOF(long long)
42
43 if test "$ac_cv_sizeof_int64_t" = 8; then
44 AC_CHECK_TYPE(uint64_t)
45 AC_CHECK_TYPE(int64_t)
46 elif test "$ac_cv_sizeof_long_long" = 8; then
47 AC_CHECK_TYPE(uint64_t, unsigned long long)
48 AC_CHECK_TYPE(int64_t, long long)
49 else
50 AC_MSG_ERROR([Your system doesn't appear to have 64 bit integers. Aborting.])
51 fi
52
53
54 # Checks for library functions.
55 AC_CHECK_FUNCS_ONCE(snprintf, \
56 vsnprintf, \
57 lrand48, \
58 srand48, \
59 mmap, \
60 strtok_r, \
61 usleep, \
62 strlcat, \
63 strlcpy, \
64 basename)
65
66 # Checks for header files.
67 AC_CHECK_HEADERS_ONCE(crypt.h \
68 inttypes.h \
69 stdint.h \
70 sys/resource.h \
71 sys/param.h \
72 errno.h \
73 sys/syslog.h \
74 stddef.h \
75 libgen.h \
76 sys/wait.h \
77 wait.h \
78 link.h)
79
80
81 dnl check for /dev/null so we can use it to hold evil fd's
82 AC_MSG_CHECKING([for /dev/null])
83 if test -c /dev/null ; then
84 AC_DEFINE(PATH_DEVNULL, "/dev/null", [Path to /dev/null])
85 AC_MSG_RESULT(yes)
86 else
87 AC_DEFINE(PATH_DEVNULL, "devnull.log", [Path to /dev/null])
88 AC_MSG_RESULT(no - using devnull.log)
89 fi
90
91
92 AC_SEARCH_LIBS(crypt, [crypt descrypt], ,)
93 AM_CONDITIONAL([HAVE_CRYPT], [test "$ac_cv_search_crypt" = "none required"])
94
95
96 AC_ARG_WITH(zlib-path,
97 AC_HELP_STRING([--with-zlib-path=DIR], [Path to libz.so for ziplinks support.]),
98 [LDFLAGS="-L$withval $LDFLAGS"],)
99
100 AC_ARG_ENABLE(zlib, AC_HELP_STRING([--disable-zlib],[Disable ziplinks support]),
101 [zlib=$enableval],[zlib=yes])
102
103 if test "$zlib" = yes; then
104 AC_CHECK_HEADER(zlib.h, [AC_CHECK_LIB(z, zlibVersion,
105 [
106 LIBS="-lz $LIBS"
107 AC_DEFINE(HAVE_LIBZ, 1, [Define to 1 if zlib (-lz) is available.])
108 ], zlib=no)
109 ], zlib=no)
110 fi
111
112
113 dnl Openssl checks
114 AC_ARG_ENABLE(openssl,
115 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
116 --disable-openssl Disable OpenSSL support. ],
117 [ cf_enable_openssl=$enableval ],
118 [ cf_enable_openssl="auto" ])
119 AC_MSG_CHECKING(for OpenSSL)
120 if test "$cf_enable_openssl" != "no"; then
121 cf_openssl_basedir=""
122 if test "$cf_enable_openssl" != "auto" &&
123 test "$cf_enable_openssl" != "yes"; then
124 dnl Support for --enable-openssl=/some/place
125 cf_openssl_basedir="${cf_enable_openssl}"
126 else
127 dnl Do the auto-probe here. Check some common directory paths.
128 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
129 /opt /opt/openssl /usr/local/openssl; do
130 if test -f "${dirs}/include/openssl/opensslv.h"; then
131 cf_openssl_basedir="${dirs}"
132 break
133 fi
134 done
135 unset dirs
136 fi
137
138 dnl Now check cf_openssl_found to see if we found anything.
139 if test ! -z "$cf_openssl_basedir"; then
140 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
141 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
142 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
143 else
144 dnl OpenSSL wasn't found in the directory specified. Naughty
145 dnl administrator...
146 cf_openssl_basedir=""
147 fi
148 else
149 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
150 dnl are in /usr/include and /usr/lib. In this case, we don't want to
151 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
152 dnl We can't do this check above, because some people want two versions
153 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
154 dnl and they want /usr/local/ssl to have preference.
155 if test -f "/usr/include/openssl/opensslv.h"; then
156 cf_openssl_basedir="/usr"
157 fi
158 fi
159
160 dnl If we have a basedir defined, then everything is okay. Otherwise,
161 dnl we have a problem.
162 if test ! -z "$cf_openssl_basedir"; then
163 LIBS="-lcrypto -lssl $LIBS"
164 AC_MSG_RESULT($cf_openssl_basedir)
165 cf_enable_openssl="yes"
166 AC_DEFINE(HAVE_LIBCRYPTO, 1, [If we support ssl])
167 else
168 AC_MSG_RESULT(not found. Please check your path.)
169 cf_enable_openssl="no"
170 fi
171 unset cf_openssl_basedir
172 else
173 dnl If --disable-openssl was specified
174 AC_MSG_RESULT(disabled)
175 fi
176 AM_CONDITIONAL(ENABLE_SSL, [test "$cf_enable_openssl" = yes])
177
178
179 AC_ARG_ENABLE(assert, AC_HELP_STRING([--enable-assert], [Enable assert() statements]),
180 [assert=$enableval], [assert=no])
181 if test "$assert" = no; then
182 AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.]))
183 fi
184
185
186 # Argument processing.
187 AX_ARG_ENABLE_IOLOOP_MECHANISM
188 AX_ARG_WITH_NICKLEN
189 AX_ARG_WITH_TOPICLEN
190 AX_ARG_WITH_LCLIENT_HEAP_SIZE
191 AX_ARG_WITH_CLIENT_HEAP_SIZE
192 AX_ARG_WITH_CHANNEL_HEAP_SIZE
193 AX_ARG_WITH_DBUF_HEAP_SIZE
194 AX_ARG_WITH_DNODE_HEAP_SIZE
195 AX_ARG_WITH_BAN_HEAP_SIZE
196 AX_ARG_WITH_TOPIC_HEAP_SIZE
197 AX_ARG_WITH_NICKNAME_HISTORY_LENGTH
198 AX_ARG_WITH_SYSLOG
199 AX_ARG_ENABLE_EFNET
200 AX_ARG_ENABLE_HALFOPS
201 AX_ARG_ENABLE_DEBUGGING
202 AX_ARG_ENABLE_WARNINGS
203 AX_ARG_ENABLE_SYSLOG
204
205 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
206 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
207 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
208 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
209 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
210 AC_CONFIG_SUBDIRS(libltdl)
211
212 AC_CONFIG_FILES( \
213 Makefile \
214 etc/Makefile \
215 etc/example.conf \
216 etc/example.conf.quick \
217 etc/example.efnet.conf \
218 servlink/Makefile \
219 contrib/Makefile \
220 contrib/help/Makefile \
221 src/Makefile \
222 messages/Makefile \
223 modules/Makefile \
224 modules/core/Makefile \
225 doc/Makefile \
226 help/Makefile \
227 help/opers/Makefile \
228 help/users/Makefile \
229 lib/Makefile \
230 lib/pcre/Makefile \
231 tools/Makefile
232 )
233
234 AC_OUTPUT

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision