]> jfr.im git - solanum.git/blob - librb/configure.ac
librb/event: Don't leak event names on completion
[solanum.git] / librb / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl TODO: clean up all the OpenSSL and shared module checking stuff;
4 dnl the most major changes have already been made and it looks like
5 dnl said functions need to be just about as complex as they already are.
6
7 AC_PREREQ(2.63)
8 AUTOMAKE_OPTIONS = 1.10
9 dnl Sneaky way to get an Id tag into the configure script
10 AC_INIT([librb],[devel])
11 AM_INIT_AUTOMAKE([subdir-objects])
12 AM_SILENT_RULES([yes])
13
14 AM_CONFIG_HEADER(include/librb_config.h)
15
16 AC_PREFIX_DEFAULT(/usr/local/librb)
17 AC_GNU_SOURCE
18
19 dnl Checks for programs.
20 AC_PROG_CC_C99
21
22 if test x"$ac_cv_prog_cc_c99" = "xno"; then
23 AC_ERROR([charybdis requires a C99 capable compiler])
24 fi
25
26
27 AC_PROG_INSTALL
28 AC_PROG_EGREP
29 AC_PROG_SED
30
31 F77=no
32 CXX=no
33 GCJ=no
34
35 AM_DISABLE_STATIC
36 AM_ENABLE_SHARED
37 AM_MAINTAINER_MODE
38
39 AC_ISC_POSIX
40 AC_C_INLINE
41 AC_C_CONST
42 AC_C_BIGENDIAN
43 AC_PROG_MAKE_SET
44 AC_PROG_INSTALL
45 AC_PATH_PROG(AUTOMAKE, automake)
46 AC_PATH_PROG(ACLOCAL, aclocal)
47 AC_PATH_PROG(AUTOHEADER, autoheader)
48 AC_PATH_PROG(AS, as)
49 AC_PATH_PROG(RM, rm)
50 AC_PATH_PROG(CP, cp)
51 AC_PATH_PROG(MV, mv)
52 AC_PATH_PROG(LN, ln)
53 AC_PATH_PROG(TOUCH, touch)
54 AC_LANG(C)
55
56 AC_PROG_LIBTOOL
57
58 LIBTOOL="$LIBTOOL --silent"
59
60 case "$host_os" in
61 *cygwin*)
62 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
63 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
64 ;;
65 *mingw* | *msys*)
66 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
67 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
68 AC_CHECK_HEADER(windows.h, , [AC_MSG_ERROR([** MinGW and no windows.h. I give up.])])
69 AC_CHECK_HEADER(winsock2.h, , [AC_MSG_ERROR([** MinGW and no winsock2.h. I give up.])])
70 AC_DEFINE_UNQUOTED(HAVE_WINSOCK2_H, 1, [Have WINSOCK2_H])
71 AC_DEFINE_UNQUOTED(HAVE_WINSOCK_H, 1, [Have WINSOCK_H])
72 LIBS="$LIBS -lws2_32 -liphlpapi"
73 is_mingw="yes"
74 ;;
75 *interix*)
76 CPPFLAGS="$CFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=500"
77 ;;
78 *solaris*)
79 CPPFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_XPG4_2"
80 ;;
81 *)
82 ;;
83 esac
84
85 AM_CONDITIONAL([MINGW], [test "$is_mingw" = "yes"])
86
87
88 # backwards support for IRC_CFLAGS
89 CFLAGS="$IRC_CFLAGS $CFLAGS -Wall"
90
91 dnl use directory structure of cached as default (hack)
92 if test "$libexecdir" = '${exec_prefix}/libexec' &&
93 test "$localstatedir" = '${prefix}/var'; then
94 libexecdir='${bindir}'
95 localstatedir='${prefix}'
96 fi
97
98 AC_TYPE_PID_T
99 AC_TYPE_SIZE_T
100 AC_TYPE_SSIZE_T
101 AC_TYPE_UID_T
102
103
104 dnl Checks for header files.
105 AC_HEADER_STDC
106
107 AC_CHECK_HEADERS([crypt.h unistd.h sys/socket.h sys/stat.h sys/time.h time.h netinet/in.h netinet/tcp.h netinet/sctp.h arpa/inet.h errno.h sys/uio.h spawn.h sys/poll.h sys/epoll.h sys/select.h sys/devpoll.h sys/event.h port.h signal.h sys/signalfd.h sys/timerfd.h])
108 AC_HEADER_TIME
109
110 dnl Networking Functions
111 dnl ====================
112
113 AC_SEARCH_LIBS(socket, [socket],,)
114
115
116 AC_CHECK_MEMBER([struct sockaddr.sa_len], [AC_DEFINE(SOCKADDR_IN_HAS_LEN, 1, [Define to 1 if sockaddr has a 'sa_len'
117 member.])],,[[
118 #ifdef HAVE_SYS_TYPES_H
119 #include <sys/types.h>
120 #endif
121 #ifdef HAVE_SYS_SOCKET_H
122 #include <sys/socket.h>
123 #endif
124 #ifdef HAVE_WINSOCK2_H
125 #include <winsock2.h>
126 #endif
127 ]])
128
129 AC_CHECK_TYPE([socklen_t], rb_cv_socklen_t=socklen_t,[
130 AC_MSG_CHECKING([for socklen_t equivalent])
131 AC_CACHE_VAL([rb_cv_socklen_t],
132 [
133 # Systems have either "struct sockaddr *" or
134 # "void *" as the second argument to getpeername
135 rb_cv_socklen_t=
136 for arg2 in "struct sockaddr" void; do
137 for t in int size_t unsigned long "unsigned long"; do
138 AC_TRY_COMPILE([
139 #ifdef HAVE_SYS_TYPES_H
140 #include <sys/types.h>
141 #endif
142 #ifdef HAVE_SYS_SOCKET_H
143 #include <sys/socket.h>
144 #endif
145 #ifdef HAVE_WINSOCK2_H
146 #include <winsock2.h>
147 #include <ws2tcpip.h>
148 #endif
149 int getpeername (int, $arg2 *, $t *);
150 ],[
151 $t len;
152 getpeername(0,0,&len);
153 ],[
154 rb_cv_socklen_t="$t"
155 break
156 ])
157 done
158 done
159
160 if test "x$rb_cv_socklen_t" = x; then
161 AC_MSG_WARN([Cannot find a type to use in place of socklen_t using int])
162 rb_cv_socklen_t=int
163 fi
164 ])
165 AC_MSG_RESULT($rb_cv_socklen_t)],
166 [#include <sys/types.h>
167 #include <sys/socket.h>])
168
169 rb_socklen_t=$rb_cv_socklen_t
170
171
172
173
174
175 AC_CHECK_TYPES([struct sockaddr_storage],[
176 rb_have_sockaddr_storage=yes
177 ],[], [
178 #include <sys/types.h>
179 #include <sys/socket.h>
180 ])
181
182
183 dnl Check for stdarg.h - if we cant find it, halt configure
184 AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - librb will not compile without it **])])
185
186 AC_CHECK_TYPE([sa_family_t], [],
187 [AC_DEFINE(sa_family_t, [u_int16_t], [If system does not define sa_family_t, define it here.])],
188 [[#include <sys/types.h>
189 #include <sys/socket.h>]])
190
191
192 dnl check for various functions...
193 AC_CHECK_FUNCS([snprintf vsnprintf socketpair gettimeofday writev sendmsg gmtime_r strtok_r usleep posix_spawn getexecname strlcpy strlcat strnlen strcasestr strcasecmp strncasecmp fstat signalfd select poll kevent port_create epoll_ctl arc4random getrusage timerfd_create])
194
195 AC_SEARCH_LIBS(dlinfo, dl, AC_DEFINE(HAVE_DLINFO, 1, [Define if you have dlinfo]))
196 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if you have nanosleep]))
197 AC_SEARCH_LIBS(timer_create, rt, AC_DEFINE(HAVE_TIMER_CREATE, 1, [Define if you have timer_create]))
198 RB_CHECK_TIMER_CREATE
199 RB_CHECK_TIMERFD_CREATE
200
201 AC_FUNC_ALLOCA
202 AC_FUNC_VFORK
203 AC_FUNC_MMAP
204
205 AC_MSG_CHECKING(for /dev/poll)
206 if test -c "/dev/poll"; then
207 AC_MSG_RESULT(yes)
208 AC_DEFINE(HAVE_DEVPOLL, [1], [Define to 1 if you have devpoll])
209 else
210 AC_MSG_RESULT(no)
211 fi
212
213
214 if test "$is_mingw" = "yes"; then
215 AC_DEFINE(HAVE_WIN32, [1], [Define to 1 if you are on windows])
216 fi
217
218
219 dnl OpenSSL support
220 AC_MSG_CHECKING(for OpenSSL)
221 AC_ARG_ENABLE(openssl,
222 [AC_HELP_STRING([--enable-openssl[=DIR]],[Enable OpenSSL support (DIR optional).])
223 AC_HELP_STRING([--disable-openssl],[Disable OpenSSL support.])],
224 [cf_enable_openssl=$enableval],
225 [cf_enable_openssl="auto"])
226
227 if test "$cf_enable_openssl" != "no" ; then
228 cf_openssl_basedir=""
229 if test "$cf_enable_openssl" != "auto" &&
230 test "$cf_enable_openssl" != "yes" ; then
231 dnl Support for --enable-openssl=/some/place
232 cf_openssl_basedir="`echo ${cf_enable_openssl} | sed 's/\/$//'`"
233 else
234 dnl Do the auto-probe here. Check some common directory paths.
235 for dirs in /usr/local/ssl /usr/pkg /usr/local \
236 /usr/local/openssl ; do
237 if test -f "${dirs}/include/openssl/opensslv.h" ; then
238 cf_openssl_basedir="${dirs}"
239 break
240 fi
241 done
242 unset dirs
243 fi
244 dnl Now check cf_openssl_found to see if we found anything.
245 if test ! -z "$cf_openssl_basedir"; then
246 if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h" ; then
247 SSL_CFLAGS="-I${cf_openssl_basedir}/include"
248 SSL_LIBS="-L${cf_openssl_basedir}/lib"
249 else
250 dnl OpenSSL wasn't found in the directory specified. Naughty
251 dnl administrator...
252 cf_openssl_basedir=""
253 fi
254 else
255 dnl Check for stock FreeBSD 4.x and 5.x systems, since their files
256 dnl are in /usr/include and /usr/lib. In this case, we don't want to
257 dnl change INCLUDES or LIBS, but still want to enable OpenSSL.
258 dnl We can't do this check above, because some people want two versions
259 dnl of OpenSSL installed (stock FreeBSD 4.x/5.x and /usr/local/ssl)
260 dnl and they want /usr/local/ssl to have preference.
261 if test -f "/usr/include/openssl/opensslv.h" ; then
262 cf_openssl_basedir="/usr"
263 fi
264 fi
265
266 dnl If we have a basedir defined, then everything is okay. Otherwise,
267 dnl we have a problem.
268 if test ! -z "$cf_openssl_basedir"; then
269 AC_MSG_RESULT($cf_openssl_basedir)
270 cf_enable_openssl="yes"
271 else
272 AC_MSG_RESULT([not found. Specify a correct path?])
273 cf_enable_openssl="no"
274 fi
275 unset cf_openssl_basedir
276 else
277 dnl If --disable-openssl was specified
278 AC_MSG_RESULT(disabled)
279 fi
280
281 save_CPPFLAGS="$CPPFLAGS"
282 CPPFLAGS="$CPPFLAGS $SSL_CFLAGS"
283 save_LIBS="$LIBS"
284 LIBS="$LIBS $SSL_LIBS"
285 if test "$cf_enable_openssl" != no; then
286 dnl Check OpenSSL version (must be 0.9.7 or above!)
287 AC_MSG_CHECKING(for OpenSSL 0.9.7 or above)
288 AC_RUN_IFELSE(
289 [AC_LANG_PROGRAM(
290 [#include <openssl/opensslv.h>
291 #include <stdlib.h>],
292 [[if (OPENSSL_VERSION_NUMBER >= 0x00907000)
293 exit(0); else exit(1);]])],
294 cf_enable_openssl=yes,
295 cf_enable_openssl=no,
296 cf_enable_openssl=no)
297
298 if test "$cf_enable_openssl" != no; then
299 AC_MSG_RESULT(found)
300 else
301 AC_MSG_RESULT(no - OpenSSL support disabled)
302 fi
303
304 fi
305
306
307 if test "$cf_enable_openssl" != no; then
308 CPPFLAGS="$CPPFLAGS $SSL_LIBS"
309 AC_CHECK_LIB(crypto, RAND_status,
310 [cf_enable_openssl=yes],
311 [cf_enable_openssl=no])
312 fi
313
314 if test "$cf_enable_openssl" != no; then
315 CPPFLAGS="$CPPFLAGS $SSL_LIBS"
316 AC_CHECK_LIB(ssl, SSL_read,
317 [SSL_LIBS="$SSL_LIBS -lssl -lcrypto"],
318 [cf_enable_openssl=no], [-lcrypto])
319 fi
320
321
322 dnl mbedTLS support
323 AC_ARG_ENABLE(mbedtls,
324 [AC_HELP_STRING([--enable-mbedtls], [Enable mbedTLS support.])
325 AC_HELP_STRING([--disable-mbedtls], [Disable mbedTLS support.])],
326 [cf_enable_mbedtls=$enableval],
327 [cf_enable_mbedtls="auto"])
328
329 if test "$cf_enable_mbedtls" != no; then
330 save_CPPFLAGS="$CPPFLAGS"
331 save_LIBS="$LIBS"
332 LIBS="$LIBS $MBEDTLS_LIBS"
333 AC_CHECK_LIB(mbedtls, mbedtls_ssl_init, [
334 MBEDTLS_LIBS="$MBEDTLS_LIBS -lmbedtls -lmbedx509 -lmbedcrypto"
335 cf_enable_mbedtls=yes
336 ], [cf_enable_mbedtls=no], [-lmbedx509 -lmbedcrypto])
337 fi
338
339 dnl GnuTLS support
340 AC_MSG_CHECKING(for GnuTLS)
341 AC_ARG_ENABLE(gnutls,
342 [AC_HELP_STRING([--enable-gnutls],[Enable GnuTLS support.])
343 AC_HELP_STRING([--disable-gnutls],[Disable GnuTLS support.])],
344 [cf_enable_gnutls=$enableval],
345 [cf_enable_gnutls="auto"])
346
347 if test "$cf_enable_gnutls" != no; then
348 PKG_CHECK_MODULES(GNUTLS, [gnutls], [
349 cf_enable_gnutls="yes"
350 ], [cf_enable_gnutls="no"])
351 fi
352
353 dnl mbed TLS is given highest preference when no specified TLS library is provided
354 if test "$cf_enable_openssl" = "auto" -a "$cf_enable_mbedtls" = "yes"; then
355 cf_enable_openssl="no"
356 fi
357
358 if test "$cf_enable_gnutls" = "auto" -a "$cf_enable_openssl" = "yes" -a "$cf_enable_mbedtls" = "yes"; then
359 cf_enable_gnutls="no"
360 fi
361
362 if test x"$cf_enable_openssl" != xno; then
363 AC_DEFINE(HAVE_OPENSSL,1,[Has OpenSSL])
364 GNUTLS_CFLAGS=""
365 GNUTLS_LIBS=""
366 MBEDTLS_LIBS=""
367 MBEDTLS_CFLAGS=""
368 SSL_TYPE="openssl"
369 elif test x"$cf_enable_mbedtls" != xno; then
370 AC_DEFINE(HAVE_MBEDTLS, 1, [Has mbedTLS])
371 SSL_LIBS=""
372 SSL_CFLAGS=""
373 GNUTLS_CFLAGS=""
374 GNUTLS_LIBS=""
375 SSL_TYPE="mbedtls"
376 elif test x"$cf_enable_gnutls" != xno; then
377 AC_DEFINE(HAVE_GNUTLS, 1, [Has GnuTLS])
378 SSL_LIBS=""
379 SSL_CFLAGS=""
380 MBEDTLS_LIBS=""
381 MBEDTLS_CFLAGS=""
382 SSL_TYPE="gnutls"
383 fi
384
385
386
387
388 CPPFLAGS="$save_CPPFLAGS"
389 LIBS="$save_LIBS"
390
391 dnl End OpenSSL detection
392
393
394
395 AC_ARG_WITH(sctp-path,
396 AC_HELP_STRING([--with-sctp-path=DIR],[Path to libsctp.so for SCTP support.]),
397 [LIBS="$LIBS -L$withval"],)
398
399 AC_ARG_ENABLE(sctp,
400 AC_HELP_STRING([--disable-sctp],[Disable SCTP support]),
401 [sctp=$enableval],[sctp=yes])
402
403 if test "$sctp" = yes; then
404
405 AC_CHECK_HEADER(netinet/sctp.h, [
406 AC_CHECK_LIB(sctp, sctp_bindx,
407 [
408 AC_SUBST(LIBSCTP_LD, -lsctp)
409 AC_DEFINE(HAVE_LIBSCTP, 1, [Define to 1 if libsctp (-lsctp) is available.])
410 ], sctp=no)
411 ], sctp=no)
412
413 fi
414
415
416
417 dnl Debug-related options
418 dnl =====================
419
420 AC_ARG_ENABLE(assert,
421 AC_HELP_STRING([--enable-assert],[Enable assert(). Choose between soft(warnings) and hard(aborts the daemon)]),
422 [assert=$enableval], [assert=no])
423
424 if test "$assert" = no; then
425 AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.])
426 elif test "$assert" = soft; then
427 AC_DEFINE(SOFT_ASSERT, 1, [Define this to enable soft asserts.])
428 AC_DEFINE(NDEBUG, 1, [Define this to disable debugging support.])
429 elif test "$assert" = yes; then
430 assert = "hard";
431 fi
432
433 AC_MSG_CHECKING(if you want to do a profile build)
434 AC_ARG_ENABLE(profile,
435 AC_HELP_STRING([--enable-profile],[Enable profiling]),
436 [profile=$enableval], [profile=no])
437
438 if test "$profile" = yes; then
439 if test "$ac_cv_c_compiler_gnu" = yes; then
440 CFLAGS="$CFLAGS -pg -static"
441 AC_MSG_RESULT([yes, adding -pg -static])
442 AC_DEFINE(RB_PROFILE, 1, [Defined to mark profiling is enabled])
443 else
444 AC_MSG_RESULT([no, profile builds only work with gcc])
445 fi
446 else
447 AC_MSG_RESULT(no)
448 fi
449
450 AC_ARG_ENABLE(warnings,
451 AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]),
452 [CFLAGS="$CFLAGS -Wall -Werror -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -W -Wno-unused -Wunused-function -Wunused-variable -Wno-unused-parameter"],[])
453
454 AC_SUBST(LDFLAGS)
455 AC_SUBST(PICFLAGS)
456 AC_SUBST(CFLAGS)
457 AC_SUBST(SEDOBJ)
458 AC_SUBST(SSL_CFLAGS)
459 AC_SUBST(SSL_LIBS)
460 AC_SUBST(GNUTLS_CFLAGS)
461 AC_SUBST(GNUTLS_LIBS)
462 AC_SUBST(MBEDTLS_CFLAGS)
463 AC_SUBST(MBEDTLS_LIBS)
464
465 if test "$prefix" = "NONE"; then
466 AC_DEFINE_UNQUOTED(RB_PREFIX, "$ac_default_prefix", [Prefix where librb is installed.])
467
468 else
469
470 dnl Don't get bitten by Cygwin's stupidity if the user specified
471 dnl a custom prefix with a trailing slash
472
473 prefix=`echo $prefix | sed 's/\/$//'`
474 AC_DEFINE_UNQUOTED(RB_PREFIX, "$prefix", [Prefix where librb is installed.])
475
476 fi
477
478 AC_SUBST(RB_PREFIX)
479
480 AC_CONFIG_COMMANDS([include/librb-config.h],
481 [
482 outfile=include/librb-config.h.tmp
483 cat > $outfile <<\_______EOF
484 /*
485 * librb-config.h: librb config file. Please modify configure.ac
486 */
487
488 #ifndef __LIBRB_CONFIG_H
489 #define __LIBRB_CONFIG_H
490
491 _______EOF
492
493 if test "x$rb_windows_h" = "xyes"; then
494 echo '#define WIN32_LEAN_AND_MEAN 1' >> $outfile
495 echo '#include <windows.h>' >> $outfile
496 echo '#include <winsock2.h>' >> $outfile
497 echo '#include <ws2tcpip.h>' >> $outfile
498 echo '#include <iphlpapi.h>' >> $outfile
499 fi
500
501 if test "x$rb_alloca_h" = "xyes"; then
502 echo '#define RB_HAVE_ALLOCA_H 1' >> $outfile
503 fi
504
505 if test "x$rb_header_stdc" = "xyes"; then
506 echo '#include <stdlib.h>' >> $outfile
507 echo '#include <stddef.h>' >> $outfile
508 elif test "x$rb_header_stdlib" = "xyes"; then
509 echo '#include <stdlib.h>' >> $outfile
510 fi
511
512 if test "x$rb_header_string_h" = "xyes"; then
513 echo '#include <string.h>' >> $outfile
514 fi
515
516 if test "x$rb_stdint_h" = "xyes"; then
517 echo '#include <stdint.h>' >> $outfile
518 fi
519
520 if test "x$rb_inttypes_h" = "xyes"; then
521 echo '#include <inttypes.h>' >> $outfile
522 fi
523
524 if test "x$rb_sys_types_h" = "xyes"; then
525 echo '#include <sys/types.h>' >> $outfile
526 fi
527 if test "x$rb_sys_time_h" = "xyes"; then
528 echo '#include <sys/time.h>' >> $outfile
529 fi
530 if test "x$rb_sys_stat_h" = "xyes"; then
531 echo '#include <sys/stat.h>' >> $outfile
532 fi
533 if test "x$rb_time_h" = "xyes"; then
534 echo '#include <time.h>' >> $outfile
535 fi
536
537 if test "x$rb_sys_socket_h" = "xyes"; then
538 echo '#include <sys/socket.h>' >> $outfile
539 fi
540
541 if test "x$rb_netinet_in_h" = "xyes"; then
542 echo '#include <netinet/in.h>' >> $outfile
543 fi
544
545 if test "x$rb_netinet_tcp_h" == "xyes"; then
546 echo '#include <netinet/tcp.h>' >> $outfile
547 fi
548
549 if test "x$rb_netinet_sctp_h" == "xyes"; then
550 echo '#include <netinet/sctp.h>' >> $outfile
551 fi
552
553 if test "x$rb_arpa_inet_h" = "xyes"; then
554 echo '#include <arpa/inet.h>' >> $outfile
555 fi
556
557 if test "x$rb_unistd_h" = "xyes"; then
558 echo '#include <unistd.h>' >> $outfile
559 fi
560
561 if test "x$rb_crypt_h" = "xyes"; then
562 echo '#include <crypt.h>' >> $outfile
563 fi
564
565 if test "x$rb_errno_h" = "xyes"; then
566 echo '#include <errno.h>' >> $outfile
567 fi
568
569 echo "typedef $rb_socklen_t rb_socklen_t;" >> $outfile
570
571
572 if test "x$rb_sockaddr_sa_len" = "xyes"; then
573 echo '#define RB_SOCKADDR_HAS_SA_LEN 1' >> $outfile
574 fi
575
576 if test "x$rb_sockaddr_storage" = "xyes"; then
577 echo '#define rb_sockaddr_storage sockaddr_storage' >> $outfile
578 else
579 echo 'struct rb_sockaddr_storage { uint8_t _padding[[128]]; };' >> $outfile
580 fi
581
582 cat >> $outfile <<\_______EOF
583 #endif /* __LIBRB_CONFIG_H */
584 _______EOF
585
586 if cmp -s $outfile include/librb-config.h; then
587 AC_MSG_NOTICE([include/librb-config.h is unchanged])
588 ${rb_rm} -f $outfile
589 else
590 ${rb_mv} $outfile include/librb-config.h
591 fi
592
593 ],[
594 if test x$ac_cv_header_stdc = xyes; then
595 rb_header_stdc=yes
596 fi
597 if test x$ac_cv_header_stdlib_h = xyes; then
598 rb_header_stdlib_h=yes
599 fi
600 if test x$ac_cv_header_string_h = xyes; then
601 rb_header_string_h=yes
602 fi
603 if test x$ac_cv_header_memory_h = xyes; then
604 rb_header_memory_h=yes
605 fi
606 if test "x${ac_cv_working_alloca_h+set}" = xset ; then
607 rb_alloca_h="$ac_cv_working_alloca_h"
608 else
609 rb_alloc_h="$ac_cv_header_alloca_h"
610 fi
611 if test x$ac_cv_member_struct_sockaddr_sa_len = xyes; then
612 rb_sockaddr_sa_len=yes
613 fi
614 if test x$ac_cv_header_sys_socket_h = xyes; then
615 rb_sys_socket_h=yes
616 fi
617 if test x$ac_cv_header_sys_types_h = xyes; then
618 rb_sys_types_h=yes
619 fi
620 if test x$ac_cv_header_sys_stat_h = xyes; then
621 rb_sys_stat_h=yes
622 fi
623 if test x$ac_cv_header_sys_time_h = xyes; then
624 rb_sys_time_h=yes
625 fi
626 if test x$ac_cv_header_time = xyes; then
627 rb_time_h=yes
628 fi
629
630 if test x$ac_cv_header_stdint_h = xyes; then
631 rb_stdint_h=yes
632 fi
633 if test x$ac_cv_header_inttypes_h = xyes; then
634 rb_inttypes_h=yes
635 fi
636 if test x$ac_cv_header_netinet_in_h = xyes; then
637 rb_netinet_in_h=yes
638 fi
639 if test x$ac_cv_header_netinet_tcp_h = xyes; then
640 rb_netinet_tcp_h=yes
641 fi
642 if test x$ac_cv_header_netinet_sctp_h = xyes; then
643 rb_netinet_sctp_h=yes
644 fi
645
646 if test x$ac_cv_header_crypt_h = xyes; then
647 rb_crypt_h=yes
648 fi
649 if test x$ac_cv_header_errno_h = xyes; then
650 rb_errno_h=yes
651 fi
652 if test x$ac_cv_header_unistd_h = xyes; then
653 rb_unistd_h=yes
654 fi
655 if test x$ac_cv_header_windows_h = xyes; then
656 rb_windows_h=yes
657 fi
658 if test x$ac_cv_header_winsock2_h = xyes; then
659 rb_winsock2_h=yes
660 fi
661
662 rb_socklen_t=$rb_socklen_t
663
664 if test "x$rb_have_sockaddr_storage" = "xyes"; then
665 rb_sockaddr_storage="yes"
666 else
667 rb_sockaddr_storage="no"
668 fi
669
670 rb_mv="$MV"
671 rb_rm="$RM"
672
673 ]
674
675
676 )
677
678
679 AC_CONFIG_FILES( \
680 src/Makefile \
681 Makefile \
682 librb.pc
683 )
684
685 AC_OUTPUT
686
687 dnl Make it look sexay!
688
689 echo
690 echo "Compiling $PACKAGE_NAME $PACKAGE_VERSION"
691 echo
692
693 echo "Installing into: $prefix"
694
695 echo "Assert debugging ............... $assert"
696 echo "SSL Type........................ $SSL_TYPE"
697 echo "SCTP............................ $sctp"
698 echo