root/configure.in

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

add a helper for compiling external module

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