diff -Nurd -x'*~' ntop-3.3.orig/Makefile.am ntop-3.3/Makefile.am
--- ntop-3.3.orig/Makefile.am	2007-06-09 17:15:11.000000000 -0400
+++ ntop-3.3/Makefile.am	2009-05-28 23:05:29.000000000 -0400
@@ -157,8 +157,8 @@
 .PHONY: snapshot
 
 
-acinclude.m4: acinclude.m4.ntop libtool.m4.in
-	@cat acinclude.m4.ntop libtool.m4.in >acinclude.m4
+acinclude.m4: acinclude.m4.ntop
+	@cat acinclude.m4.ntop >acinclude.m4
 
 CLEANLIST = `ls -l $(DESTDIR)$(libdir)/*ntop*.so $(DESTDIR)$(libdir)/*Plugin*.so | \
           grep -v $(VERSION) | \
@@ -266,7 +266,7 @@
           fi; \
         done
 
-install: install-recursive
+install: install-recursive install-data-as
 
 	@mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR)
 
@@ -360,7 +360,6 @@
         done
 
 install-data-local: ntop.txt ntop.html faq.html
-	@$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins;
 	@if ! test -d $(DESTDIR)/$(datadir)/ntop; then \
 	  $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop; \
 	  touch $(DESTDIR)/$(datadir)/ntop/warnuser; \
diff -Nurd -x'*~' ntop-3.3.orig/configure.in ntop-3.3/configure.in
--- ntop-3.3.orig/configure.in	2007-06-09 17:30:00.000000000 -0400
+++ ntop-3.3/configure.in	2009-05-29 00:09:52.000000000 -0400
@@ -159,6 +159,7 @@
 
 AC_PROG_CPP
 AC_PROG_CC
+AM_PROG_CC_C_O
 dnl> AC_PROG_CXX no c++ code (yet?)
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -360,7 +361,6 @@
 echo
 echo "Checking C compiler program and features..."
 echo 
-AM_PROG_CC_STDC
 if test ".${ac_cv_prog_cc_stdc}" = ".no"; then
     echo 
     echo "*******************************************************************"
@@ -508,10 +508,6 @@
     LOCALEDIR="/usr/lib/locale"
 fi
 
-dnl> Add /usr/local/
-CFLAGS="${CFLAGS} -I/usr/local/include"
-CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
-LDFLAGS="${LDFLAGS} -L/usr/local/lib"
 
 
 
@@ -546,14 +542,7 @@
               )
 
 dnl> add pic flag in any case this makes sure all our code is relocatable
-case "${target}:${CC}" in
-    *-*-darwin*:* )
-        CFLAGS="$CFLAGS "`grep pic_flag= /usr/bin/glibtool | head -n1 | sed -e 's/.*pic_flag=//' -e 's/"//g'`
-        ;;
-    * )
-        CFLAGS="$CFLAGS "`grep pic_flag= libtool | head -n1 | sed -e 's/.*pic_flag=//' -e 's/"//g'`
-        ;;
-esac
+dnl nah, just let libtool Do The Right Thing
 
 dnl> Presets for the make flags go here...
 CFLAGS="${CFLAGS}"
@@ -1581,13 +1570,13 @@
   AC_CHECK_TOOL(NETSNMP, net-snmp-config)
   if test "x$ac_cv_prog_ac_ct_NETSNMP" = "xnet-snmp-config"; then
     AC_DEFINE_UNQUOTED(HAVE_SNMP, 1, [SNMP is supported])
-    SNMPLIBS="`net-snmp-config --libs`"
+    SNMPLIBS="`net-snmp-config --libs | sed 's/-L\/usr\/local\/lib//g'`"
     SNMPLIBS="`echo ${SNMPLIBS}|sed -e s,'-R../lib',,g`"
     echo "net-snmp libs: ${SNMPLIBS}"
     LIBS="${LIBS} ${SNMPLIBS}"
 dnl remove unecessary path       
     LIBS=`echo ${LIBS}|sed -e s,'-R../lib',,g`
-    INCS="${INCS} `net-snmp-config --cflags`"
+    INCS="${INCS} `net-snmp-config --cflags | sed 's/-I\/usr\/local\/include//g'`"
   else
     AC_MSG_RESULT(NET-SNMP is not present: SNMP support is disabled)
   fi
@@ -2088,7 +2077,7 @@
 echo "#endif /* MEMORY_DEBUG */" >> version.c
 
 case "${host}" in
-    *darwin* )
+    *darwin_skip-this-hack* )
         echo
 	echo "Copying patched versions of some configure-related files for Mac OS X"
         cp packages/MacOSX/lt* .
diff -Nurd -x'*~' ntop-3.3.orig/configureextra/DARWIN ntop-3.3/configureextra/DARWIN
--- ntop-3.3.orig/configureextra/DARWIN	2005-03-24 07:09:07.000000000 -0500
+++ ntop-3.3/configureextra/DARWIN	2009-05-28 22:30:42.000000000 -0400
@@ -1,13 +1,5 @@
 #!/bin/sh
 
 echo "        Setting Darwin (Mac OS X) specific flag values"
-CFLAGS="-no-cpp-precomp $CFLAGS"
 
-case "${target}" in
-   *-*-darwin5.5* )
-       DYN_FLAGS="-bundle -flat_namespace -undefined suppress $DYN_FLAGS"
-   ;;
-   *-*-darwin8* )
    CPPFLAGS="${CPPFLAGS} -DTIGER"
-   ;;
-esac
diff -Nurd -x'*~' ntop-3.3.orig/globals-defines.h ntop-3.3/globals-defines.h
--- ntop-3.3.orig/globals-defines.h	2007-05-17 11:30:08.000000000 -0400
+++ ntop-3.3/globals-defines.h	2009-05-29 00:12:49.000000000 -0400
@@ -2051,7 +2051,7 @@
  * default file and directories
  */
 #define DEFAULT_NTOP_PIDFILE                "ntop.pid"
-#define DEFAULT_NTOP_PID_DIRECTORY          "/var/run"
+#define DEFAULT_NTOP_PID_DIRECTORY          "@PREFIX@/var/run"
 
 /*
  * default configuration parameters  -- the comment gives the (short getopt) name
diff -Nurd -x'*~' ntop-3.3.orig/globals-structtypes.h ntop-3.3/globals-structtypes.h
--- ntop-3.3.orig/globals-structtypes.h	2007-05-29 16:46:55.000000000 -0400
+++ ntop-3.3/globals-structtypes.h	2009-06-02 12:29:04.000000000 -0400
@@ -100,7 +100,11 @@
 typedef char int8_t;
 #endif
 
+#ifdef __APPLE__
+#include <stdbool.h>
+#else
 typedef unsigned char bool;
+#endif
 
 #include "fcUtils.h"
 #include "scsiUtils.h"
diff -Nurd -x'*~' ntop-3.3.orig/plugins/Makefile.am ntop-3.3/plugins/Makefile.am
--- ntop-3.3.orig/plugins/Makefile.am	2007-06-07 17:57:43.000000000 -0400
+++ ntop-3.3/plugins/Makefile.am	2009-05-28 21:16:26.000000000 -0400
@@ -42,16 +42,7 @@
 #
 # The meat for ntop
 #
-noinst_PROGRAMS = \
-                  icmpPlugin.so \
-                  lastSeenPlugin.so \
-                  netflowPlugin.so \
-                  pdaPlugin.so \
-                  remotePlugin.so \
-                  rrdPlugin.so \
-                  sflowPlugin.so
-
-lib_LTLIBRARIES = \
+plugin_LTLIBRARIES = \
                   libicmpPlugin.la \
                   liblastSeenPlugin.la \
                   libnetflowPlugin.la \
@@ -89,117 +80,12 @@
 libsflowPlugin_la_LDFLAGS = -shared -release @PACKAGE_VERSION@ @DYN_FLAGS@
 libsflowPlugin_la_CFLAGS = $(AM_CFLAGS)
 
-#
-# Dependencies to allow ntop loading plugins on-place
-# by default ntop looks for plugins in the plugins/ subdirectory
-#
-
-
-.libs/libicmpPlugin.so@SO_VERSION_PATCH@:
-	@if test -f libicmpPlugin_la-icmpPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libicmpPlugin.so@SO_VERSION_PATCH@ libicmpPlugin_la-icmpPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libicmpPlugin.so@SO_VERSION_PATCH@ icmpPlugin.o; \
-	fi
-
-icmpPlugin.so$(EXEEXT): .libs/libicmpPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/libicmpPlugin.so icmpPlugin.so
-
-###############
-
-.libs/liblastSeenPlugin.so@SO_VERSION_PATCH@:
-	@if test -f liblastSeenPlugin_la-lastSeenPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/liblastSeenPlugin.so@SO_VERSION_PATCH@ liblastSeenPlugin_la-lastSeenPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/liblastSeenPlugin.so@SO_VERSION_PATCH@ lastSeenPlugin.o; \
-	fi
-
-lastSeenPlugin.so$(EXEEXT): .libs/liblastSeenPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/liblastSeenPlugin.so lastSeenPlugin.so
-
-###############
-
-.libs/libnetflowPlugin.so@SO_VERSION_PATCH@:
-	@if test -f libnetflowPlugin_la-netflowPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ libnetflowPlugin_la-netflowPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libnetflowPlugin.so@SO_VERSION_PATCH@ netflowPlugin.o; \
-	fi
-
-netflowPlugin.so$(EXEEXT): .libs/libnetflowPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/libnetflowPlugin.so netflowPlugin.so
-
-###############
-
-.libs/libpdaPlugin.so@SO_VERSION_PATCH@:
-	@if test -f libpdaPlugin_la-pdaPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libpdaPlugin.so@SO_VERSION_PATCH@ libpdaPlugin_la-pdaPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libpdaPlugin.so@SO_VERSION_PATCH@ pdaPlugin.o; \
-	fi
-
-pdaPlugin.so$(EXEEXT): .libs/libpdaPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/libpdaPlugin.so pdaPlugin.so
-
-###############
-
-.libs/libremotePlugin.so@SO_VERSION_PATCH@:
-	@if test -f libremotePlugin_la-remotePlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libremotePlugin.so@SO_VERSION_PATCH@ libremotePlugin_la-remotePlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libremotePlugin.so@SO_VERSION_PATCH@ remotePlugin.o; \
-	fi
-
-remotePlugin.so$(EXEEXT): .libs/libremotePlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/libremotePlugin.so remotePlugin.so
-
-###############
-
-.libs/librrdPlugin.so@SO_VERSION_PATCH@:
-	@if test -f librrdPlugin_la-rrdPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/librrdPlugin.so@SO_VERSION_PATCH@ librrdPlugin_la-rrdPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/librrdPlugin.so@SO_VERSION_PATCH@ rrdPlugin.o; \
-	fi
-
-rrdPlugin.so$(EXEEXT): .libs/librrdPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/librrdPlugin.so rrdPlugin.so
-
-###############
-
-.libs/libsflowPlugin.so@SO_VERSION_PATCH@:
-	@if test -f libsflowPlugin_la-sflowPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libsflowPlugin.so@SO_VERSION_PATCH@ libsflowPlugin_la-sflowPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libsflowPlugin.so@SO_VERSION_PATCH@ sflowPlugin.o; \
-	fi
 
-sflowPlugin.so$(EXEEXT): .libs/libsflowPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/libsflowPlugin.so sflowPlugin.so
-
-###############
-
-.libs/libxmldumpPlugin.so@SO_VERSION_PATCH@:
-	@if test -f libxmldumpPlugin_la-xmldumpPlugin.o; then \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libxmldumpPlugin.so@SO_VERSION_PATCH@ libxmldumpPlugin_la-xmldumpPlugin.o; \
-	else \
-	$(CC) @MAKE_SHARED_LIBRARY_PARM@ -o .libs/libxmldumpPlugin.so@SO_VERSION_PATCH@ xmldumpPlugin.o; \
-	fi
-
-xmldumpPlugin.so$(EXEEXT): .libs/libxmldumpPlugin.so@SO_VERSION_PATCH@
-	@$(LN_S) .libs/libxmldumpPlugin.so xmldumpPlugin.so
-
-###############
-
-install-data-local:
-	@$(top_srcdir)/mkinstalldirs $(DESTDIR)$(plugindir);
-	@for file in $(noinst_PROGRAMS); do \
-             cp -p $$file $(DESTDIR)$(plugindir)/$$file; \
-         done
-# remove installed libraries
-	@for file in $(lib_LTLIBRARIES); do \
-             rm -f $(DESTDIR)$(libdir)/$$file; \
-         done
+# use -hook  (runs after real install) instead of -local (runs before)
+install-data-hook:
+	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(plugindir)
+# we dlopen(*), so nuke everything except the actual loadable .so files
+	rm -f $(DESTDIR)$(plugindir)/*.la
 
 #
 # Special stuff for xml auto-generation of code from the "doc":
