$OpenBSD: patch-configure_in,v 1.5 2006/11/01 21:13:19 kili Exp $

# pcap changes and some cleanup and quoting fixes from upstream SVN.
# In addition, account for the fact that we don't have APM on all archs.

--- configure.in.orig	Wed Jan  4 16:53:37 2006
+++ configure.in	Fri Oct 20 13:42:27 2006
@@ -4,11 +4,6 @@ AC_CONFIG_SRCDIR([kismet.h])
 
 AC_PREREQ(2.57)
 
-# Included pcap directory
-pcapdir="libpcap-0.9.1-kis"
-etherealdir="/usr/src/ethereal-0.9.12"
-AC_SUBST(pcapdir)
-
 # Check for host type
 AC_CANONICAL_HOST
 
@@ -127,7 +122,7 @@ else
     esac
 fi
 
-CXXFLAGS="$CXXFLAGS $CFLAGS"
+CXXFLAGS="$CXXFLAGS"
 
 AC_CONFIG_SRCDIR([kismet_server.cc])
 AC_CONFIG_HEADER([config.h])
@@ -200,7 +195,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 		s = getopt_long(argc, argv, "n:", long_options, &option_index);
 
 		]])],[sys_getopt=yes],[sys_getopt=no])
-if test $sys_getopt = "yes"; then
+if test "$sys_getopt" = "yes"; then
 	AC_MSG_RESULT([yes])
 	AC_DEFINE(HAVE_GETOPT_LONG, 1, system defines getopt_long)
 else
@@ -213,15 +208,15 @@ AC_CHECK_HEADER([stdint.h],
 	AC_DEFINE(HAVE_STDINT_H, 1, stdint.h is present) stdint=yes,
 	stdint=no)
 
-if test $stdint = "no"; then
+if test "$stdint" = "no"; then
     inttypes=no
 	AC_CHECK_HEADER([inttypes.h],
 		AC_DEFINE(HAVE_INTTYPES_H, 1, inttypes.h is present) inttypes=yes, 
 		inttypes=no)
 fi
 
-if test $stdint = "no"; then
-	if test $inttypes = "no"; then
+if test "$stdint" = "no"; then
+	if test "$inttypes" = "no"; then
 		AC_MSG_RESULT([failed])
 		AC_MSG_ERROR([could not find stdint.h or inttypes.h.])
 	fi
@@ -244,7 +239,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 		accept(s, addr, addrlen);
 		return 0;
 		]])],[accept_socklen=yes],[accept_socklen=no])
-if test $accept_socklen = "yes"; then
+if test "$accept_socklen" = "yes"; then
 	AC_MSG_RESULT([socklen_t])
 	AC_DEFINE(HAVE_SOCKLEN_T, 1, accept() takes type socklen_t for addrlen)
 else
@@ -263,8 +258,9 @@ AC_CHECK_LIB([uClibc++], [main], 
 # Do we use uclibc++?
 if test "$foundcxxl"x == "x"; then
 	AC_CHECK_LIB([stdc++], [main], 
-				 foundcxxl="stdc++" LIBS="$LIBS -lstdc++",
-				 AC_MSG_WARN([libstdc++ not available on this system]))
+				 foundcxxl="stdc++" LIBS="$LIBS -lstdc++ -lm",
+				 AC_MSG_WARN([libstdc++ not available on this system]),
+				 "-lm")
 fi
 
 if test "$foundcxxl"x == "x"; then
