root/configure.in

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

print out the version stuff in configure

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