root/configure.in

Revision 95ab72aecaf4b9fe59777d61465217590bfab3a4, 15.1 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

support umem if it is available

  • Property mode set to 100755
Line 
1 AC_INIT(src/noitd.c)
2
3 node=`hostname | cut -f1 -d '.' | tr '[A-Z]' '[a-z]'`
4 if test -f ".configure.$node"; then
5         echo "***********************************************************"
6         echo "* Loading node specific configure settings for $node."
7         echo "***********************************************************"
8         . ./.configure.$node
9 fi
10
11 AC_CANONICAL_HOST
12 AC_CONFIG_HEADER(src/noit_config.h)
13 AC_CONFIG_HEADER(src/jlog/jlog_config.h)
14
15 AC_PROG_CC
16 AC_C_INLINE
17 AC_C_BIGENDIAN
18 AC_PROG_CPP
19 AC_PROG_RANLIB
20 AC_PROG_INSTALL
21 AC_PROG_LN_S
22 AC_PATH_PROG(AR, ar)
23 AC_PATH_PROGS(PERL, perl)
24 AC_PATH_PROGS(XSLTPROC, xsltproc)
25 AC_PATH_PROGS(XMLLINT, xmllint)
26 AC_PATH_PROGS(JAVA, java)
27 AC_PATH_PROGS(JAVAC, javac)
28 AC_PATH_PROGS(JAR, jar)
29 AC_PATH_PROG(NROFF, nroff)
30 AC_SUBST(PERL)
31
32 if test "x$CC" = "xgcc" ; then
33   CFLAGS="$CFLAGS -g -Wall"
34 else
35   CFLAGS="$CFLAGS -g"
36 fi
37
38 CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)/src'
39
40 case $host in
41 *-*-darwin*)
42         DTRACE=/usr/sbin/dtrace
43         DTRACEHDR=dtrace_probes.h
44         DTRACE_ENABLED=1
45         PICFLAGS="-fPIC"
46         MODULELD="$CC -bundle -flat_namespace -undefined suppress"
47         SHLD="$CC -dynamiclib -flat_namespace -undefined suppress"
48         MODULEEXT=bundle
49         RLDFLAG="-Wl,--rpath="
50         ;;
51 *-*-solaris*)
52         DTRACE=/usr/sbin/dtrace
53         DTRACEHDR=dtrace_probes.h
54         DTRACE_ENABLED=1
55         DTRACEOBJ=dtrace_stub.o
56         AC_MSG_CHECKING([32 or 64 bit Solaris assembly])
57         if test -n "`echo $CFLAGS | grep m64`"; then
58                 AC_MSG_RESULT([64])
59                 DTRACEFLAGS=-64
60                 ATOMIC_OBJS="noit_atomic_sol_x86_64.o"
61         else
62                 AC_MSG_RESULT([32])
63                 ATOMIC_OBJS="noit_atomic_sol_x86_32.o"
64         fi
65         if test "x$CC" != "xgcc" ; then
66                 CFLAGS="$CFLAGS -mt"
67         fi
68         PICFLAGS="-Kpic"
69         MODULELD="$CC -G"
70         SHLD="$CC -G"
71         MODULEEXT=so
72         RLDFLAG="-R"
73         WHOLE_ARCHIVE="-Wl,-z -Wl,allextract"
74         NOWHOLE_ARCHIVE="-Wl,-z -Wl,defaultextract"
75         ;;
76 *-*-openbsd*)
77         PICFLAGS="-fpic"
78         LDFLAGS="$LDFLAGS -Wl,-E"
79         MODULELD="$CC -shared"
80         SHLD="$CC -shared"
81         MODULEEXT=so
82         LDFLAGS="$LDFLAGS -L/usr/local/lib"
83         CFLAGS="$CFLAGS -I/usr/local/include"
84         RLDFLAG="-Wl,--rpath="
85         WHOLE_ARCHIVE="-Wl,--whole-archive"
86         NOWHOLE_ARCHIVE="-Wl,--no-whole-archive"
87         ;;
88 *-*-linux*)
89         LDFLAGS="$LDFLAGS -Wl,-E"
90         CPPFLAGS="$CPPFLAGS"
91         PICFLAGS="-fpic"
92         MODULELD="$CC -shared"
93         SHLD="$CC -shared"
94         MODULEEXT=so
95         RLDFLAG="-Wl,--rpath="
96         WHOLE_ARCHIVE="-Wl,--whole-archive"
97         NOWHOLE_ARCHIVE="-Wl,--no-whole-archive"
98         ;;
99 *-*-freebsd*)
100         PICFLAGS="-fpic"
101         MODULELD="$CC -shared"
102         LDFLAGS="$LDFLAGS -export-dynamic -L/usr/local/lib"
103         CFLAGS="$CFLAGS -I/usr/local/include"
104         MODULEEXT=so
105         RLDFLAG="-Wl,--rpath="
106         ;;
107 *)
108         PICFLAGS="-fpic"
109         MODULELD="$CC -shared"
110         MODULEEXT=so
111         RLDFLAG="-Wl,--rpath="
112         ;;
113 esac
114 AC_SUBST(DTRACE)
115 AC_SUBST(DTRACE_ENABLED)
116 if test "x$DTRACE_ENABLED" = "x1" ; then
117         AC_DEFINE(DTRACE_ENABLED)
118 fi
119 AC_SUBST(DTRACEOBJ)
120 AC_SUBST(DTRACEFLAGS)
121 AC_SUBST(SHLD)
122 AC_SUBST(RLDFLAG)
123 AC_SUBST(MODULELD)
124 AC_SUBST(MODULEEXT)
125 AC_SUBST(WHOLE_ARCHIVE)
126 AC_SUBST(NOWHOLE_ARCHIVE)
127 AC_SUBST(ATOMIC_OBJS)
128 AC_DEFINE_UNQUOTED(MODULEEXT, "$MODULEEXT", [module extension])
129 AC_MSG_CHECKING([enable build/install of the Java IEP bits])
130
131 if test -z "$ac_cv_path_JAVA" ; then
132         AC_MSG_RESULT([no])
133 else
134         JAVAPARTS=java
135         AC_MSG_RESULT([yes])
136 fi
137 AC_SUBST(JAVAPARTS)
138
139 AC_MSG_CHECKING([determining reconnoiter version])
140 NOIT_FALLBACK_VERSION=`echo '$Revision$' | awk '{print $2;}'`
141 NOIT_SVNVERSION=`svnversion`
142 if test "x$NOIT_SVNVERSION" = "xexported" ; then
143         NOIT_SVNVERSION="$NOIT_FALLBACK_VERSION"
144 fi
145 AC_DEFINE_UNQUOTED(NOIT_SVNVERSION, "$NOIT_SVNVERSION", [svn version from wc])
146 AC_MSG_RESULT([$NOIT_SVNVERSION])
147
148 # Checks for data types
149 AC_CHECK_SIZEOF(char, 1)
150 AC_CHECK_SIZEOF(short int, 2)
151 AC_CHECK_SIZEOF(int, 4)
152 AC_CHECK_SIZEOF(long int, 4)
153 AC_CHECK_SIZEOF(long long int, 8)
154 AC_CHECK_SIZEOF(void *, 1)
155
156 AC_CHECK_LIB(umem, umem_cache_create, , )
157 AC_CHECK_LIB(z, compress2, , [AC_MSG_ERROR(*** zlib is required ***)])
158 AC_CHECK_LIB(rt, sem_init, , )
159 AC_CHECK_LIB(posix4, sem_wait, , )
160 AC_CHECK_LIB(pthread, pthread_create, , )
161 AC_CHECK_FUNC(uuid_generate, , [
162   AC_MSG_WARN([uuid_generate not available])
163   AC_CHECK_LIB(uuid, uuid_generate, , [AC_MSG_ERROR(*** uuid is required ***)])])
164
165 # Some libraries provide an unparse_lower command
166 # we use that, so if it isn't present, we'll need
167 # to implement it.
168 AC_CHECK_FUNC(uuid_unparse_lower, [AC_DEFINE(HAVE_UUID_UNPARSE_LOWER)], )
169 AC_CHECK_LIB(util, openpty, , )
170 AC_CHECK_LIB(termcap, tputs, , )
171 AC_CHECK_LIB(curses, clear, , [AC_MSG_ERROR([curses not found, but required])])
172
173 CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
174 LDFLAGS="$LDFLAGS `pcre-config --libs`"
175 AC_CHECK_LIB(pcre, pcre_compile, ,
176         [
177                 AC_MSG_ERROR([libpcre not found, but required])
178         ]
179 )
180 AC_CHECK_LIB(crypto, ERR_load_CRYPTO_strings, ,
181         [
182                 AC_MSG_ERROR([libcrypto not found, but required])
183         ]
184 )
185 AC_CHECK_LIB(ssl, SSL_library_init, ,
186         [
187                 AC_MSG_ERROR([libssl not found, but required])
188         ]
189 )
190
191 old_LIBS=$LIBS
192 old_CFLAGS=$CFLAGS
193 AC_CHECK_LIB(pq, PQconnectdb,
194         [
195                 LIBS="$LIBS -lpq"
196                 PGLIBS="$LIBS"
197                 AC_SUBST(PGLIBS)
198         ],
199         [
200                 AC_MSG_ERROR([libpq required])
201         ]
202 )
203
204 AC_MSG_CHECKING([libpq includes])
205 PQICFLAGS=`pg_config --includedir`
206 if test -n "$PQICFLAGS" ; then
207   CFLAGS="$CFLAGS -I$PQICFLAGS"
208 fi
209
210 AC_TRY_LINK([
211         #include <libpq-fe.h>
212         ],
213         [ PGconn *dbh = PQconnectdb(""); ],
214         [],
215         [ AC_MSG_ERROR([Cannot compile/link against libpq]) ]
216 )
217 PGCFLAGS=$CFLAGS
218 AC_SUBST(PGCFLAGS)
219 LIBS=$old_LIBS
220 CFLAGS=$old_CFLAGS
221
222 AC_CHECK_HEADERS(mysql.h mysql/mysql.h)
223
224 if test "$ac_cv_header_mysql_h" = "no" -a "$ac_cv_header_mysql_mysql_h" = "no" ; then
225         AC_MSG_WARN([No libmysqlclient, skipping mysql module])
226         AC_SUBST(MYCFLAGS)
227         AC_SUBST(MYLIBS)
228 else
229         LIBS=$old_LIBS
230         CFLAGS=$old_CFLAGS
231        
232         if test -z "$MYLIBS" ; then
233           MYLIBS="-lmysqlclient_r -lz -lssl -lcrypto"
234         fi
235        
236         old_CFLAGS=$CFLAGS
237         old_LIBS=$LIBS
238         CFLAGS="$CFLAGS $MYCFLAGS"
239         LIBS="$MYLIBS"
240        
241         AC_CHECK_FUNC(mysql_real_connect,
242                 [
243                         BUILD_MODULES="$BUILD_MODULES mysql.$MODULEEXT"
244                         MYCFLAGS="$CFLAGS"
245                         MYLIBS="$LIBS"
246                         AC_SUBST(MYCFLAGS)
247                         AC_SUBST(MYLIBS)
248                 ],
249                 [
250                         AC_MSG_WARN([No libmysqlclient, skipping mysql module])
251                         AC_SUBST(MYCFLAGS)
252                         AC_SUBST(MYLIBS)
253                 ]
254         )
255        
256        
257         LIBS=$old_LIBS
258         CFLAGS=$old_CFLAGS
259 fi
260
261 ########
262 #
263 # CHECK FOR VARIOUS MODULE CRITERIA
264 # We don't track the libs themselves, as we'll just explictly link
265 # against the in the makefile if we enable them to build (by adding
266 # them to the BUILD_MODULES list).
267 #
268 ########
269
270 # Should we build snmp checks?
271 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h)
272 if test "$ac_cv_header_net_snmp_net_snmp_config_h" = "yes" ; then
273 SAVELIBS="$LIBS"
274 AC_CHECK_LIB(netsnmp, snmp_sess_open,
275         [
276                 BUILD_MODULES="$BUILD_MODULES snmp.$MODULEEXT"
277         ],
278         [
279                 AC_MSG_WARN([No libnetsnmp, skipping snmp module])
280         ]
281 )
282 LIBS="$SAVELIBS"
283 else
284         AC_MSG_WARN([No libnetsnmp, skipping snmp module])
285 fi
286
287 # Should we build ssh2 checks?
288 SAVELIBS="$LIBS"
289 AC_CHECK_LIB(ssh2, libssh2_session_init_ex,
290         [
291                 BUILD_MODULES="$BUILD_MODULES ssh2.$MODULEEXT"
292         ],
293         [
294                 AC_MSG_WARN([No libssh2, skipping ssh2 module])
295         ]
296 )
297 LIBS="$SAVELIBS"
298
299 AC_MSG_CHECKING([libxml2 cflags])
300 XML2CFLAGS=`xml2-config --cflags`
301 CFLAGS="$CFLAGS $XML2CFLAGS"
302 AC_MSG_RESULT([$XML2CFLAGS])
303
304 AC_MSG_CHECKING([libxml2 libs])
305 XML2LIBS=`xml2-config --libs`
306 LIBS="$LIBS $XML2LIBS"
307 AC_MSG_RESULT([$XML2LIBS])
308
309 AC_CHECK_FUNC(xmlParseDocument, , [AC_MSG_ERROR(*** libxml2 is required ***)])
310
311 AC_MSG_CHECKING([libxslt cflags])
312 XSLTCFLAGS=`xslt-config --cflags`
313 CFLAGS="$CFLAGS $XSLTCFLAGS"
314 AC_MSG_RESULT([$XSLTCFLAGS])
315
316 AC_MSG_CHECKING([libxslt libs])
317 XSLTLIBS=`xslt-config --libs`
318 LIBS="$LIBS $XSLTLIBS"
319 AC_MSG_RESULT([$XSLTLIBS])
320
321 AC_CHECK_FUNC(xsltParseStylesheetDoc, , [AC_MSG_ERROR(*** libxslt is required ***)])
322
323 APRPREFIX="`apr-1-config --prefix`"
324 AC_SUBST(APRPREFIX)
325 AC_MSG_RESULT([$APRPREFIX])
326
327 AC_MSG_CHECKING([libapr cflags])
328 APRCFLAGS="`apr-1-config --cflags --cppflags --includes`"
329 AC_SUBST(APRCFLAGS)
330 AC_MSG_RESULT([$APRCFLAGS])
331
332 AC_MSG_CHECKING([libapr libs])
333 APRLIBS="`apr-1-config --link-ld --ldflags --libs`"
334 AC_SUBST(APRLIBS)
335 AC_MSG_RESULT([$APRLIBS])
336
337 AC_TRY_LINK([],
338         [ issetugid(); ],
339         [ ac_cv_libc_defines_issetugid="yes" ],
340         [ ac_cv_libc_defines_issetugid="no" ]
341 )
342 if test "x$ac_cv_libc_defines_issetugid" = "xyes" ; then
343         AC_DEFINE(HAVE_ISSETUGID)
344 fi
345
346 AC_MSG_CHECKING([whether sem_init works])
347 AC_TRY_RUN(
348         [
349 #include <semaphore.h>
350 int main(void){sem_t s;return (0 != sem_init(&s,0,0));}
351         ],
352         [
353                 AC_MSG_RESULT(yes)
354                 AC_DEFINE(WORKING_SEM_INIT)
355         ],
356         [
357                 AC_MSG_RESULT(no)
358                 AC_MSG_WARN([****** sem_init() is broken, I'll implement one myself.])
359         ]
360 )
361
362 AC_FUNC_STRFTIME
363 AC_CHECK_FUNCS(ssetugid strlcpy strnstrn openpty inet_pton inet_ntop getopt \
364                poll)
365
366 # Checks for header files.
367 AC_CHECK_HEADERS(sys/file.h sys/types.h dirent.h sys/param.h fcntl.h errno.h limits.h \
368                  sys/resource.h pthread.h semaphore.h pwd.h stdio.h stdlib.h string.h \
369                  ctype.h unistd.h time.h pty.h sys/stat.h sys/event.h libkern/OSAtomic.h \
370                  term.h termio.h termios.h curses.h sys/cdefs.h grp.h netinet/in_systm.h \
371                  sys/ioctl_compat.h sys/filio.h util.h sys/time.h sys/mman.h \
372                  stropts.h sys/stream.h alloca.h sys/wait.h)
373
374 AC_CHECK_FUNCS(getpwnam_r)
375 GETPWNAM_R_POSIX
376 AC_CHECK_FUNCS(getgrnam_r)
377 GETGRNAM_R_POSIX
378
379 AC_MSG_CHECKING(for tputs() function final argument type)
380 AC_EGREP_CPP([tputs.*[(][       ]*char[         ]*[)]],
381                 [#if defined(HAVE_TERM_H)
382                  #include <term.h>
383                  #endif
384                  #if defined(HAVE_CURSES_H)
385                  #include <curses.h>
386                  #endif],
387                 [AC_MSG_RESULT(char)
388                  AC_DEFINE(TPUTS_TAKES_CHAR)],
389                 [AC_MSG_RESULT(not char)])
390
391 AC_CACHE_CHECK([for epoll support], ac_cv_have_epoll, [
392         AC_TRY_LINK(
393                 [ #include <sys/types.h> ],
394                 [ u_int a; a = epoll_create(); ],
395                 [ ac_cv_have_epoll="yes" ],
396                 [ ac_cv_have_epoll="no" ]
397         )
398 ])
399 if test "x$ac_cv_have_epoll" = "xyes" ; then
400         AC_DEFINE(HAVE_EPOLL)
401         EVENTER_OBJS="$EVENTER_OBJS eventer_epoll_impl.o"
402         AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "epoll")
403         have_epoll=1
404 fi
405
406 AC_CACHE_CHECK([for kqueue support], ac_cv_have_kqueue, [
407         AC_TRY_LINK(
408                 [ #include <sys/types.h> ],
409                 [ u_int a; a = kqueue(); ],
410                 [ ac_cv_have_kqueue="yes" ],
411                 [ ac_cv_have_kqueue="no" ]
412         )
413 ])
414 if test "x$ac_cv_have_kqueue" = "xyes" ; then
415         AC_DEFINE(HAVE_KQUEUE)
416         EVENTER_OBJS="$EVENTER_OBJS eventer_kqueue_impl.o"
417         AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "kqueue")
418         have_kqueue=1
419 fi
420
421 AC_CACHE_CHECK([for Solaris ports support], ac_cv_have_ports, [
422         AC_TRY_LINK(
423                 [ #include <port.h> ],
424                 [ u_int a; a = port_create(); ],
425                 [ ac_cv_have_ports="yes" ],
426                 [ ac_cv_have_ports="no" ]
427         )
428 ])
429 if test "x$ac_cv_have_ports" = "xyes" ; then
430         AC_DEFINE(HAVE_PORTS)
431         EVENTER_OBJS="$EVENTER_OBJS eventer_ports_impl.o"
432         AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "ports")
433         have_ports=1
434 fi
435
436 AC_SUBST(EVENTER_OBJS)
437
438 AC_CACHE_CHECK([for posix_readdir_r], ac_cv_have_posix_readdir_r, [
439         AC_TRY_COMPILE(
440                 [ #include <dirent.h> ],
441                 [ struct dirent *dep, de; readdir_r("/", &de, &dep); ],
442                 [ ac_cv_have_posix_readdir_r="yes" ],
443                 [ ac_cv_have_posix_readdir_r="no" ]
444         )
445 ])
446 if test "x$ac_cv_have_posix_readdir_r" = "xyes" ; then
447         AC_DEFINE(HAVE_POSIX_READDIR_R)
448         have_posix_readdir_r=1
449 fi
450
451 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
452         AC_TRY_COMPILE(
453                 [ #include <sys/types.h> ],
454                 [ u_int a; a = 1;],
455                 [ ac_cv_have_u_int="yes" ],
456                 [ ac_cv_have_u_int="no" ]
457         )
458 ])
459 if test "x$ac_cv_have_u_int" = "xyes" ; then
460         AC_DEFINE(HAVE_U_INT)
461         have_u_int=1
462 fi
463
464 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
465         AC_TRY_COMPILE(
466                 [ #include <sys/types.h> ],
467                 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
468                 [ ac_cv_have_intxx_t="yes" ],
469                 [ ac_cv_have_intxx_t="no" ]
470         )
471 ])
472 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
473         AC_DEFINE(HAVE_INTXX_T)
474         have_intxx_t=1
475 fi
476        
477 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
478         AC_TRY_COMPILE(
479                 [ #include <sys/types.h> ],
480                 [ int64_t a; a = 1;],
481                 [ ac_cv_have_int64_t="yes" ],
482                 [ ac_cv_have_int64_t="no" ]
483         )
484 ])
485 if test "x$ac_cv_have_int64_t" = "xyes" ; then
486         AC_DEFINE(HAVE_INT64_T)
487         have_int64_t=1
488 fi
489        
490 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
491         AC_TRY_COMPILE(
492                 [ #include <sys/types.h> ],
493                 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
494                 [ ac_cv_have_u_intxx_t="yes" ],
495                 [ ac_cv_have_u_intxx_t="no" ]
496         )
497 ])
498 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
499         AC_DEFINE(HAVE_U_INTXX_T)
500         have_u_intxx_t=1
501 fi
502
503 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
504         AC_TRY_COMPILE(
505                 [ #include <sys/types.h> ],
506                 [ u_int64_t a; a = 1;],
507                 [ ac_cv_have_u_int64_t="yes" ],
508                 [ ac_cv_have_u_int64_t="no" ]
509         )
510 ])
511 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
512         AC_DEFINE(HAVE_U_INT64_T)
513         have_u_int64_t=1
514 fi
515
516 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
517            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
518 then
519         AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
520         AC_TRY_COMPILE(
521                 [
522 #include <sys/bitypes.h>
523                 ],
524                 [
525                         int8_t a; int16_t b; int32_t c;
526                         u_int8_t e; u_int16_t f; u_int32_t g;
527                         a = b = c = e = f = g = 1;
528                 ],
529                 [
530                         AC_DEFINE(HAVE_U_INTXX_T)
531                         AC_DEFINE(HAVE_INTXX_T)
532                         AC_MSG_RESULT(yes)
533                 ],
534                 [AC_MSG_RESULT(no)]
535         )
536 fi
537
538 if test -z "$have_u_intxx_t" ; then
539         AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
540                 AC_TRY_COMPILE(
541                         [
542 #include <sys/types.h>
543                         ],
544                         [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
545                         [ ac_cv_have_uintxx_t="yes" ],
546                         [ ac_cv_have_uintxx_t="no" ]
547                 )
548         ])
549         if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
550                 AC_DEFINE(HAVE_UINTXX_T)
551         fi
552 fi
553
554 AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
555         AC_TRY_COMPILE(
556                 [
557 #include <sys/types.h>
558 #include <sys/socket.h>
559                 ],
560                 [socklen_t foo; foo = 1235;],
561                 [ ac_cv_have_socklen_t="yes" ],
562                 [ ac_cv_have_socklen_t="no" ]
563         )
564 ])
565 if test "x$ac_cv_have_socklen_t" = "xyes" ; then
566         AC_DEFINE(HAVE_SOCKLEN_T)
567 fi
568
569 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
570         AC_TRY_COMPILE(
571                 [
572 #include <sys/types.h>
573                 ],
574                 [ size_t foo; foo = 1235; ],
575                 [ ac_cv_have_size_t="yes" ],
576                 [ ac_cv_have_size_t="no" ]
577         )
578 ])
579 if test "x$ac_cv_have_size_t" = "xyes" ; then
580         AC_DEFINE(HAVE_SIZE_T)
581 fi
582
583 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
584         AC_TRY_COMPILE(
585                 [
586 #include <sys/types.h>
587                 ],
588                 [ ssize_t foo; foo = 1235; ],
589                 [ ac_cv_have_ssize_t="yes" ],
590                 [ ac_cv_have_ssize_t="no" ]
591         )
592 ])
593 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
594         AC_DEFINE(HAVE_SSIZE_T)
595 fi
596
597 AC_SUBST(BUILD_MODULES)
598
599 docdir="docs"
600 mansubdir="man"
601 AC_SUBST(docdir)
602 AC_SUBST(mansubdir)
603 SHCFLAGS="$PICFLAGS $CFLAGS"
604 AC_SUBST(SHCFLAGS)
605
606 AC_MSG_CHECKING([Resolving libexec path...])
607 fullpath=$libexecdir
608 while test "x$temppath" != "x$fullpath" ; do
609   temppath=$fullpath
610   fullpath=`eval echo ${fullpath}`
611 done
612 fullpath=`echo $fullpath | sed "s~NONE~$ac_default_prefix~"`
613 AC_MSG_RESULT([$fullpath/noit])
614 AC_DEFINE_UNQUOTED(MODULES_DIR, "${fullpath}/noit")
615 MODULES_DIR=${fullpath}/noit
616 AC_SUBST(MODULES_DIR)
617
618 AC_MSG_CHECKING([Resolving sysconfdir path...])
619 fullpath=$sysconfdir
620 while test "x$temppath" != "x$fullpath" ; do
621   temppath=$fullpath
622   fullpath=`eval echo ${fullpath}`
623 done
624 fullpath=`echo $fullpath | sed "s~NONE~$ac_default_prefix~"`
625 AC_MSG_RESULT([$fullpath])
626 AC_DEFINE_UNQUOTED(ETC_DIR, "${fullpath}")
627 ETC_DIR=${fullpath}
628 AC_SUBST(ETC_DIR)
629
630
631 AC_OUTPUT([
632 Makefile
633 src/Makefile
634 src/eventer/Makefile
635 src/jlog/Makefile
636 src/jlog/perl/Makefile.PL
637 src/udns/Makefile
638 src/man/Makefile
639 src/modules/Makefile
640 src/modules-lua/Makefile
641 src/utils/Makefile
642 src/noitedit/Makefile
643 src/lua/Makefile
644 src/java/Makefile
645 src/java/run-iep.sh
646 src/scripts/noit-config
647 sql/Makefile
648 test/Makefile
649 ])
Note: See TracBrowser for help on using the browser.