Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 766 lines (699 sloc) 18.593 kb
AC_INIT(src/noitd.c)
node=`hostname | cut -f1 -d '.' | tr '[A-Z]' '[a-z]'`
if test -f ".configure.$node"; then
echo "***********************************************************"
echo "* Loading node specific configure settings for $node."
echo "***********************************************************"
. ./.configure.$node
fi
AC_CANONICAL_HOST
AC_CONFIG_HEADER(src/noit_config.h)
AC_CONFIG_HEADER(src/jlog/jlog_config.h)
AC_ARG_ENABLE(strict,
[AC_HELP_STRING([--enable-strict],
[Compile with warnings treated as errors])],
enable_strict="$enableval",
enable_strict=no)
AC_PROG_CC
AC_C_INLINE
AC_C_BIGENDIAN
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROG(AR, ar)
AC_PATH_PROGS(PERL, perl)
AC_PATH_PROGS(XSLTPROC, xsltproc)
AC_PATH_PROGS(XMLLINT, xmllint)
AC_PATH_PROGS(JAVA, java)
AC_PATH_PROGS(JAVA, java, , $JAVA_HOME/bin)
AC_PATH_PROGS(JAVAC, javac)
AC_PATH_PROGS(JAVAC, javac, , $JAVA_HOME/bin)
AC_PATH_PROGS(JAR, jar)
AC_PATH_PROGS(JAR, jar, , $JAVA_HOME/bin)
AC_PATH_PROG(NROFF, nroff)
AC_SUBST(PERL)
if test "x$GCC" = "xyes" ; then
CFLAGS="$CFLAGS -g -std=c99"
DEPFLAGS="-MM"
else
CFLAGS="$CFLAGS -g -xc99=all"
DEPFLAGS="-xM1"
fi
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200112L "'-I$(top_srcdir)/src'
DTRACEHDR=dtrace_probes.h
case $host in
*-*-darwin*)
DTRACE=/usr/sbin/dtrace
DTRACE_ENABLED=1
PICFLAGS="-fPIC"
CPPFLAGS="$CPPFLAGS -D_DARWIN_C_SOURCE"
MODULELD="$CC -bundle -flat_namespace -undefined suppress"
SHLD="$CC -dynamiclib -flat_namespace -undefined suppress"
MODULEEXT=bundle
RLDFLAG="-Wl,--rpath="
;;
*-*-solaris*)
DTRACE=/usr/sbin/dtrace
DTRACE_ENABLED=1
DTRACEOBJ=dtrace_stub.o
CPPFLAGS="$CPPFLAGS -D_XPG6 -D__EXTENSIONS__"
if test "x$GCC" != "xyes" ; then
AC_MSG_CHECKING([32 or 64 bit Solaris assembly])
if test -n "`echo $CFLAGS | grep m64`" ; then
DTRACEFLAGS=-64
if test -n "`isalist | grep sparc`"; then
AC_MSG_RESULT([sparc 64])
ATOMIC_OBJS="noit_atomic_sol_sparcv9.o"
else
AC_MSG_RESULT([intel 64])
ATOMIC_OBJS="noit_atomic_sol_x86_64.o"
fi
else
if test -n "`isalist | grep sparc`"; then
AC_MSG_RESULT([sparc 32])
ATOMIC_OBJS="noit_atomic_sol_sparcv8plus.o"
else
AC_MSG_RESULT([intel 32])
ATOMIC_OBJS="noit_atomic_sol_x86_32.o"
fi
fi
fi
if test "x$GCC" != "xyes" ; then
CFLAGS="$CFLAGS -mt"
PICFLAGS="-Kpic"
MODULELD="$CC -G"
SHLD="$CC -G"
else
PICFLAGS="-fPIC"
MODULELD="$CC -shared"
SHLD="$CC -shared"
fi
MODULEEXT=so
RLDFLAG="-R"
WHOLE_ARCHIVE="-Wl,-z -Wl,allextract"
NOWHOLE_ARCHIVE="-Wl,-z -Wl,defaultextract"
;;
*-*-openbsd*)
PICFLAGS="-fpic"
LDFLAGS="$LDFLAGS -Wl,-E"
MODULELD="$CC -shared"
SHLD="$CC -shared"
MODULEEXT=so
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include"
RLDFLAG="-Wl,--rpath="
WHOLE_ARCHIVE="-Wl,--whole-archive"
NOWHOLE_ARCHIVE="-Wl,--no-whole-archive"
;;
*-*-linux*)
LDFLAGS="$LDFLAGS -Wl,-E"
CPPFLAGS="$CPPFLAGS -D_SVID_SOURCE -D_BSD_SOURCE"
PICFLAGS="-fpic"
MODULELD="$CC -shared"
SHLD="$CC -shared"
MODULEEXT=so
RLDFLAG="-Wl,--rpath="
WHOLE_ARCHIVE="-Wl,--whole-archive"
NOWHOLE_ARCHIVE="-Wl,--no-whole-archive"
;;
*-*-freebsd*)
PICFLAGS="-fpic"
MODULELD="$CC -shared"
LDFLAGS="$LDFLAGS -export-dynamic -L/usr/local/lib"
CFLAGS="$CFLAGS -DCOMPAT_43TTY -I/usr/local/include"
MODULEEXT=so
RLDFLAG="-Wl,--rpath="
;;
*)
PICFLAGS="-fpic"
MODULELD="$CC -shared"
MODULEEXT=so
RLDFLAG="-Wl,--rpath="
;;
esac
AC_SUBST(DTRACE)
AC_SUBST(DTRACE_ENABLED)
if test "x$DTRACE_ENABLED" = "x1" ; then
AC_DEFINE(DTRACE_ENABLED)
fi
AC_SUBST(DTRACEOBJ)
AC_SUBST(DTRACEHDR)
AC_SUBST(DTRACEFLAGS)
AC_SUBST(SHLD)
AC_SUBST(RLDFLAG)
AC_SUBST(DEPFLAGS)
AC_SUBST(MODULELD)
AC_SUBST(MODULEEXT)
AC_SUBST(WHOLE_ARCHIVE)
AC_SUBST(NOWHOLE_ARCHIVE)
AC_SUBST(ATOMIC_OBJS)
AC_DEFINE_UNQUOTED(MODULEEXT, "$MODULEEXT", [module extension])
AC_MSG_CHECKING([enable build/install of the Java IEP and Jezebel bits])
if test -z "$ac_cv_path_JAVA" \
-o -z "$ac_cv_path_JAVAC" \
-o -z "$ac_cv_path_JAR" ; then
AC_MSG_RESULT([no])
else
if $ac_cv_path_JAVA -cp buildtools version 1.6 ; then
JAVAPARTS=java
AC_MSG_RESULT([yes])
else
JVERSION=`$ac_cv_path_JAVA -cp buildtools version 1.6`
AC_MSG_RESULT([too old: $JVERSION]);
fi
fi
AC_SUBST(JAVAPARTS)
# Checks for data types
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short int, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long int, 4)
AC_CHECK_SIZEOF(long long int, 8)
AC_CHECK_SIZEOF(void *, 1)
AC_CHECK_LIB(umem, umem_cache_create, , )
AC_CHECK_LIB(z, compress2, , [AC_MSG_ERROR(*** zlib is required ***)])
AC_CHECK_LIB(rt, sem_init, , )
AC_CHECK_LIB(posix4, sem_wait, , )
AC_CHECK_LIB(pthread, pthread_create, , )
AC_CHECK_LIB(protobuf-c, protobuf_c_message_get_packed_size, ,
[AC_MSG_ERROR(libprotobuf-c required)])
AC_CHECK_FUNC(uuid_generate, , [
AC_MSG_WARN([uuid_generate not available])
AC_SEARCH_LIBS(uuid_generate, uuid e2fs-uuid, , [AC_MSG_ERROR(*** uuid is required ***)])])
# Some libraries provide an unparse_lower command
# we use that, so if it isn't present, we'll need
# to implement it.
AC_CHECK_FUNC(uuid_unparse_lower, [AC_DEFINE(HAVE_UUID_UNPARSE_LOWER)], )
AC_CHECK_LIB(util, openpty, , )
AC_CHECK_LIB(termcap, tputs, , )
AC_CHECK_LIB(curses, clear, , [AC_MSG_ERROR([curses not found, but required])])
CPPFLAGS="$CPPFLAGS `pcre-config --cflags`"
LDFLAGS="$LDFLAGS `pcre-config --libs`"
AC_CHECK_LIB(pcre, pcre_compile, ,
[
AC_MSG_ERROR([libpcre not found, but required])
]
)
AC_CHECK_LIB(crypto, ERR_load_CRYPTO_strings, ,
[
AC_MSG_ERROR([libcrypto not found, but required])
]
)
AC_CHECK_LIB(ssl, SSL_library_init, ,
[
AC_MSG_ERROR([libssl not found, but required])
]
)
old_LIBS="$LIBS"
old_CFLAGS="$CFLAGS"
AC_CHECK_LIB(pq, PQconnectdb,
[
LIBS="$LIBS -lpq"
PGLIBS="$LIBS"
AC_SUBST(PGLIBS)
],
[
AC_MSG_ERROR([libpq required])
]
)
AC_MSG_CHECKING([libpq includes])
PQICFLAGS=`pg_config --includedir`
if test -n "$PQICFLAGS" ; then
CFLAGS="$CFLAGS -I$PQICFLAGS"
fi
AC_TRY_LINK([
#include <libpq-fe.h>
],
[ PGconn *dbh = PQconnectdb(""); ],
[],
[ AC_MSG_ERROR([Cannot compile/link against libpq]) ]
)
PGCFLAGS=$CFLAGS
AC_SUBST(PGCFLAGS)
LIBS=$old_LIBS
CFLAGS=$old_CFLAGS
AC_CHECK_HEADERS(mysql.h mysql/mysql.h)
if test "$ac_cv_header_mysql_h" = "no" -a "$ac_cv_header_mysql_mysql_h" = "no" ; then
AC_MSG_WARN([No libmysqlclient, skipping mysql module])
AC_SUBST(MYCFLAGS)
AC_SUBST(MYLIBS)
else
LIBS=$old_LIBS
CFLAGS=$old_CFLAGS
if test -z "$MYLIBS" ; then
MYLIBS="-lmysqlclient_r -lz -lssl -lcrypto"
fi
old_CFLAGS=$CFLAGS
old_LIBS=$LIBS
CFLAGS="$CFLAGS $MYCFLAGS"
LIBS="$MYLIBS"
AC_CHECK_FUNC(mysql_real_connect,
[
BUILD_MODULES="$BUILD_MODULES mysql.$MODULEEXT"
MYCFLAGS="$CFLAGS"
MYLIBS="$LIBS"
AC_SUBST(MYCFLAGS)
AC_SUBST(MYLIBS)
],
[
AC_MSG_WARN([No libmysqlclient, skipping mysql module])
AC_SUBST(MYCFLAGS)
AC_SUBST(MYLIBS)
]
)
LIBS=$old_LIBS
CFLAGS=$old_CFLAGS
fi
########
#
# CHECK FOR VARIOUS MODULE CRITERIA
# We don't track the libs themselves, as we'll just explictly link
# against the in the makefile if we enable them to build (by adding
# them to the BUILD_MODULES list).
#
########
# Should we build snmp checks?
AC_CHECK_HEADERS(net-snmp/net-snmp-config.h)
if test "$ac_cv_header_net_snmp_net_snmp_config_h" = "yes" ; then
SAVELIBS="$LIBS"
AC_CHECK_LIB(netsnmp, snmp_sess_open,
[
BUILD_MODULES="$BUILD_MODULES snmp.$MODULEEXT"
],
[
AC_MSG_WARN([No libnetsnmp, skipping snmp module])
]
)
LIBS="$SAVELIBS"
else
AC_MSG_WARN([No libnetsnmp, skipping snmp module])
fi
# Should we build ssh2 checks?
SAVELIBS="$LIBS"
AC_CHECK_LIB(ssh2, libssh2_session_init_ex,
[
BUILD_MODULES="$BUILD_MODULES ssh2.$MODULEEXT"
],
[
AC_MSG_WARN([No libssh2, skipping ssh2 module])
]
)
LIBS="$SAVELIBS"
AC_MSG_CHECKING([libxml2 cflags])
XML2CFLAGS=`xml2-config --cflags`
CFLAGS="$CFLAGS $XML2CFLAGS"
AC_MSG_RESULT([$XML2CFLAGS])
AC_MSG_CHECKING([libxml2 libs])
XML2LIBS=`xml2-config --libs`
LIBS="$LIBS $XML2LIBS"
AC_MSG_RESULT([$XML2LIBS])
AC_CHECK_FUNC(xmlParseDocument, , [AC_MSG_ERROR(*** libxml2 is required ***)])
AC_MSG_CHECKING([libxslt cflags])
XSLTCFLAGS=`xslt-config --cflags`
CFLAGS="$CFLAGS $XSLTCFLAGS"
AC_MSG_RESULT([$XSLTCFLAGS])
AC_MSG_CHECKING([libxslt libs])
XSLTLIBS=`xslt-config --libs`
LIBS="$LIBS $XSLTLIBS"
AC_MSG_RESULT([$XSLTLIBS])
AC_CHECK_FUNC(xsltParseStylesheetDoc, , [AC_MSG_ERROR(*** libxslt is required ***)])
APRPREFIX="`apr-1-config --prefix`"
AC_SUBST(APRPREFIX)
AC_MSG_RESULT([$APRPREFIX])
AC_MSG_CHECKING([libapr cflags])
APRCFLAGS="`apr-1-config --cflags --cppflags --includes`"
AC_SUBST(APRCFLAGS)
AC_MSG_RESULT([$APRCFLAGS])
AC_MSG_CHECKING([libapr libs])
APRLIBS="`apr-1-config --link-ld --ldflags --libs`"
AC_SUBST(APRLIBS)
AC_MSG_RESULT([$APRLIBS])
AC_TRY_LINK([],
[ issetugid(); ],
[ ac_cv_libc_defines_issetugid="yes" ],
[ ac_cv_libc_defines_issetugid="no" ]
)
if test "x$ac_cv_libc_defines_issetugid" = "xyes" ; then
AC_DEFINE(HAVE_ISSETUGID)
fi
AC_MSG_CHECKING([whether sem_init works])
AC_TRY_RUN(
[
#include <semaphore.h>
int main(void){sem_t s;return (0 != sem_init(&s,0,0));}
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(WORKING_SEM_INIT)
],
[
AC_MSG_RESULT(no)
AC_MSG_WARN([****** sem_init() is broken, I'll implement one myself.])
]
)
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(ssetugid strlcpy strnstrn openpty inet_pton inet_ntop getopt \
poll vasprintf)
# Checks for header files.
AC_CHECK_HEADERS(sys/file.h sys/types.h dirent.h sys/param.h fcntl.h errno.h limits.h \
sys/resource.h pthread.h semaphore.h pwd.h stdio.h stdlib.h string.h \
ctype.h unistd.h time.h pty.h sys/stat.h sys/event.h libkern/OSAtomic.h \
termio.h termios.h curses.h sys/cdefs.h grp.h netinet/in_systm.h \
sys/ioctl_compat.h sys/filio.h util.h sys/time.h sys/mman.h \
sys/ioctl.h stropts.h sys/stream.h alloca.h sys/wait.h bsd/libutil.h libutil.h)
AC_CHECK_HEADERS([term.h], [], [],
[[#ifdef HAVE_CURSES_H
# include <curses.h>
#endif
]])
AC_CHECK_DECLS([openpty], [], [],
[#if defined(HAVE_SYS_TYPES_H)
# include <sys/types.h>
#endif
#if defined(HAVE_SYS_IOCTL_H)
# include <sys/ioctl.h>
#endif
#if defined(HAVE_TERMIOS_H)
# include <termios.h>
#endif
#if defined(HAVE_BSD_LIBUTIL_H)
# include <bsd/libutil.h>
#elif defined(HAVE_LIBUTIL_H)
# include <libutil.h>
#endif
#if defined(HAVE_UTIL_H)
# include <util.h>
#endif
#if defined(HAVE_PTY_H)
# include <pty.h>
#endif
])
AC_CHECK_FUNCS(getpwnam_r)
GETPWNAM_R_POSIX
AC_CHECK_FUNCS(getgrnam_r)
GETGRNAM_R_POSIX
AC_MSG_CHECKING(for tputs() function final argument type)
AC_EGREP_CPP([tputs.*[(][ ]*char[ ]*[)]],
[#if defined(HAVE_TERM_H)
#include <term.h>
#endif
#if defined(HAVE_CURSES_H)
#include <curses.h>
#endif],
[AC_MSG_RESULT(char)
AC_DEFINE(TPUTS_TAKES_CHAR)],
[AC_MSG_RESULT(not char)])
AC_MSG_CHECKING(for tgoto() function final argument type)
AC_EGREP_CPP([tgoto.*[(][ ]*char[ ]*],
[#if defined(HAVE_TERM_H)
#include <term.h>
#endif
#if defined(HAVE_CURSES_H)
#include <curses.h>
#endif],
[AC_MSG_RESULT(char)
AC_DEFINE(TGOTO_TAKES_CHAR)],
[AC_MSG_RESULT(not char)])
AC_CACHE_CHECK([for epoll support], ac_cv_have_epoll, [
AC_TRY_LINK(
[ #include <sys/types.h> ],
[ int a; a = epoll_create(); ],
[ ac_cv_have_epoll="yes" ],
[ ac_cv_have_epoll="no" ]
)
])
if test "x$ac_cv_have_epoll" = "xyes" ; then
AC_DEFINE(HAVE_EPOLL)
EVENTER_OBJS="$EVENTER_OBJS eventer_epoll_impl.o"
AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "epoll")
have_epoll=1
fi
AC_CACHE_CHECK([for kqueue support], ac_cv_have_kqueue, [
AC_TRY_LINK(
[ #include <sys/types.h> ],
[ u_int a; a = kqueue(); ],
[ ac_cv_have_kqueue="yes" ],
[ ac_cv_have_kqueue="no" ]
)
])
if test "x$ac_cv_have_kqueue" = "xyes" ; then
AC_DEFINE(HAVE_KQUEUE)
EVENTER_OBJS="$EVENTER_OBJS eventer_kqueue_impl.o"
AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "kqueue")
have_kqueue=1
fi
AC_CACHE_CHECK([for Solaris ports support], ac_cv_have_ports, [
AC_TRY_LINK(
[ #include <port.h> ],
[ u_int a; a = port_create(); ],
[ ac_cv_have_ports="yes" ],
[ ac_cv_have_ports="no" ]
)
])
if test "x$ac_cv_have_ports" = "xyes" ; then
AC_DEFINE(HAVE_PORTS)
EVENTER_OBJS="$EVENTER_OBJS eventer_ports_impl.o"
AC_DEFINE_UNQUOTED(DEFAULT_EVENTER, "ports")
have_ports=1
fi
AC_SUBST(EVENTER_OBJS)
AC_CACHE_CHECK([for posix_readdir_r], ac_cv_have_posix_readdir_r, [
AC_TRY_COMPILE(
[ #include <dirent.h> ],
[ struct dirent *dep, de; readdir_r("/", &de, &dep); ],
[ ac_cv_have_posix_readdir_r="yes" ],
[ ac_cv_have_posix_readdir_r="no" ]
)
])
if test "x$ac_cv_have_posix_readdir_r" = "xyes" ; then
AC_DEFINE(HAVE_POSIX_READDIR_R)
have_posix_readdir_r=1
fi
AC_CACHE_CHECK([for sig_t type], ac_cv_have_sig_t, [
AC_TRY_COMPILE(
[ #include <signal.h> ],
[ sig_t a; (void)a;],
[ ac_cv_have_sig_t="yes" ],
[ ac_cv_have_sig_t="no" ]
)
])
if test "x$ac_cv_have_sig_t" = "xyes" ; then
AC_DEFINE(HAVE_SIG_T)
have_sig_t=1
fi
AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ u_int a; a = 1;],
[ ac_cv_have_u_int="yes" ],
[ ac_cv_have_u_int="no" ]
)
])
if test "x$ac_cv_have_u_int" = "xyes" ; then
AC_DEFINE(HAVE_U_INT)
have_u_int=1
fi
AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
[ ac_cv_have_intxx_t="yes" ],
[ ac_cv_have_intxx_t="no" ]
)
])
if test "x$ac_cv_have_intxx_t" = "xyes" ; then
AC_DEFINE(HAVE_INTXX_T)
have_intxx_t=1
fi
AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ int64_t a; a = 1;],
[ ac_cv_have_int64_t="yes" ],
[ ac_cv_have_int64_t="no" ]
)
])
if test "x$ac_cv_have_int64_t" = "xyes" ; then
AC_DEFINE(HAVE_INT64_T)
have_int64_t=1
fi
AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
[ ac_cv_have_u_intxx_t="yes" ],
[ ac_cv_have_u_intxx_t="no" ]
)
])
if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
AC_DEFINE(HAVE_U_INTXX_T)
have_u_intxx_t=1
fi
AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
AC_TRY_COMPILE(
[ #include <sys/types.h> ],
[ u_int64_t a; a = 1;],
[ ac_cv_have_u_int64_t="yes" ],
[ ac_cv_have_u_int64_t="no" ]
)
])
if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
AC_DEFINE(HAVE_U_INT64_T)
have_u_int64_t=1
fi
if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
test "x$ac_cv_header_sys_bitypes_h" = "xyes")
then
AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
AC_TRY_COMPILE(
[
#include <sys/bitypes.h>
],
[
int8_t a; int16_t b; int32_t c;
u_int8_t e; u_int16_t f; u_int32_t g;
a = b = c = e = f = g = 1;
],
[
AC_DEFINE(HAVE_U_INTXX_T)
AC_DEFINE(HAVE_INTXX_T)
AC_MSG_RESULT(yes)
],
[AC_MSG_RESULT(no)]
)
fi
if test -z "$have_u_intxx_t" ; then
AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
],
[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
[ ac_cv_have_uintxx_t="yes" ],
[ ac_cv_have_uintxx_t="no" ]
)
])
if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
AC_DEFINE(HAVE_UINTXX_T)
fi
fi
AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
],
[socklen_t foo; foo = 1235;],
[ ac_cv_have_socklen_t="yes" ],
[ ac_cv_have_socklen_t="no" ]
)
])
if test "x$ac_cv_have_socklen_t" = "xyes" ; then
AC_DEFINE(HAVE_SOCKLEN_T)
fi
AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
],
[ size_t foo; foo = 1235; ],
[ ac_cv_have_size_t="yes" ],
[ ac_cv_have_size_t="no" ]
)
])
if test "x$ac_cv_have_size_t" = "xyes" ; then
AC_DEFINE(HAVE_SIZE_T)
fi
AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
AC_TRY_COMPILE(
[
#include <sys/types.h>
],
[ ssize_t foo; foo = 1235; ],
[ ac_cv_have_ssize_t="yes" ],
[ ac_cv_have_ssize_t="no" ]
)
])
if test "x$ac_cv_have_ssize_t" = "xyes" ; then
AC_DEFINE(HAVE_SSIZE_T)
fi
AC_SUBST(BUILD_MODULES)
docdir="docs"
mansubdir="man"
AC_SUBST(docdir)
AC_SUBST(mansubdir)
SHCFLAGS="$PICFLAGS $CFLAGS"
AC_SUBST(SHCFLAGS)
SUBPREFIX="$prefix"
if test "x$prefix" = "xNONE"; then
SUBPREFIX="$ac_default_prefix"
fi
AC_MSG_CHECKING([Resolving libexec path...])
fullpath=$libexecdir
while test "x$temppath" != "x$fullpath" ; do
temppath=$fullpath
fullpath=`eval echo ${fullpath}`
done
fullpath=`echo $fullpath | sed "s~NONE~$SUBPREFIX~"`
AC_MSG_RESULT([$fullpath/noit])
AC_DEFINE_UNQUOTED(MODULES_DIR, "${fullpath}/noit")
MODULES_DIR=${fullpath}/noit
AC_SUBST(MODULES_DIR)
JAVA_LIB_DIR="$prefix/java"
AC_ARG_WITH(java-libdir,
[--with-javalibdir=PFX prefix to install java libs (optional)],
[JAVA_LIB_DIR=$withval],)
AC_MSG_CHECKING([Resolving javalibdir path...])
fullpath=$JAVA_LIB_DIR
while test "x$temppath" != "x$fullpath" ; do
temppath=$fullpath
fullpath=`eval echo ${fullpath}`
done
fullpath=`echo $fullpath | sed "s~NONE~$SUBPREFIX~"`
JAVA_LIB_DIR=$fullpath
AC_MSG_RESULT([$fullpath])
AC_SUBST(JAVA_LIB_DIR)
AC_MSG_CHECKING([Resolving sysconfdir path...])
fullpath=$sysconfdir
while test "x$temppath" != "x$fullpath" ; do
temppath=$fullpath
fullpath=`eval echo ${fullpath}`
done
fullpath=`echo $fullpath | sed "s~NONE~$SUBPREFIX~"`
AC_MSG_RESULT([$fullpath])
AC_DEFINE_UNQUOTED(ETC_DIR, "${fullpath}")
ETC_DIR=${fullpath}
AC_SUBST(ETC_DIR)
if test -n "`$CC -V 2>&1 | grep 'Sun C'`"; then
if test "$enable_string" != "no"; then
CFLAGS="$CFLAGS -errwarn=%all"
fi
else
CFLAGS="$CFLAGS -Wall"
if test "$enable_strict" != "no"; then
CFLAGS="$CFLAGS -Werror"
fi
fi
AC_OUTPUT([
Makefile
src/Makefile
src/eventer/Makefile
src/jlog/Makefile
src/jlog/perl/Makefile.PL
src/udns/Makefile
src/json-lib/Makefile
src/yajl-lib/Makefile
src/man/Makefile
src/modules/Makefile
src/modules-lua/Makefile
src/utils/Makefile
src/noitedit/Makefile
src/lua/Makefile
src/java/Makefile
src/java/run-iep.sh
src/java/jezebel
src/scripts/noit-config
sql/Makefile
test/Makefile
])
Jump to Line
Something went wrong with that request. Please try again.