ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.2/configure.ac
Revision: 922
Committed: Mon Nov 12 16:27:49 2007 UTC (16 years, 4 months ago) by michael
Content type: application/pkix-attr-cert
File size: 5811 byte(s)
Log Message:
- Add tools/Makefile.am

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 #ltdl stuff
12 AC_LIBLTDL_CONVENIENCE
13 AC_SUBST(INCLTDL)
14 AC_SUBST(LIBLTDL)
15 AC_LIBTOOL_DLOPEN
16 AM_DISABLE_STATIC
17 AM_ENABLE_SHARED
18
19 # Checks for programs.
20 AC_PROG_CC
21 AC_PROG_YACC
22 AM_PROG_LEX
23 AC_PROG_INSTALL
24 AC_PROG_LIBTOOL
25 LIBTOOL="$LIBTOOL --silent"
26
27 # Checks for libraries.
28 AX_CHECK_LIB_IPV4
29 AX_CHECK_LIB_IPV6
30 AX_CHECK_LIB_CRYPT
31
32 # Checks for header files.
33 AC_CHECK_HEADERS([sys/resource.h]) # ick
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 AC_CHECK_HEADERS_ONCE(crypt.h \
67 inttypes.h \
68 stdint.h \
69 sys/resource.h \
70 sys/param.h \
71 errno.h \
72 sys/syslog.h \
73 stddef.h \
74 libgen.h \
75 sys/wait.h \
76 wait.h \
77 link.h)
78
79 AH_TEMPLATE([HAVE_LIBCRYPTO], [If we support ssl])
80
81 dnl Openssl checks
82 AC_ARG_ENABLE(openssl,
83 [ --enable-openssl[=DIR] Enable OpenSSL support (DIR optional).
84 --disable-openssl Disable OpenSSL support. ],
85 [ cf_enable_openssl=$enableval ],
86 [ cf_enable_openssl="auto" ])
87 AC_MSG_CHECKING(for OpenSSL)
88 if test "$cf_enable_openssl" != "no"; then
89 cf_openssl_basedir=""
90 if test "$cf_enable_openssl" != "auto" &&
91 test "$cf_enable_openssl" != "yes"; then
92 dnl Support for --enable-openssl=/some/place
93 cf_openssl_basedir="${cf_enable_openssl}"
94 else
95 dnl Do the auto-probe here. Check some common directory paths.
96 for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
97 /opt /opt/openssl /usr/local/openssl; do
98 if test -f "${dirs}/include/openssl/opensslv.h"; then
99 cf_openssl_basedir="${dirs}"
100 break
101 fi
102 done
103 unset dirs
104 fi
105
106 dnl Now check cf_openssl_found to see if we found anything.
107 if test ! -z "$cf_openssl_basedir"; then
108 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h"; then
109 CPPFLAGS="-I${cf_openssl_basedir}/include $CPPFLAGS"
110 LDFLAGS="-L${cf_openssl_basedir}/lib $LDFLAGS"
111 else
112 dnl OpenSSL wasn't found in the directory specified. Naughty
113 dnl administrator...
114 cf_openssl_basedir=""
115 fi
116 else
117 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
118 dnl are in /usr/include and /usr/lib. In this case, we don't want to
119 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
120 dnl We can't do this check above, because some people want two versions
121 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
122 dnl and they want /usr/local/ssl to have preference.
123 if test -f "/usr/include/openssl/opensslv.h"; then
124 cf_openssl_basedir="/usr"
125 fi
126 fi
127
128 dnl If we have a basedir defined, then everything is okay. Otherwise,
129 dnl we have a problem.
130 if test ! -z "$cf_openssl_basedir"; then
131 LIBS="-lcrypto -lssl $LIBS"
132 AC_MSG_RESULT($cf_openssl_basedir)
133 cf_enable_openssl="yes"
134 AC_DEFINE(HAVE_LIBCRYPTO)
135 else
136 AC_MSG_RESULT(not found. Please check your path.)
137 cf_enable_openssl="no"
138 fi
139 unset cf_openssl_basedir
140 else
141 dnl If --disable-openssl was specified
142 AC_MSG_RESULT(disabled)
143 fi
144 AM_CONDITIONAL(ENABLE_SSL, [test x"$cf_enable_openssl" = xyes])
145
146
147 # Argument processing.
148 AX_ARG_ENABLE_IOLOOP_MECHANISM
149 AX_ARG_WITH_NICKLEN
150 AX_ARG_WITH_TOPICLEN
151 AX_ARG_WITH_LCLIENT_HEAP_SIZE
152 AX_ARG_WITH_CLIENT_HEAP_SIZE
153 AX_ARG_WITH_CHANNEL_HEAP_SIZE
154 AX_ARG_WITH_DBUF_HEAP_SIZE
155 AX_ARG_WITH_DNODE_HEAP_SIZE
156 AX_ARG_WITH_BAN_HEAP_SIZE
157 AX_ARG_WITH_TOPIC_HEAP_SIZE
158 AX_ARG_WITH_IRCD_HEAP_SIZE
159 AX_ARG_WITH_MQUEUE_HEAP_SIZE
160 AX_ARG_WITH_FMSG_HEAP_SIZE
161 AX_ARG_WITH_NICKNAME_HISTORY_LENGTH
162 AX_ARG_WITH_SYSLOG
163 AX_ARG_ENABLE_EFNET
164 AX_ARG_ENABLE_HALFOPS
165 AX_ARG_ENABLE_DEBUGGING
166 AX_ARG_ENABLE_WARNINGS
167 AX_ARG_ENABLE_SYSLOG
168
169 AC_DEFINE_DIR([PREFIX],[prefix],[Set to prefix.])
170 AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Set to sysconfdir.])
171 AC_DEFINE_DIR([LIBDIR],[libdir],[Set to libdir.])
172 AC_DEFINE_DIR([DATADIR],[datadir],[Set to datadir.])
173 AC_DEFINE_DIR([LOCALSTATEDIR],[localstatedir],[Set to localstatedir.])
174 AC_CONFIG_SUBDIRS(libltdl)
175
176 AC_CONFIG_FILES( \
177 Makefile \
178 etc/Makefile \
179 etc/example.conf \
180 etc/example.conf.quick \
181 etc/example.efnet.conf \
182 servlink/Makefile \
183 contrib/Makefile \
184 contrib/help/Makefile \
185 src/Makefile \
186 messages/Makefile \
187 modules/Makefile \
188 modules/core/Makefile \
189 doc/Makefile \
190 help/Makefile \
191 help/opers/Makefile \
192 help/users/Makefile \
193 lib/Makefile \
194 lib/pcre/Makefile \
195 tools/Makefile
196 )
197
198 AC_OUTPUT

Properties

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