@@ -363,7 +359,7 @@ AC_ARG_WITH(linuxheaders,
 AC_ARG_ENABLE(netlink, [  --disable-netlink       disable linux netlink socket capture],,wantnetlink=yes)
 AC_SUBST(wantnetlink)
 
-if test $wantnetlink = yes; then
+if test "$wantnetlink" = yes; then
 netlink=no
 AC_CHECK_HEADER([linux/netlink.h],
 	[AC_DEFINE(HAVE_LINUX_NETLINK, 1, Linux netlink socket capture present) netlink=yes],
@@ -381,7 +377,7 @@ AC_ARG_ENABLE(wireless-extension, [  --d
               wantwireless=yes)
 AC_SUBST(wantwireless)
 
-if test $wantwireless = yes; then
+if test "$wantwireless" = yes; then
 wireless=no
 AC_CHECK_HEADER([linux/wireless.h],
 	[wireless=yes],
@@ -441,68 +437,98 @@ if test "$wireless" = "yes"; then
 	fi
 fi
 
+if test "$cygwin" = yes; then
+AC_CHECK_HEADERS([windows.h Win32-Extensions.h])
+fi
+
 AC_ARG_ENABLE(pcap, [  --disable-pcap          disable libpcap (most sources) capture support],,wantpcap=yes)
 AC_SUBST(wantpcap)
 
-if test $wantpcap = yes; then
+if test "$wantpcap" = yes; then
+	foundsyspcap=no
 
-syspcap="no"
-AC_ARG_ENABLE(syspcap, [  --enable-syspcap        use system libpcap (not recommended)],syspcap=yes,)
-	if test $syspcap = "yes"; then
-		foundsyspcap=no
-		AC_CHECK_LIB([pcap], [pcap_open_live],
-		    AC_DEFINE(HAVE_LIBPCAP, 1, libpcap packet capture lib) foundsyspcap=yes,
-		    AC_MSG_WARN(Compiling without libpcap support.))
-
-		if test $foundsyspcap = yes; then
-		## if we don't have a pcap.h, do a search for pcap/pcap.h
-		AC_CHECK_HEADER([pcap.h],
-			AC_DEFINE(HAVE_PCAP_H, 1, libpcap header) foundsyspcaph=yes)
-		    if test $foundsyspcaph != yes; then 
-				AC_CHECK_HEADER([pcap/pcap.h], 
-				AC_DEFINE(HAVE_PCAP_H, 1, libpcap header) AC_DEFINE(HAVE_PCAPPCAP_H, 1, pcap/pcap.h),
-				AC_MSG_ERROR([found libpcap but unable to find pcap.h]))
-		    fi
-		# Look for the new PCAP stuff
-		AC_CHECK_LIB([pcap], [pcap_setnonblock],
-		    AC_DEFINE(HAVE_PCAP_NONBLOCK, 1, Nonblocking-capable libpcap),
-		    AC_MSG_WARN(*** You don't appear to have a version of libpcap which supports non-blocking IO.  We'll fake it, but you really should upgrade your libpcap, as it may not support 802.11 capture sources, either. ***))
-
-		pcaplib=""
-		AC_SUBST(pcaplib)
-		pcaplnk="-lpcap"
-		AC_SUBST(pcaplnk)
-		pcap="yes"
-		fi
+	if test "$cygwin" = yes; then
+		pcaplib="wpcap";
 	else
-		# Build local pcap
-		export CC
-		export CXX
-		AC_CONFIG_SUBDIRS($pcapdir)
+		pcaplib="pcap";
+	fi
 
-		if test "$darwin" = yes; then
-			pcaplib=""
-			pcaplnk="-L$pcapdir -lpcap"
-		else
-			pcaplib="$pcapdir/libpcap.a"
-			pcaplnk=""
-		fi
+	AC_CHECK_LIB([${pcaplib}], [pcap_open_live],
+	    AC_DEFINE(HAVE_LIBPCAP, 1, libpcap packet capture lib) foundsyspcap=yes,
+	    AC_MSG_WARN(Compiling without libpcap support.))
 
-		AC_SUBST(pcaplib)
-		AC_SUBST(pcaplnk)
+	if test "$foundsyspcap" = yes; then
+	## if we don't have a pcap.h, do a search for pcap/pcap.h
+	AC_CHECK_HEADER([pcap.h],
+		AC_DEFINE(HAVE_PCAP_H, 1, libpcap header) foundsyspcaph=yes)
+	    if test "$foundsyspcaph" != yes; then 
+			AC_CHECK_HEADER([pcap/pcap.h], 
+			AC_DEFINE(HAVE_PCAP_H, 1, libpcap header) AC_DEFINE(HAVE_PCAPPCAP_H, 1, pcap/pcap.h),
+			AC_MSG_ERROR([found libpcap but unable to find pcap.h]))
+	    fi
+	# Look for the new PCAP stuff
+	AC_CHECK_LIB([pcap], [pcap_setnonblock],
+	    AC_DEFINE(HAVE_PCAP_NONBLOCK, 1, Nonblocking-capable libpcap),
+	    AC_MSG_WARN(*** You don't appear to have a version of libpcap which supports non-blocking IO.  We'll fake it, but you REALLY should upgrade your libpcap, as it may not support 802.11 capture sources, either. ***))
 
-		CPPFLAGS="$CPPFLAGS -I$pcapdir"
-		#CXXFLAGS="$CPPFLAGS -I$pcapdir"
-		AC_DEFINE(HAVE_LIBPCAP, 1, libpcap packet capture lib)
-		pcap=yes
+	if test "$cygwin" != yes; then
+	AC_CHECK_LIB([${pcaplib}], [pcap_get_selectable_fd],
+		AC_DEFINE(HAVE_PCAP_GETSELFD, 1, Selectablefd-capable libpcap),
+		AC_MSG_ERROR(installed libpcap version does not support features Kismet requires.  Upgrade to a current version of libpcap))
+	else
+	AC_CHECK_LIB([${pcaplib}], [pcap_fileno],
+		AC_DEFINE(HAVE_PCAP_FILENO, 1, pcapfileno-capable libwpcap),
+		AC_MSG_ERROR(installed libpcap version does not support features Kismet requires.  Upgrade to a current version of libwpcap))
 	fi
 
+	pcaplnk="-l${pcaplib}"
+	AC_SUBST(pcaplnk)
+	pcap="yes"
+	fi
+fi
 
-else
-    AC_MSG_WARN(Compiling without libpcap support.)
+if test "$wantpcap" != "yes" -o "$pcap" != "yes"; then
+    AC_MSG_WARN(Compiling without libpcap support.  Many capture sources will be disabled.)
 fi
 AC_SUBST(pcap)
 
+if test "$cygwin" = yes; then
+	AC_MSG_WARN([*** Enabling AirPcap checks on Cygwin ***]);
+	want_airpcap=yes;
+fi
+
+AC_ARG_ENABLE(airpcap, [  --disable-airpcap          disable CASE AirPcap (Cygwin/Win32 only)],want_airpcap=no,)
+
+if test "$pcap" = "no" -a "$want_airpcap" = "yes"; then
+	AC_MSG_WARN([*** Disabling AirPcap, libpcap not enabled ***]);
+	want_airpcap=no;
+fi
+
+if test "$cygwin" != "yes" -a "$want_airpcap" = "yes"; then
+	AC_MSG_WARN([*** Disabling AirPcap on non-cygwin/win32 system ***]);
+	want_airpcap=no;
+fi
+
+if test "$want_airpcap" = "yes" -a "$pcap" = "yes"; then
+	foundairpcap=no
+	AC_CHECK_LIB([airpcap], [AirpcapSetLinkType],
+	    AC_DEFINE(HAVE_LIBAIRPCAP, 1, libairpcap win32 control lib) foundairpcap=yes,
+	    AC_MSG_WARN(Compiling without airpcap support.))
+
+	if test "$foundairpcap" = yes; then
+	## if we don't have a pcap.h, do a search for pcap/pcap.h
+	AC_CHECK_HEADER([airpcap.h],
+		AC_DEFINE(HAVE_AIRPCAP_H, 1, libairpcap header) foundairpcaph=yes)
+	fi
+
+	if test "$foundairpcap" != "yes" -o "$foundairpcaph" != "yes"; then
+		AC_MSG_WARN(Compiling without airpcap support)
+	else
+		airpcap="yes"
+		LIBS="$LIBS -lairpcap"
+	fi
+fi
+
 if test "$bsd" = yes; then
 	AC_MSG_CHECKING(for net80211/radiotap support)
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@@ -525,28 +551,20 @@ if test "$radiotap" = yes; then
 fi
 
 AC_ARG_ENABLE(setuid, [  --disable-setuid        disable setuid/privdrop ability (not reccomended)],,suid=yes)
-# evaluate after viha test
 
-if test "$darwin" = yes; then
-	AC_MSG_WARN([*** Enabling Viha by default because we're compiling under OSX ***]);
-	want_viha=yes;
-else
-	want_viha=no;
-fi
-
 AC_ARG_ENABLE(viha, [  --disable-viha          disable MacOSX Viha capture source (OSX only)],want_viha=no,)
 
-if test "$darwin" = no -a "$want_viha" = "yes"; then
+if test "$darwin" != "yes" -a "$want_viha" = "yes"; then
 	AC_MSG_WARN([*** Disabling Viha on non-OSX system ***]);
 	want_viha=no;
 fi
-	
-if test $want_viha = "yes"; then
+
+if test "$want_viha" = "yes"; then
 	AC_CHECK_HEADERS([WiFi/WLPacketSource.h WiFi/WLFrame.h WiFi/IEEE80211Frame.h WiFi/WFException.h], 
 		AC_DEFINE(HAVE_VIHAHEADERS, 1, Viha headers are there) foundviha=yes, 
 		AC_MSG_ERROR(Missing required viha headers.  Did you install the Viha drivers?))
 # Enable the ldflags and cxx flags if we found it...
-	if test $foundviha = "yes"; then
+	if test "$foundviha" = "yes"; then
 		LDFLAGS="$LDFLAGS -framework WiFi"
 # Force suid disabled
         suid="no"        
@@ -555,8 +573,12 @@ if test $want_viha = "yes"; then
 fi
 
 # Evaluate suid
+if test "$cygwin" = "yes"; then
+	suid="no"
+fi
+
 AC_SUBST(suid)
-if test $suid = yes; then
+if test "$suid" = yes; then
 	AC_MSG_CHECKING(for setuid )
 	AC_MSG_RESULT(yes)
 	AC_DEFINE(HAVE_SUID, 1, setuid capable)
@@ -567,6 +589,9 @@ else
     if test "$foundviha" != "yes"; then
 	    AC_MSG_WARN(*** Not installing setuid capabilities.  It is more secure to install Kismet as setuid-capable so it can drop privileges.  Please consult the README file. ***)
     fi
+	if test "$cygwin" = "yes"; then
+		AC_MSG_WARN(*** Disabling setuid capabilities under Cygwin since they serve no purpose here. ***)
+	fi
 fi
 
 wsp100=yes
@@ -575,166 +600,14 @@ if test "$wsp100" = "yes"; then
 	AC_DEFINE(HAVE_WSP100, 1, wsp100 remote sensor support)
 fi
 
-zaurus=no
-AC_ARG_ENABLE(zaurus, [  --enable-zaurus         enable extra utils for Sharp Zaurus (deprecated)],zaurus=yes,)
-if test "$zaurus" = "yes" -a "$host_cpu" != "arm"; then
-	AC_MSG_WARN(*** Zaurus extentions enabled but not building for an Arm CPU ***)
-fi
-AC_SUBST(zaurus)
-if test "$zaurus" = "yes"; then
-	zbuild="\$(BUZZER)"
-fi
-AC_SUBST(zbuild)
-
-    
 local=no
 AC_ARG_ENABLE(local-dumper, [  --enable-local-dumper   force use of local dump code even if Ethereal is available],
               local=yes,)
 AC_SUBST(local)
 
-# AC_ARG_WITH(ethereal,
-# [  --with-ethereal[=DIR]     support ethereal wiretap for replaying logs ]
-#   --without-ethereal        disable support for ethereal wiretap],
-# [
-#     if test $withval = no; then
-#         want_ethereal=no
-#     elif test $withval = yes; then
-#         want_ethereal=yes
-# 		ethereal_dir=$etherealdir
-#     else
-#         want_ethereal=yes
-#         ethereal_dir=$withval
-#     fi
-# ],[
-#     want_ethereal=yes
-#     ethereal_dir=$etherealdir
-# ])
-
-#
-#found_ethereal=no
-#if test $want_ethereal = yes; then
-#	AC_CHECK_FILE($ethereal_dir/Makefile, found_ethereal=yes, found_ethereal=no)
-#fi
-
-#if test $found_ethereal = no -a $want_ethereal = yes; then
-#	want_ethereal=no
-#	AC_MSG_WARN(*** Unable to find configured Ethereal in $ethereal_dir ***)
-#fi
-
-
 libz="no"
 AC_DEFINE(USE_LOCAL_DUMP, 1, Use local dumper code)
 	local=yes
-# if test $want_ethereal = yes; then
-# 
-# 	AC_CHECK_PROG(glib, [glib-config --version], yes, no)
-# 	
-# 	if test $glib = no; then
-# 		AC_MSG_WARN(Could not find glib-config in $PATH.  glib is required to link to wiretap.)
-# 		want_ethereal=no
-# 		local=yes
-# 	    AC_MSG_WARN([*** Wiretap support disabled.  While Kismet will function without wiretap, it will limit the log reading and writing abilities. ***])
-# 	    AC_DEFINE(USE_LOCAL_DUMP, 1, Use local dumper code)
-# 	    local=yes
-# 	else
-# 
-# 	AC_MSG_CHECKING(for usable wiretap with 3 arguments in $ethereal_dir/wiretap)
-# 	save_cppflags="$CPPFLAGS"
-# 	CPPFLAGS="$CPPFLAGS `glib-config --cflags glib` -I$ethereal_dir/wiretap"
-# 	#CPPFLAGS="$CPPFLAGS `glib-config --cflags glib` -I$ethereal_dir/wiretap"
-# 	#save_cxxflags="$CXXFLAGS"
-# 	#CXXFLAGS="$CXXFLAGS `glib-config --cflags glib` -I$ethereal_dir/wiretap"
-# 	save_libs="$LIBS"
-# 	LIBS="$LIBS -lz `glib-config --libs glib` -L$ethereal_dir/wiretap -lwiretap"
-# 
-#     AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-# 		#include <stdio.h>
-# 		#include <sys/types.h>
-# 		#include <sys/time.h>
-# 		#include "wtap.h"
-# 		]], [[
-# 	const char *filename = "autoconf test";
-# 	int err;
-# 
-# 	wtap_open_offline(filename, &err, 0);
-# 		]])],[wtap_valid=yes],[wtap_valid=no])
-# 
-#     if test "$wtap_valid" = no ; then
-#         AC_MSG_RESULT(no);
-# 	    AC_MSG_CHECKING(for usable wiretap with 4 arguments in $ethereal_dir/wiretap)
-#     	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#         	#include <stdio.h>
-# 			#include <sys/types.h>
-# 			#include <netinet/in.h>
-#       		#include "wtap.h"
-#        	]], [[
-# 	const char *filename = "autoconf test";
-# 	int err;
-# 
-# 	wtap_open_offline(filename, &err, 0, 0);
-#         ]])],[wtap_argquad=yes],[wtap_argquad=no])
-# 
-# 		if test "$wtap_argquad" = yes ; then
-#             wtap_valid="yes";
-#             AC_DEFINE(HAVE_WTAP_ARGQUAD, 1, wiretap functions takesfour parameters)
-# 		fi
-#     fi
-# 
-#     if test "$wtap_valid" = yes ; then
-#         AC_MSG_RESULT(yes)
-#         AC_DEFINE(HAVE_LIBWIRETAP, 1, Ethereal wiretap library)
-# 		libz="yes";
-# 		AC_DEFINE(HAVE_LIBZ, 1, Zlib compression library)
-# 
-#         if test "$wtap_argquad" = no ; then
-#     		AC_MSG_CHECKING(for wtap_read parameters (wtap *, int *, int *))
-#         	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#             	#include <stdio.h>
-#     			#include <sys/types.h>
-#     			#include <netinet/in.h>
-#           		#include "wtap.h"
-#            	]], [[
-#         		int err;
-#     			struct wtap *packfile;
-#     			long *offset;
-#     
-#         		wtap_read(packfile, &err, offset);
-#             ]])],[wtap_intint=no],[wtap_intint=yes])
-#     
-#     		if test "$wtap_intint" = yes ; then
-#     			AC_MSG_RESULT([struct wtap *, int *, int *])
-#                 AC_DEFINE(HAVE_WTAPREAD_INTINT, 1, wtap_read takes two int * parameters)
-#     		else
-#                 AC_MSG_RESULT([struct wtap *, int *, long *])
-#             fi
-#         fi
-# 
-# 		if test $local = yes; then
-# 		    AC_MSG_CHECKING(for forced local-dumper)
-# 		    AC_MSG_RESULT(yes)
-# 		    AC_MSG_WARN(*** Forcing local dumper code instead of wiretap dumper.  ***)
-# 			AC_DEFINE(USE_LOCAL_DUMP, 1, Force local dumper code)
-# 		else
-# 		    AC_MSG_CHECKING(for forced local-dumper)
-# 		    AC_MSG_RESULT(no)
-# 		fi
-#     else
-#         AC_MSG_RESULT(no)
-# 		want_ethereal="no"
-# 		AC_MSG_WARN([*** No useable wiretap found in $ethereal_dir.  Make sure this directory is correct and that you have configured and compiled Ethereal in this directory.  While Kismet will function without wiretap, it will limit the log reading and writing abilities. ***])
-# 		CPPFLAGS="$save_cppflags"
-# 		#CXXFLAGS="$save_cxxflags"
-#    		LIBS="$save_libs"
-# 		AC_DEFINE(USE_LOCAL_DUMP, 1, Use local dumper code)
-#     	local=yes
-#     fi
-# 
-# 	fi
-# else
-# 	AC_MSG_WARN([*** Wiretap support disabled.  While Kismet will function without wiretap, it will limit the log reading and writing abilities. ***])
-# 	AC_DEFINE(USE_LOCAL_DUMP, 1, Use local dumper code)
-#     local=yes
-# fi
 
 # gpsmap checks
 
@@ -768,7 +641,6 @@ if test "$wantgpsmap" = "yes"; then
 	save_cxxflags="$CXXFLAGS"
 	save_libs="$LIBS"
 	save_ldflags="$LDFLAGS"
-	AC_CHECK_PROG(wget, [wget --version], yes, no)
 	AC_CHECK_PROG(magickconfig, [Magick-config --version], yes, no)
 
 	if test "$magickconfig" = "yes"; then
@@ -786,12 +658,10 @@ if test "$wantgpsmap" = "yes"; then
 		fi
 	fi
 
-	if test $magickold = "yes"; then
+	if test "$magickold" = "yes"; then
 		AC_MSG_WARN(*** Old version of ImageMagick ($magickversion) found.  Please upgrade to 5.4.7 or newer.  gpsmap will not be built. ***)
-	elif test $magickconfig = "no"; then
+	elif test "$magickconfig" = "no"; then
 		AC_MSG_WARN(*** Missing Magick-config (or it is not in the path).  gpsmap will not be built. ***)
-	elif test $wget = "no"; then
-		AC_MSG_WARN(*** Missing wget (or it is not in the path).  gpsmap will not be build. ***)
 	else
 		#CPPFLAGS="$CPPFLAGS `Magick-config --cppflags` -I`Magick-config --prefix`/include"
 		CPPFLAGS="$CPPFLAGS `Magick-config --cppflags`"
@@ -874,7 +744,12 @@ else
 	pthr="no"
 fi
 
+# Not all OpenBSD archs have apm:
+if test "$bsd" = "yes"; then
+	AC_CHECK_HEADERS([machine/apmvar.h])
+fi
 
+
 AC_ARG_ENABLE(optimization, [  --disable-optimization        disable -Ox gcc optimization],,wantopto=yes)
 if test "$wantopto" != "yes"; then
 	CPPFLAGS=`echo $CPPFLAGS | sed -e 's/-O.//g'`
@@ -905,22 +780,13 @@ echo "       Installing into: $prefix"
 echo -n "        Setuid capable: "
 if test "$suid" = "yes"; then
 	echo "yes"
+elif test "$cygwin" = "yes"; then
+	echo "n/a (Cygwin/win32)"
+elif test "$want_viha" = "yes"; then
+	echo "n/a (OSX with Viha)"
 else
 	echo "no"
 fi
-echo -n "         Zaurus extras: "
-if test "$zaurus" = "yes"; then
-	echo "yes"
-	if test "$host_cpu" != "arm"; then
- 		echo "        WARNING:  Not compiling for ARM but zaurus extentions enabled."
-	fi
-else
-	echo "no"
-    if test "$host_cpu" = "arm"; then
-		echo "        WARNING:  Arm CPU but zaurus extentions not enabled."
-    fi
-fi
-
 echo -n "      Terminal Control: "
 if test "$ncurses" = "yes"; then
 	if test "$curses" = "yes"; then
@@ -946,32 +812,41 @@ fi
 echo -n " Linux Netlink capture: "
 if test "$netlink" = "yes"; then
 	echo "yes"
+elif test "$linux" != "yes"; then
+	echo "n/a (only Linux)"
 else
 	echo "no"
 fi
 echo -n "       Linux wireless : "
 if test "$wireless" = "yes"; then
 	echo "yes"
+elif test "$linux" != "yes"; then
+	echo "n/a (only Linux)"
 else
 	echo "no"
 fi
 echo -n " Linux wireless v.22+ : "
 if test "$wireless22" = "yes"; then
 	echo "yes"
+elif test "$linux" != "yes"; then
+	echo "n/a (only Linux)"
 else
 	echo "no"
 fi
 echo -n "          pcap capture: "
 if test "$pcap" = "yes"; then
 	echo "yes"
-	if test "$syspcap" != "yes"; then
-		echo "           pcap source: $pcapdir"
-	else
-		echo "           pcap source: system"
-	fi
 else
 	echo "no"
 fi
+echo -n "       airpcap control: "
+if test "$airpcap" = "yes"; then
+	echo "yes"
+elif test "$cygwin" != "yes"; then
+	echo "n/a (only Cygwin/Win32)"
+else
+	echo "no"
+fi
 echo -n "        WSP100 capture: "
 if test "$wsp100" = "yes"; then
 	echo "yes";
@@ -981,6 +856,8 @@ fi
 echo -n "          Viha capture: "
 if test "$want_viha" = "yes"; then
 	echo "yes";
+elif test "$darwin" != "yes"; then
+	echo "n/a (only Darwin)"
 else
 	echo "no";
 fi
@@ -1062,6 +939,16 @@ if test "$wireless" != "yes" -a "$linux"
     echo "packet sources (such as Cisco, Orinoco, Madwifi, Prism54, and others)"
     echo "WILL NOT BE BUILT."
     echo "*** WARNING ***"
+fi
+
+if test "$pcap" != "yes" -a "$linux" = "yes"; then
+	echo "*** WARNING ***"
+	echo "LibPCAP was not found.  Kismet previously included a local copy of this"
+	echo "library, however it now expects libpcap to be provided by the system."
+	echo "Kismet on Linux without LibPcap cannot capture data locally and will "
+	echo "almost certainly NOT BE WHAT YOU WANT."
+	echo "Your distribution should provide packages for libpcap, otherwise "
+	echo "it can be downloaded from http://tcpdump.org"
 fi
 
 if test "`echo $host_os | grep linux`" = ""; then
