diff -urN ntop.org/Makefile.am ntop/Makefile.am --- ntop.org/Makefile.am Mon Mar 26 19:30:37 2001 +++ ntop/Makefile.am Mon Mar 26 20:14:32 2001 @@ -214,15 +214,15 @@ @echo "" install-data-local: - @cp -p ntop-cert.pem $(bindir)/ntop-cert.pem - @$(top_srcdir)/mkinstalldirs $(libdir)/plugins; - @$(top_srcdir)/mkinstalldirs $(datadir)/ntop; - @$(top_srcdir)/mkinstalldirs $(datadir)/ntop/html; + @cp -p ntop-cert.pem $(DESTDIR)$(bindir)/ntop-cert.pem + @$(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir)/plugins; + @$(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/ntop; + @$(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/ntop/html; @for file in $(NTOPHTML); do \ if test -d $$file; then \ - $(top_srcdir)/mkinstalldirs $(datadir)/ntop/$$file; \ + $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)/ntop/$$file; \ else \ - cp -p $$file $(datadir)/ntop/$$file; \ + cp -p $$file $(DESTDIR)$(datadir)/ntop/$$file; \ fi; \ done diff -urN ntop.org/configure.in ntop/configure.in --- ntop.org/configure.in Mon Mar 26 19:30:37 2001 +++ ntop/configure.in Mon Mar 26 20:16:17 2001 @@ -385,12 +385,18 @@ echo "checking for ncurses.h... yes" AC_DEFINE(HAVE_NCURSES_H) else + if test -f "/usr/include/ncurses/ncurses.h"; then + echo "checking for ncurses/ncurses.h... yes" + CFLAGS="$CFLAGS -I/usr/include/ncurses" + AC_DEFINE(HAVE_NCURSES_H) + else if test -f "/usr/include/curses.h"; then echo "checking for curses.h... yes" AC_DEFINE(HAVE_CURSES_H) else AC_MSG_WARN([It looks that you don't have ncurses.h/curses.h installed. Some ntop's features will be disabled.]) fi + fi fi fi @@ -534,7 +540,23 @@ dnl> if test ".$ac_enable_tcpwrap" = ".yes"; then AC_MSG_WARN([TCP Wrap support enabled, if available, via command line option!]) - AC_CHECK_LIB(wrap, request_init, MORELIBS="$MORELIBS -lwrap" && AC_DEFINE(HAVE_LIBWRAP)) + AC_MSG_CHECKING(for libwrap) + saved_LIBS="$LIBS" + LIBS="$LIBS -lwrap" + AC_TRY_LINK([ +#include +int deny_severity = 0, allow_severity = 0; + ], + [hosts_access(0);], + [ + AC_MSG_RESULT(yes) + MORELIBS="$MORELIBS -lwrap" + AC_DEFINE(HAVE_LIBWRAP) + ], + [ + AC_MSG_RESULT(no) + ]) + LIBS="$saved_LIBS" fi @@ -860,12 +882,9 @@ if test ".${GDCHART_ROOT}" != .; then if test -d $GDCHART_ROOT && test -r $GDCHART_ROOT/libgdchart.a && - test -r $GDCHART_ROOT/gdc.h && - test -r $GDCHART_ROOT/gd-1.8.3/libgd.a && - test -r $GDCHART_ROOT/gd-1.8.3/gd.h && - test -r $GDCHART_ROOT/zlib-1.1.3/libz.a; then + test -r $GDCHART_ROOT/gdc.h; then GDCHART_ROOT=`cd ${GDCHART_ROOT} && pwd` - MORELIBS="${MORELIBS} -L$GDCHART_ROOT -lgdchart -L$GDCHART_ROOT/gd-1.8.3 -lgd -L$GDCHART_ROOT/gd-1.8.3/libpng-1.0.8 -lpng -L$GDCHART_ROOT/zlib-1.1.3 -lz" + MORELIBS="${MORELIBS} -L$GDCHART_ROOT -lgdchart -lgd -lpng -lz" INCS="${INCS} -I$GDCHART_ROOT" AC_DEFINE(HAVE_GDCHART) AC_MSG_RESULT([found in $GDCHART_ROOT]) @@ -883,14 +902,10 @@ else if test -d ../gdchart0.94c && test -r ../gdchart0.94c/gdc.h && - test -r ../gdchart0.94c/libgdchart.a && - test -r ../gdchart0.94c/gd-1.8.3/libgd.a && - test -r ../gdchart0.94c/gd-1.8.3/gd.h && - test -r ../gdchart0.94c/gd-1.8.3/libpng-1.0.8/libpng.a && - test -r ../gdchart0.94c/gd-1.8.3/libpng-1.0.8/gd.h; then + test -r ../gdchart0.94c/libgdchart.a; then GDCHART_ROOT="../gdchart0.94c" GDCHART_ROOT=`cd ${GDCHART_ROOT} && pwd` - MORELIBS="${MORELIBS} -L$GDCHART_ROOT -lgdchart -L$GDCHART_ROOT/gd-1.8.3 -lgd -L$GDCHART_ROOT/gd-1.8.3/libpng-1.0.8 -lpng" + MORELIBS="${MORELIBS} -L$GDCHART_ROOT -lgdchart -lgd -lpng" INCS="${INCS} -I$GDCHART_ROOT" AC_DEFINE(HAVE_GDCHART) AC_MSG_RESULT([found in $GDCHART_ROOT]) @@ -921,11 +936,14 @@ AC_MSG_CHECKING([for OpenSSL Library by Open SLL Project (optional package)]) if test ".${OSSL_ROOT}" != .; then if test -d $OSSL_ROOT && - test -r $OSSL_ROOT/libssl.a && - test -r $OSSL_ROOT/openssl/ssl.h; then + test -r $OSSL_ROOT/lib/libssl.so && + test -r $OSSL_ROOT/include/openssl/ssl.h; then + if test -f $OSSL_ROOT/lib/libcrypto.so; then + MORELIBS="${MORELIBS} -lcrypto" + fi OSSL_ROOT=`cd ${OSSL_ROOT} && pwd` - MORELIBS="${MORELIBS} -L$OSSL_ROOT -lssl" - INCS="${INCS} -I$OSSL_ROOT" + MORELIBS="${MORELIBS} -L$OSSL_ROOT/lib -lssl" + INCS="${INCS} -I$OSSL_ROOT/include/openssl" AC_DEFINE(HAVE_OPENSSL) AC_MSG_RESULT([found in $OSSL_ROOT]) else @@ -1005,8 +1023,7 @@ dnl> Do not walk in the plugins/ subdir if the user decided he/she does not need any plugin. dnl> if test "$ac_disable_plugins" = yes; then - PLUGINS='' -else + PLUGINS='' AC_MSG_WARN([compilation of ntop's plugins disabled via command line option!]) fi diff -urN ntop.org/intop/intop.c ntop/intop/intop.c --- ntop.org/intop/intop.c Mon Mar 26 19:30:37 2001 +++ ntop/intop/intop.c Mon Mar 26 20:14:32 2001 @@ -66,6 +66,10 @@ int active = -1; /* an index for the active interface (if any) */ int previous = -1; /* an index for the previous interface (if any) */ +#ifdef HAVE_LIBWRAP +int allow_severity = LOG_INFO; +int deny_severity = LOG_WARNING; +#endif /* * You are welcome! diff -urN ntop.org/main.c ntop/main.c --- ntop.org/main.c Mon Mar 26 19:30:37 2001 +++ ntop/main.c Mon Mar 26 20:14:32 2001 @@ -67,6 +67,10 @@ /* That's the meat */ int main(int argc, char *argv[]) { +#ifdef HAVE_LIBWRAP + int allow_severity = LOG_INFO; + int deny_severity = LOG_WARNING; +#endif int pflag, i; #ifdef WIN32 int optind=0; diff -urN ntop.org/plugins/Makefile.am ntop/plugins/Makefile.am --- ntop.org/plugins/Makefile.am Mon Mar 26 19:30:37 2001 +++ ntop/plugins/Makefile.am Mon Mar 26 20:14:32 2001 @@ -93,9 +93,9 @@ @ln -s .libs/libwapPlugin.so wapPlugin.so install-data-local: - @$(top_srcdir)/mkinstalldirs $(plugindir); + @$(top_srcdir)/mkinstalldirs $(DESTDIR)$(plugindir); @for file in $(noinst_PROGRAMS); do \ - cp -p $$file $(plugindir)/$$file; \ + cp -p $$file $(DESTDIR)$(plugindir)/$$file; \ done # remove installed libraries @for file in $(lib_LTLIBRARIES); do \