root/configure.in

Revision d3854117f2d3202c93f2df208dbeee0d2f82e529, 14.8 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

fixes #241

  • 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 [ "$DTRACE_ENABLED" == "1" ]; 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 NOIT_SVNVERSION=`svnversion`
140 AC_DEFINE_UNQUOTED(NOIT_SVNVERSION, "$NOIT_SVNVERSION", [svn version from wc])
141
142 # Checks for data types
143 AC_CHECK_SIZEOF(char, 1)
144 AC_CHECK_SIZEOF(short int, 2)
145 AC_CHECK_SIZEOF(int, 4)
146 AC_CHECK_SIZEOF(long int, 4)
147 AC_CHECK_SIZEOF(long long int, 8)
148 AC_CHECK_SIZEOF(void *, 1)
149
150 AC_CHECK_LIB(z, compress2, , [AC_MSG_ERROR(*** zlib is required ***)])
151 AC_CHECK_LIB(rt, sem_init, , )
152 AC_CHECK_LIB(posix4, sem_wait, , )
153 AC_CHECK_LIB(pthread, pthread_create, , )
154 AC_CHECK_FUNC(uuid_generate, , [
155   AC_MSG_WARN([uuid_generate not available])
156   AC_CHECK_LIB(uuid, uuid_generate, , [AC_MSG_ERROR(*** uuid is required ***)])])
157
158 # Some libraries provide an unparse_lower command
159 # we use that, so if it isn't present, we'll need
160 # to implement it.
161 AC_CHECK_FUNC(uuid_unparse_lower, [AC_DEFINE(HAVE_UUID_UNPARSE_LOWER)], )
162 AC_CHECK_LIB(util, openpty, , )
163 AC_CHECK_LIB(termcap, tputs, , )
164 AC_CHECK_LIB(curses, clear, , [AC_MSG_ERROR([curses not found, but required])])
165
166 CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
167 LDFLAGS="$LDFLAGS `pcre-config --libs`"
168 AC_CHECK_LIB(pcre, pcre_compile, ,
169         [
170                 AC_MSG_ERROR([libpcre not found, but required])
171         ]
172 )
173 AC_CHECK_LIB(crypto, ERR_load_CRYPTO_strings, ,
174         [
175                 AC_MSG_ERROR([libcrypto not found, but required])
176         ]
177 )
178 AC_CHECK_LIB(ssl, SSL_library_init, ,
179         [
180                 AC_MSG_ERROR([libssl not found, but required])
181         ]
182 )
183
184 old_LIBS=$LIBS
185 old_CFLAGS=$CFLAGS
186 AC_CHECK_LIB(pq, PQconnectdb,
187         [
188                 LIBS="$LIBS -lpq"
189                 PGLIBS="$LIBS"
190                 AC_SUBST(PGLIBS)
191         ],
192         [
193                 AC_MSG_ERROR([libpq required])
194         ]
195 )
196
197 AC_MSG_CHECKING([libpq includes])
198 PQICFLAGS=`pg_config --includedir`
199 if test -n "$PQICFLAGS" ; then
200   CFLAGS="$CFLAGS -I$PQICFLAGS"
201 fi
202
203 AC_TRY_LINK([
204         #include <libpq-fe.h>
205         ],
206         [ PGconn *dbh = PQconnectdb(""); ],
207         [],
208         [ AC_MSG_ERROR([Cannot compile/link against libpq]) ]
209 )
210 PGCFLAGS=$CFLAGS
211 AC_SUBST(PGCFLAGS)
212
213 AC_CHECK_HEADERS(mysql.h mysql/mysql.h)
214
215 if test "$ac_cv_header_mysql_h" = "no" -a "$ac_cv_header_mysql_mysql_h" = "no" ; then
216         AC_MSG_WARN([No libmysqlclient, skipping mysql module])
217         AC_SUBST(MYCFLAGS)
218         AC_SUBST(MYLIBS)
219 else
220         LIBS=$old_LIBS
221         CFLAGS=$old_CFLAGS
222        
223         if test -z "$MYLIBS" ; then
224           MYLIBS="-lmysqlclient_r -lz -lssl -lcrypto"
225         fi
226        
227         old_CFLAGS=$CFLAGS
228         old_LIBS=$LIBS
229         CFLAGS="$CFLAGS $MYCFLAGS"
230         LIBS="$MYLIBS"
231        
232         AC_CHECK_FUNC(mysql_real_connect,
233                 [
234                         BUILD_MODULES="$BUILD_MODULES mysql.$MODULEEXT"
235                         MYCFLAGS="$CFLAGS"
236                         MYLIBS="$LIBS"
237                         AC_SUBST(MYCFLAGS)
238                         AC_SUBST(MYLIBS)
239                 ],
240                 [
241                         AC_MSG_WARN([No libmysqlclient, skipping mysql module])
242                         AC_SUBST(MYCFLAGS)
243                         AC_SUBST(MYLIBS)
244                 ]
245         )
246        
247        
248         LIBS=$old_LIBS
249         CFLAGS=$old_CFLAGS
250 fi
251
252 ########
253 #
254 # CHECK FOR VARIOUS MODULE CRITERIA
255 # We don't track the libs themselves, as we'll just explictly link
256 # against the in the makefile if we enable them to build (by adding
257 # them to the BUILD_MODULES list).
258 #
259 ########
260
261 # Should we build snmp checks?
262 AC_CHECK_HEADERS(net-snmp/net-snmp-includes.h)
263 if test "$ac_cv_header_net_snmp_net_snmp_includes_h" = "yes" ; then
264 SAVELIBS="$LIBS"
265 AC_CHECK_LIB(netsnmp, snmp_sess_open,
266         [
267                 BUILD_MODULES="$BUILD_MODULES snmp.$MODULEEXT"
268         ],
269         [
270                 AC_MSG_WARN([No libnetsnmp, skipping snmp module])
271         ]
272 )
273 LIBS="$SAVELIBS"
274 else
275         AC_MSG_WARN([No libnetsnmp, skipping snmp module])
276 fi
277
278 # Should we build ssh2 checks?
279 SAVELIBS="$LIBS"
280 AC_CHECK_LIB(ssh2, libssh2_session_init_ex,
281         [
282                 BUILD_MODULES="$BUILD_MODULES ssh2.$MODULEEXT"
283         ],
284         [
285                 AC_MSG_WARN([No libssh2, skipping ssh2 module])
286         ]
287 )
288 LIBS="$SAVELIBS"
289
290 AC_MSG_CHECKING([libxml2 cflags])
291 XML2CFLAGS=`xml2-config --cflags`
292 CFLAGS="$CFLAGS $XML2CFLAGS"
293 AC_MSG_RESULT([$XML2CFLAGS])
294
295 AC_MSG_CHECKING([libxml2 libs])
296 XML2LIBS=`xml2-config --libs`
297 LIBS="$LIBS $XML2LIBS"
298 AC_MSG_RESULT([$XML2LIBS])
299
300 AC_CHECK_FUNC(xmlParseDocument, , [AC_MSG_ERROR(*** libxml2 is required ***)])
301
302 AC_MSG_CHECKING([libxslt cflags])
303 XSLTCFLAGS=`xslt-config --cflags`
304 CFLAGS="$CFLAGS $XSLTCFLAGS"
305 AC_MSG_RESULT([$XSLTCFLAGS])
306
307 AC_MSG_CHECKING([libxslt libs])
308 XSLTLIBS=`xslt-config --libs`
309 LIBS="$LIBS $XSLTLIBS"
310 AC_MSG_RESULT([$XSLTLIBS])
311
312 AC_CHECK_FUNC(xsltParseStylesheetDoc, , [AC_MSG_ERROR(*** libxslt is required ***)])
313
314 APRPREFIX="`apr-1-config --prefix`"
315 AC_SUBST(APRPREFIX)
316 AC_MSG_RESULT([$APRPREFIX])
317
318 AC_MSG_CHECKING([libapr cflags])
319 APRCFLAGS="`apr-1-config --cflags --cppflags --includes`"
320 AC_SUBST(APRCFLAGS)
321 AC_MSG_RESULT([$APRCFLAGS])
322
323 AC_MSG_CHECKING([libapr libs])
324 APRLIBS="`apr-1-config --link-ld --ldflags --libs`"
325 AC_SUBST(APRLIBS)
326 AC_MSG_RESULT([$APRLIBS])
327
328 AC_TRY_LINK([],
329         [ issetugid(); ],
330         [ ac_cv_libc_defines_issetugid="yes" ],
331         [ ac_cv_libc_defines_issetugid="no" ]
332 )
333 if test "x$ac_cv_libc_defines_issetugid" = "xyes" ; then
334         AC_DEFINE(HAVE_ISSETUGID)
335 fi
336
337 AC_MSG_CHECKING([whether sem_init works])
338 AC_TRY_RUN(
339         [
340 #include <semaphore.h>
341 int main(void){sem_t s;return (0 != sem_init(&s,0,0));}
342         ],
343         [
344                 AC_MSG_RESULT(yes)
345                 AC_DEFINE(WORKING_SEM_INIT)
346         ],
347         [
348                 AC_MSG_RESULT(no)
349                 AC_MSG_WARN([****** sem_init() is broken, I'll implement one myself.])
350         ]
351 )
352
353 AC_FUNC_STRFTIME
354 AC_CHECK_FUNCS(ssetugid strlcpy strnstrn openpty inet_pton inet_ntop getopt \
355                poll)
356
357 # Checks for header files.
358 AC_CHECK_HEADERS(sys/file.h sys/types.h dirent.h sys/param.h fcntl.h errno.h limits.h \
359                  sys/resource.h pthread.h semaphore.h pwd.h stdio.h stdlib.h string.h \
360                  ctype.h unistd.h time.h pty.h sys/stat.h sys/event.h libkern/OSAtomic.h \
361                  term.h termio.h termios.h curses.h sys/cdefs.h grp.h netinet/in_systm.h \
362                  sys/ioctl_compat.h sys/filio.h util.h sys/time.h sys/mman.h \
363                  stropts.h sys/stream.h alloca.h sys/wait.h)
364
365 AC_CHECK_FUNCS(getpwnam_r)
366 GETPWNAM_R_POSIX
367 AC_CHECK_FUNCS(getgrnam_r)
368 GETGRNAM_R_POSIX
369
370 AC_MSG_CHECKING(for tputs() function final argument type)
371 AC_EGREP_CPP([tputs.*[(][       ]*char[         ]*[)]],
372                 [#if defined(HAVE_TERM_H)
373                  #include <term.h>
374                  #endif
375                  #if defined(HAVE_CURSES_H)
376                  #include <curses.h>
377                  #endif],
378                 [AC_MSG_RESULT(char)
379                  AC_DEFINE(TPUTS_TAKES_CHAR)],
380                 [AC_MSG_RESULT(not char)])
381
382 AC_CACHE_CHECK([for epoll support], ac_cv_have_epoll, [
383         AC_TRY_LINK(
384                 [ #include <sys/types.h> ],
385                 [ u_int a; a = epoll_create(); ],
386                 [ ac_cv_have_epoll="yes" ],
387                 [ ac_cv_have_epoll="no" ]
388         )
389 ])
390 if test "x$ac_cv_have_epoll" = "xyes" ; then
391         AC_DEFINE(HAVE_EPOLL)
392         EVENTER_OBJS="$EVENTER_OBJS eventer_epoll_impl.o"
393         AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "epoll")
394         have_epoll=1
395 fi
396
397 AC_CACHE_CHECK([for kqueue support], ac_cv_have_kqueue, [
398         AC_TRY_LINK(
399                 [ #include <sys/types.h> ],
400                 [ u_int a; a = kqueue(); ],
401                 [ ac_cv_have_kqueue="yes" ],
402                 [ ac_cv_have_kqueue="no" ]
403         )
404 ])
405 if test "x$ac_cv_have_kqueue" = "xyes" ; then
406         AC_DEFINE(HAVE_KQUEUE)
407         EVENTER_OBJS="$EVENTER_OBJS eventer_kqueue_impl.o"
408         AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "kqueue")
409         have_kqueue=1
410 fi
411
412 AC_CACHE_CHECK([for Solaris ports support], ac_cv_have_ports, [
413         AC_TRY_LINK(
414                 [ #include <port.h> ],
415                 [ u_int a; a = port_create(); ],
416                 [ ac_cv_have_ports="yes" ],
417                 [ ac_cv_have_ports="no" ]
418         )
419 ])
420 if test "x$ac_cv_have_ports" = "xyes" ; then
421         AC_DEFINE(HAVE_PORTS)
422         EVENTER_OBJS="$EVENTER_OBJS eventer_ports_impl.o"
423         AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "ports")
424         have_ports=1
425 fi
426
427 AC_SUBST(EVENTER_OBJS)
428
429 AC_CACHE_CHECK([for posix_readdir_r], ac_cv_have_posix_readdir_r, [
430         AC_TRY_COMPILE(
431                 [ #include <dirent.h> ],
432                 [ struct dirent *dep, de; readdir_r("/", &de, &dep); ],
433                 [ ac_cv_have_posix_readdir_r="yes" ],
434                 [ ac_cv_have_posix_readdir_r="no" ]
435         )
436 ])
437 if test "x$ac_cv_have_posix_readdir_r" = "xyes" ; then
438         AC_DEFINE(HAVE_POSIX_READDIR_R)
439         have_posix_readdir_r=1
440 fi
441
442 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
443         AC_TRY_COMPILE(
444                 [ #include <sys/types.h> ],
445                 [ u_int a; a = 1;],
446                 [ ac_cv_have_u_int="yes" ],
447                 [ ac_cv_have_u_int="no" ]
448         )
449 ])
450 if test "x$ac_cv_have_u_int" = "xyes" ; then
451         AC_DEFINE(HAVE_U_INT)
452         have_u_int=1
453 fi
454
455 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
456         AC_TRY_COMPILE(
457                 [ #include <sys/types.h> ],
458                 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
459                 [ ac_cv_have_intxx_t="yes" ],
460                 [ ac_cv_have_intxx_t="no" ]
461         )
462 ])
463 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
464         AC_DEFINE(HAVE_INTXX_T)
465         have_intxx_t=1
466 fi
467        
468 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
469         AC_TRY_COMPILE(
470                 [ #include <sys/types.h> ],
471                 [ int64_t a; a = 1;],
472                 [ ac_cv_have_int64_t="yes" ],
473                 [ ac_cv_have_int64_t="no" ]
474         )
475 ])
476 if test "x$ac_cv_have_int64_t" = "xyes" ; then
477         AC_DEFINE(HAVE_INT64_T)
478         have_int64_t=1
479 fi
480        
481 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
482         AC_TRY_COMPILE(
483                 [ #include <sys/types.h> ],
484                 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
485                 [ ac_cv_have_u_intxx_t="yes" ],
486                 [ ac_cv_have_u_intxx_t="no" ]
487         )
488 ])
489 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
490         AC_DEFINE(HAVE_U_INTXX_T)
491         have_u_intxx_t=1
492 fi
493
494 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
495         AC_TRY_COMPILE(
496                 [ #include <sys/types.h> ],
497                 [ u_int64_t a; a = 1;],
498                 [ ac_cv_have_u_int64_t="yes" ],
499                 [ ac_cv_have_u_int64_t="no" ]
500         )
501 ])
502 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
503         AC_DEFINE(HAVE_U_INT64_T)
504         have_u_int64_t=1
505 fi
506
507 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
508            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
509 then
510         AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
511         AC_TRY_COMPILE(
512                 [
513 #include <sys/bitypes.h>
514                 ],
515                 [
516                         int8_t a; int16_t b; int32_t c;
517                         u_int8_t e; u_int16_t f; u_int32_t g;
518                         a = b = c = e = f = g = 1;
519                 ],
520                 [
521                         AC_DEFINE(HAVE_U_INTXX_T)
522                         AC_DEFINE(HAVE_INTXX_T)
523                         AC_MSG_RESULT(yes)
524                 ],
525                 [AC_MSG_RESULT(no)]
526         )
527 fi
528
529 if test -z "$have_u_intxx_t" ; then
530         AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
531                 AC_TRY_COMPILE(
532                         [
533 #include <sys/types.h>
534                         ],
535                         [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
536                         [ ac_cv_have_uintxx_t="yes" ],
537                         [ ac_cv_have_uintxx_t="no" ]
538                 )
539         ])
540         if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
541                 AC_DEFINE(HAVE_UINTXX_T)
542         fi
543 fi
544
545 AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
546         AC_TRY_COMPILE(
547                 [
548 #include <sys/types.h>
549 #include <sys/socket.h>
550                 ],
551                 [socklen_t foo; foo = 1235;],
552                 [ ac_cv_have_socklen_t="yes" ],
553                 [ ac_cv_have_socklen_t="no" ]
554         )
555 ])
556 if test "x$ac_cv_have_socklen_t" = "xyes" ; then
557         AC_DEFINE(HAVE_SOCKLEN_T)
558 fi
559
560 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
561         AC_TRY_COMPILE(
562                 [
563 #include <sys/types.h>
564                 ],
565                 [ size_t foo; foo = 1235; ],
566                 [ ac_cv_have_size_t="yes" ],
567                 [ ac_cv_have_size_t="no" ]
568         )
569 ])
570 if test "x$ac_cv_have_size_t" = "xyes" ; then
571         AC_DEFINE(HAVE_SIZE_T)
572 fi
573
574 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
575         AC_TRY_COMPILE(
576                 [
577 #include <sys/types.h>
578                 ],
579                 [ ssize_t foo; foo = 1235; ],
580                 [ ac_cv_have_ssize_t="yes" ],
581                 [ ac_cv_have_ssize_t="no" ]
582         )
583 ])
584 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
585         AC_DEFINE(HAVE_SSIZE_T)
586 fi
587
588 AC_SUBST(BUILD_MODULES)
589
590 docdir="docs"
591 mansubdir="man"
592 AC_SUBST(docdir)
593 AC_SUBST(mansubdir)
594 SHCFLAGS="$PICFLAGS $CFLAGS"
595 AC_SUBST(SHCFLAGS)
596
597 AC_MSG_CHECKING([Resolving libexec path...])
598 fullpath=$libexecdir
599 while test "x$temppath" != "x$fullpath" ; do
600   temppath=$fullpath
601   fullpath=`eval echo ${fullpath}`
602 done
603 fullpath=`echo $fullpath | sed "s~NONE~$ac_default_prefix~"`
604 AC_MSG_RESULT([$fullpath/noit])
605 AC_DEFINE_UNQUOTED(MODULES_DIR, "${fullpath}/noit")
606 MODULES_DIR=${fullpath}/noit
607 AC_SUBST(MODULES_DIR)
608
609 AC_MSG_CHECKING([Resolving sysconfdir path...])
610 fullpath=$sysconfdir
611 while test "x$temppath" != "x$fullpath" ; do
612   temppath=$fullpath
613   fullpath=`eval echo ${fullpath}`
614 done
615 fullpath=`echo $fullpath | sed "s~NONE~$ac_default_prefix~"`
616 AC_MSG_RESULT([$fullpath])
617 AC_DEFINE_UNQUOTED(ETC_DIR, "${fullpath}")
618 ETC_DIR=${fullpath}
619 AC_SUBST(ETC_DIR)
620
621
622 AC_OUTPUT([
623 Makefile
624 src/Makefile
625 src/eventer/Makefile
626 src/jlog/Makefile
627 src/jlog/perl/Makefile.PL
628 src/udns/Makefile
629 src/man/Makefile
630 src/modules/Makefile
631 src/modules-lua/Makefile
632 src/utils/Makefile
633 src/noitedit/Makefile
634 src/lua/Makefile
635 src/java/Makefile
636 src/java/run-iep.sh
637 src/scripts/noit-config
638 sql/Makefile
639 test/Makefile
640 ])
Note: See TracBrowser for help on using the browser.