ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/configure.ac
Revision: 923
Committed: Mon Nov 12 19:15:27 2007 UTC (16 years, 4 months ago) by michael
Content type: application/pkix-attr-cert
Original Path: ircd-hybrid-7.2/configure.ac
File size: 6663 byte(s)
Log Message:
- fixed compile with compressed links

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 AH_TEMPLATE([HAVE_LIBCRYPTO], [If we support ssl])
114
115 dnl Openssl checks
116 AC_ARG_ENABLE(openssl,
117 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
118 --disable-openssl Disable OpenSSL support. ],
119 [ cf_enable_openssl=$enableval ],
120 [ cf_enable_openssl="auto" ])
121 AC_MSG_CHECKING(for OpenSSL)
122 if test "$cf_enable_openssl" != "no"; then
123 cf_openssl_basedir=""
124 if test "$cf_enable_openssl" != "auto" &&
125 test "$cf_enable_openssl" != "yes"; then
126 dnl Support for --enable-openssl=/some/place
127 cf_openssl_basedir="${cf_enable_openssl}"
128 else
129 dnl Do the auto-probe here. Check some common directory paths.
130 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
131 /opt /opt/openssl /usr/local/openssl; do
132 if test -f "${dirs}/include/openssl/opensslv.h"; then
133 cf_openssl_basedir="${dirs}"
134 break
135 fi
136 done
137 unset dirs
138 fi
139
140 dnl Now check cf_openssl_found to see if we found anything.
141 if test ! -z "$cf_openssl_basedir"; then
142 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
143 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
144 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
145 else
146 dnl OpenSSL wasn't found in the directory specified. Naughty
147 dnl administrator...
148 cf_openssl_basedir=""
149 fi
150 else
151 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
152 dnl are in /usr/include and /usr/lib. In this case, we don't want to
153 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
154 dnl We can't do this check above, because some people want two versions
155 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
156 dnl and they want /usr/local/ssl to have preference.
157 if test -f "/usr/include/openssl/opensslv.h"; then
158 cf_openssl_basedir="/usr"
159 fi
160 fi
161
162 dnl If we have a basedir defined, then everything is okay. Otherwise,
163 dnl we have a problem.
164 if test ! -z "$cf_openssl_basedir"; then
165 LIBS="-lcrypto -lssl $LIBS"
166 AC_MSG_RESULT($cf_openssl_basedir)
167 cf_enable_openssl="yes"
168 AC_DEFINE(HAVE_LIBCRYPTO)
169 else
170 AC_MSG_RESULT(not found. Please check your path.)
171 cf_enable_openssl="no"
172 fi
173 unset cf_openssl_basedir
174 else
175 dnl If --disable-openssl was specified
176 AC_MSG_RESULT(disabled)
177 fi
178 AM_CONDITIONAL(ENABLE_SSL, [test x"$cf_enable_openssl" = xyes])
179
180
181 # Argument processing.
182 AX_ARG_ENABLE_IOLOOP_MECHANISM
183 AX_ARG_WITH_NICKLEN
184 AX_ARG_WITH_TOPICLEN
185 AX_ARG_WITH_LCLIENT_HEAP_SIZE
186 AX_ARG_WITH_CLIENT_HEAP_SIZE
187 AX_ARG_WITH_CHANNEL_HEAP_SIZE
188 AX_ARG_WITH_DBUF_HEAP_SIZE
189 AX_ARG_WITH_DNODE_HEAP_SIZE
190 AX_ARG_WITH_BAN_HEAP_SIZE
191 AX_ARG_WITH_TOPIC_HEAP_SIZE
192 AX_ARG_WITH_IRCD_HEAP_SIZE
193 AX_ARG_WITH_MQUEUE_HEAP_SIZE
194 AX_ARG_WITH_FMSG_HEAP_SIZE
195 AX_ARG_WITH_NICKNAME_HISTORY_LENGTH
196 AX_ARG_WITH_SYSLOG
197 AX_ARG_ENABLE_EFNET
198 AX_ARG_ENABLE_HALFOPS
199 AX_ARG_ENABLE_DEBUGGING
200 AX_ARG_ENABLE_WARNINGS
201 AX_ARG_ENABLE_SYSLOG
202
203 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
204 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
205 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
206 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
207 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
208 AC_CONFIG_SUBDIRS(libltdl)
209
210 AC_CONFIG_FILES( \
211 Makefile \
212 etc/Makefile \
213 etc/example.conf \
214 etc/example.conf.quick \
215 etc/example.efnet.conf \
216 servlink/Makefile \
217 contrib/Makefile \
218 contrib/help/Makefile \
219 src/Makefile \
220 messages/Makefile \
221 modules/Makefile \
222 modules/core/Makefile \
223 doc/Makefile \
224 help/Makefile \
225 help/opers/Makefile \
226 help/users/Makefile \
227 lib/Makefile \
228 lib/pcre/Makefile \
229 tools/Makefile
230 )
231
232 AC_OUTPUT

Properties

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