# Process this file with autoconf to produce a configure script. AC_INIT AC_CONFIG_SRCDIR([kismet.h]) AC_PREREQ(2.57) # Check for host type AC_CANONICAL_HOST # Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_CPP # Liberated from ethereal's configure.in # # Add any platform-specific compiler flags needed. # AC_MSG_CHECKING(for platform-specific compiler flags) if test "x$GCC" = x then # # Not GCC - assume it's the vendor's compiler. # case "$host_os" in hpux*) # # HP's ANSI C compiler; flags suggested by Jost Martin. # "-Ae" for ANSI C plus extensions such as "long long". # "+O2", for optimization. XXX - works with "-g"? # CFLAGS="-Ae +O2 $CFLAGS" AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2) ;; darwin*) # # It may be called "cc", but it's really a GCC derivative # with a problematic special precompiler and precompiled # headers; turn off the special precompiler, as some # apparently-legal code won't compile with its precompiled # headers. # CFLAGS="-no-cpp-precomp $CFLAGS" LDFLAGS="$LDFLAGS -framework Foundation -framework CoreFoundation -F/System/Library/PrivateFrameworks -framework Apple80211 -framework IOKit" objc_link='$(OBJC_CONTROL_O)' AC_MSG_RESULT(Apple GCC - added Apple80211 frameworks and no-precomp) AC_DEFINE(SYS_DARWIN, 1, Compiling for OSX/Darwin) darwin="yes" ;; linux*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_LINUX, 1, Compiling for Linux OS) linux="yes" ;; freebsd*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_FREEBSD, 1, Compiling for FreeBSD) bsd="yes" ;; openbsd*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_OPENBSD, 1, Compiling for OpenBSD) bsd="yes" ;; netbsd*) AC_MSG_RESULT(adding pkgsrc locations) CPPFLAGS="$CPPFLAGS -I/usr/pkg/include" LDFLAGS="$LDFLAGS -L/usr/pkg/lib" AC_DEFINE(SYS_NETBSD, 1, Compiling for NetBSD) bsd="yes" ;; cygwin*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_CYGWIN, 1, Compiling for Cygwin) cygwin="yes" ;; *) AC_MSG_RESULT(none needed) ;; esac else case "$host_os" in solaris*) # the X11 headers don't automatically include prototype info # and a lot don't include the return type CFLAGS="$CFLAGS -Wno-return-type -DFUNCPROTO=15" AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15) ;; darwin*) # # See comments above about Apple's lovely C compiler. # CFLAGS="-no-cpp-precomp $CFLAGS" LDFLAGS="$LDFLAGS -framework Foundation -framework CoreFoundation -F/System/Library/PrivateFrameworks -framework Apple80211 -framework IOKit" objc_link='$(OBJC_CONTROL_O)' AC_MSG_RESULT(Apple GCC - added Apple80211 frameworks and no-precomp) AC_DEFINE(SYS_DARWIN, 1, Compiling for OSX/Darwin) darwin="yes" ;; linux*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_LINUX, 1, Compiling for Linux OS) linux="yes" ;; freebsd*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_FREEBSD, 1, Compiling for FreeBSD) bsd="yes" ;; openbsd*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_OPENBSD, 1, Compiling for OpenBSD) bsd="yes" ;; netbsd*) AC_MSG_RESULT(adding pkgsrc locations) CPPFLAGS="$CPPFLAGS -I/usr/pkg/include" LDFLAGS="$LDFLAGS -L/usr/pkg/lib" AC_DEFINE(SYS_NETBSD, 1, Compiling for NetBSD) bsd="yes" ;; cygwin*) AC_MSG_RESULT(none needed) AC_DEFINE(SYS_CYGWIN, 1, Compiling for Cygwin) cygwin="yes" ;; *) AC_MSG_RESULT(none needed) ;; esac fi # Substitute in the objc linkages if we need them AC_SUBST(objc_link) if test "$cygwin" = "yes"; then AC_MSG_CHECKING(cygwin compile flags) AC_MSG_RESULT(__MINGW32__) CXXFLAGS="$CXXFLAGS -D__MINGW32__" else # cygwin doesn't like rdynamic, will this hurt us? LDFLAGS="$LDFLAGS -rdynamic" fi AC_CONFIG_SRCDIR([kismet_server.cc]) AC_CONFIG_HEADER([config.h]) # Config location for code to default to CONFFILE_DIR=$sysconfdir CONFFILE_DIR=`( test "$prefix" = NONE && prefix=$ac_default_prefix test "$exec_prefix" = NONE && exec_prefix=${prefix} eval echo "$CONFFILE_DIR" )` AC_DEFINE_UNQUOTED(SYSCONF_LOC, "$CONFFILE_DIR", system config directory) LOCALSTATE_DIR=$localstatedir LOCALSTATE_DIR=`( test "$prefix" = NONE && prefix=$ac_default_prefix test "$exec_prefix" = NONE && exec_prefix=${prefix} eval echo "$LOCALSTATE_DIR" )` AC_DEFINE_UNQUOTED(LOCALSTATE_DIR, "$LOCALSTATE_DIR", system state directory) BIN_DIR=$bindir BIN_DIR=`( test "$prefix" = NONE && prefix=$ac_default_prefix test "$exec_prefix" = NONE && exec_prefix=${prefix} eval echo "$BIN_DIR" )` AC_DEFINE_UNQUOTED(BIN_LOC, "$BIN_DIR", system binary directory) LIB_DIR=$libdir LIB_DIR=`( test "$prefix" = NONE && prefix=$ac_default_prefix test "$exec_prefix" = NONE && exec_prefix=${prefix} eval echo "$LIB_DIR" )` AC_DEFINE_UNQUOTED(LIB_LOC, "$LIB_DIR", system binary directory) # Check for endian AC_C_BIGENDIAN # Checks for header files. AC_CHECK_HEADERS([errno.h stdlib.h string.h sys/socket.h sys/time.h sys/wait.h unistd.h sys/types.h netdb.h], AC_DEFINE(HAVE_SYSHEADERS, 1, System headers are there), AC_MSG_ERROR(Missing required system header)) AC_CHECK_HEADERS([getopt.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_HEADER_TIME AC_STRUCT_TM # Checks for library functions. AC_HEADER_STDC AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([gettimeofday memset select socket strcasecmp strftime strstr]) # Do we have getopt_long natively? AC_MSG_CHECKING([for system-level getopt_long()]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #ifdef HAVE_GETOPT_H #include #endif ]], [[ static struct option long_options[] = { /* options table */ { "null-arg", required_argument, 0, 'n' }, { 0, 0, 0, 0 } }; int s; int option_index; int argc; char **argv; s = getopt_long(argc, argv, "n:", long_options, &option_index); ]])],[sys_getopt=yes],[sys_getopt=no]) if test "$sys_getopt" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_GETOPT_LONG, 1, system defines getopt_long) else AC_MSG_RESULT([no]) fi # Look for something to define standard int types stdint=yes AC_CHECK_HEADER([stdint.h], AC_DEFINE(HAVE_STDINT_H, 1, stdint.h is present) stdint=yes, stdint=no) 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 AC_MSG_RESULT([failed]) AC_MSG_ERROR(could not find stdint.h or inttypes.h.) fi fi # How does accept() work on this system? AC_MSG_CHECKING([for accept() addrlen type]) OCFL="$CFLAGS" CFLAGS="-Werror $CFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include ]], [[ int s = 0; struct sockaddr *addr = NULL; socklen_t *addrlen = NULL; accept(s, addr, addrlen); return 0; ]])],[accept_socklen=yes],[accept_socklen=no]) 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 AC_MSG_RESULT([int]) fi CFLAGS="$OCFL" # Do we have large file support? AC_SYS_LARGEFILE # Do we need to use -ldl? AC_CHECK_LIB([dl], [dlopen], LIBS="$LIBS -ldl", AC_MSG_WARN([libdl doesn't seem to be needed on this system])) # Do we need libm for math functions? AC_MSG_CHECKING([for libm math function in std libs]) OCFL="$CFLAGS" CFLAGS="-Werror $CFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include ]], [[ double x; pow(x, x); return 0; ]])],[needlibm=no],[needlibm=yes]) CFLAGS="$OCFL" if test "$needlibm" = "yes"; then AC_MSG_RESULT([no]) # Do we need to use -lm? AC_CHECK_LIB([m], [pow], LIBS="$LIBS -lm", AC_MSG_ERROR([libm is needed and is not available])) else AC_MSG_RESULT([yes]) fi # Do we use libstdc++? # We need to swap to the g++ compiler here oCC="$CC" CC="$CXX" AC_CHECK_LIB([uClibc++], [main], foundcxxl="uclibc" CXXLIBS="$CXXLIBS -luClibc++") # Do we use uclibc++? if test "$foundcxxl"x == "x"; then AC_CHECK_LIB([stdc++], [main], foundcxxl="stdc++" CXXLIBS="$CXXLIBS -lstdc++") fi if test "$foundcxxl"x == "x"; then AC_MSG_ERROR(Neither uclibc uClibc++ or standard gcc stdc++ libraries found.) fi CC="$oCC" AC_SUBST(CXXLIBS) AC_MSG_CHECKING([for group 'root']) if test "`grep -e ^root: /etc/group`" = ""; then AC_MSG_RESULT([no. Using 'wheel']) instgrp="wheel" else AC_MSG_RESULT([yes]) instgrp="root" fi AC_SUBST(instgrp) AC_MSG_CHECKING([for group 'man']) if test "`grep -e ^man: /etc/group`" = ""; then AC_MSG_RESULT([no. Using '$instgrp']) mangrp="$instgrp" else mangrp="man" fi AC_SUBST(mangrp) # Check for libcurses or libncurses. Fatal error if we didn't use disable. AC_ARG_ENABLE(client, [ --disable-client disable kismet client],, wantclient=yes) termcontrol="none"; if test "$wantclient" = "yes"; then OLIBS="$LIBS" AC_CHECK_LIB([ncurses], [initscr], AC_DEFINE(HAVE_LIBNCURSES, 1, NCurses terminal lib) \ foundlcurses=yes curseaux="-lncurses" termcontrol="ncurses" ) if test "$foundlcurses" != "yes"; then AC_CHECK_LIB([curses], [initscr], AC_DEFINE(HAVE_LIBCURSES, 1, Curses terminal lib) \ foundlcurses=yes curseaux="-lcurses" termcontrol="curses" ) fi if test "$foundlcurses" != "yes"; then AC_MSG_ERROR(Failed to find libcurses or libncurses. Install them or disable building the Kismet client with --disable-client. Disabling the client is probably not something you want to do normally.) fi if test "$termcontrol" = "ncurses"; then AC_CHECK_HEADER([ncurses.h], [foundhcurses=yes]) else AC_CHECK_HEADER([curses.h], [foundhcurses=yes]) fi if test "$foundhcurses" != "yes"; then AC_MSG_ERROR(Failed to find curses.h or ncurses.h. You probably need to install the curses-devel package from your distribution) fi LIBS="$LIBS $curseaux" AC_CHECK_LIB([panel], [new_panel], AC_DEFINE(HAVE_LIBPANEL, 1, Panel terminal lib) curseaux="$curseaux -lpanel", AC_MSG_ERROR(Failed to find libpanel extension to curses/ncurses. Install it, or disable building the Kismet client with --disable-client. Disabling the client is probably not something you want to do normally.)) AC_CHECK_HEADER([panel.h], [foundhpanel=yes]) if test "$foundhpanel" != "yes"; then AC_MSG_ERROR(Failed to find panel.h curses extension header. You probably need to install the curses-devel or panel-devel package from your distribution.) fi LIBS="$OLIBS" CLIENTCLIBS="$CLIENTCLIBS $curseaux" fi AC_SUBST(CLIBS) AC_SUBST(CLIENTCLIBS) AC_SUBST(CLIENTCFLAGS) # TODO - check for advanced curses stuff here like cdk/panels # Check for process title manipulation stuff, from proftpd configure.in AC_CHECK_FUNCS(setproctitle) AC_CHECK_HEADERS(libutil.h) AC_CHECK_LIB(util, setproctitle, [AC_DEFINE(HAVE_SETPROCTITLE) ac_cv_func_setproctitle="yes" ; LIBS="$LIBS -lutil"]) if test "$ac_cv_func_setproctitle" = "yes"; then AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_NONE) else pf_argv_set="no" AC_CHECK_HEADERS(sys/pstat.h,have_pstat_h="yes",have_pstat_h="no") if test "$have_pstat_h" = "yes"; then AC_CHECK_FUNCS(pstat) if test "$ac_cv_func_pstat" = "yes"; then AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_PSTAT, pstat argv type) else AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_WRITEABLE, writeable argv type) fi pf_argv_set="yes" fi if test "$pf_argv_set" = "no"; then AC_EGREP_HEADER([#define.*PS_STRINGS.*],sys/exec.h, have_psstrings="yes",have_psstrings="no") if test "$have_psstrings" = "yes"; then AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_PSSTRINGS) pf_argv_set="yes" fi fi if test "$pf_argv_set" = "no"; then AC_CACHE_CHECK(whether __progname and __progname_full are available, pf_cv_var_progname, AC_TRY_LINK([extern char *__progname, *__progname_full;], [__progname = "foo"; __progname_full = "foo bar";], pf_cv_var_progname="yes", pf_cv_var_progname="no")) if test "$pf_cv_var_progname" = "yes"; then AC_DEFINE(HAVE___PROGNAME, 1, __PROGNAME glibc macro available) fi AC_CACHE_CHECK(which argv replacement method to use, pf_cv_argv_type, AC_EGREP_CPP(yes,[ #if defined(__GNU_HURD__) yes #endif ],pf_cv_argv_type="new", pf_cv_argv_type="writeable")) if test "$pf_cv_argv_type" = "new"; then AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_NEW, new argv type) pf_argv_set="yes" fi if test "$pf_argv_set" = "no"; then AC_DEFINE(PF_ARGV_TYPE, PF_ARGV_WRITEABLE, writeable argv type) fi fi fi # Check for linux headers if we're on linux systems if test "$linux" = "yes"; then AC_ARG_WITH(linuxheaders, [" --with-linuxheaders[=DIR] Custom location of the Linux kernel " \ "headers if the glibc copies are insufficient" ], [ if test "$withval" != no -a "$withval" != "yes"; then CPPFLAGS="$CPPFLAGS -I$withval" fi ]) AC_ARG_ENABLE(linuxwext, [ --disable-linuxwext disable linux wireless extension support],, wantwext=yes) linux_wireless="no" if test "$wantwext" = "yes"; then AC_CHECK_HEADER([linux/wireless.h], [foundwexth=yes],, [ #include #include #include #include #include ]) if test "$foundwexth" != "yes"; then AC_MSG_ERROR(Failed to find a usable linux/wireless.h header for Linux Wireless Extensions. Either your kernel headers are missing or are incorrect. See config.log for the exact error.) fi AC_MSG_CHECKING(that linux/wireless.h is what we expect) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include #include #include #include #include ]], [[ struct iwreq wrq; wrq.u.essid.flags = 0; ]])],[foundwextok=yes]) if test "$foundwextok" != "yes"; then AC_MSG_RESULT(no) AC_MSG_ERROR(Failed to find a usable linux/wireless.h header for Linux Wireless Extensions. Either your kernel headers are missing or are incorrect. See config.log for the exact error.) fi # wexth AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LINUX_WIRELESS, 1, Linux wireless extentions present) linux_wireless="yes"; if test "$linux_wireless" = "yes"; then iwfreqflag=no AC_MSG_CHECKING(can we use iw_freq.flags) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include #include #include ]], [[ struct iwreq wrq; wrq.u.freq.flags = IW_FREQ_FIXED; ]])],[iwfreqflag=yes],[iwfreqflag=no]) if test "$iwfreqflag" = "no"; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LINUX_IWFREQFLAG, 1, [Linux wireless iwfreq.flag]) fi fi fi # want headers fi # linux AC_ARG_ENABLE(pcre, [ --disable-pcre disable building pcre components], wantpcre=no, wantpcre=yes) if test "$wantpcre" = "yes"; then # Check for pcre pcrel=no AC_CHECK_LIB([pcre], [pcre_compile], pcrel=yes, pcrel=no) if test "$pcrel" != "yes"; then AC_MSG_WARN(Failed to find libpcre) wantpcre=no fi if test "$wantpcre" = "yes"; then pcreh=no AC_CHECK_HEADER([pcre.h], pcreh=yes, pcreh=no) if test "$pcreh" != "yes"; then AC_MSG_WARN(Failed to find pcre headers check that the pcre-devel package is installed if your distribution provides separate packages) wantpcre=no fi fi # wantpcre if test "$wantpcre" = "yes"; then AC_DEFINE(HAVE_LIBPCRE, 1, libpcre regex support) LIBS="$LIBS -lpcre" fi # pcre fi # Handle airpcap/winpcap on cygwin if test "$cygwin" = yes; then AC_CHECK_HEADERS([windows.h Win32-Extensions.h]) AC_ARG_ENABLE(airpcap, [ --enable-airpcap enable checking for CACE airpcap],want_airpcap=yes) if test "$want_airpcap" = "yes"; then airpcap_devpack="none" AC_ARG_WITH(airpcap-devpack, [ --with-airpcap[=DIR] Location of the CACE AirPcap device pack NOTE cygwin appears to have link errors if the path is not within the current directory], [ airpcap_devpack="$withval" ]) if test "$airpcap_devpack" = "none"; then AC_MSG_ERROR(No airpcap path provided use --with-airpcap-devpack) fi # devpack none # Set the libs and includes LDFLAGS="$LDFLAGS -L$airpcap_devpack/WinPcap_Devpack/Lib -L$airpcap_devpack/Airpcap_Devpack/lib" CPPFLAGS="$CPPFLAGS -I$airpcap_devpack/WinPcap_Devpack/Include -I$airpcap_devpack/Airpcap_Devpack/include" fi # want_airpcap fi # cygwin AC_ARG_ENABLE(pcap, [ --disable-pcap disable libpcap (most sources) capture support],,wantpcap=yes) AC_SUBST(wantpcap) if test "$wantpcap" = yes; then foundsyspcap=no if test "$cygwin" = yes; then pcaplib="wpcap"; else pcaplib="pcap"; 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.)) 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. ***)) 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 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 "$pcap" = "no" -a "$want_airpcap" = "yes"; then AC_MSG_WARN([*** Disabling AirPcap, libpcap not enabled ***]); 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 BSD net80211/radiotap support) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include #include #include ]], [[ ]])],radiotap=yes bsdradiotap=yes, bsdradiotap=no radiotap=no) AC_MSG_RESULT($bsdradiotap) else AC_MSG_WARN(Using local radiotap headers) fi if test "$radiotap" != "yes"; then AC_DEFINE(HAVE_LOCAL_RADIOTAP, 1, local radiotap packet headers) radiotaploc="local" fi if test "$bsdradiotap" = "yes"; then AC_DEFINE(HAVE_BSD_SYS_RADIOTAP, 1, BSD radiotap packet headers) radiotaploc="system (BSD)" fi AC_ARG_ENABLE(setuid, [ --disable-setuid disable setuid/privdrop ability (not reccomended)],,suid=yes) # evaluate after viha test 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 AC_MSG_WARN([*** Disabling Viha on non-OSX system ***]); want_viha=no; fi 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 LDFLAGS="$LDFLAGS -framework WiFi" # Force suid disabled suid="no" AC_MSG_WARN(*** Disabling setuid capabilities. Viha must be controlled from the main process which makes setuid-dropping impossible. ***) fi fi # Evaluate suid if test "$cygwin" = "yes"; then suid="no" fi AC_SUBST(suid) if test "$suid" = yes; then AC_MSG_CHECKING(for setuid ) AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SUID, 1, setuid capable) else AC_MSG_CHECKING(for setuid) AC_MSG_RESULT(no) # Yell if we didn't already yell about viha 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 fi wsp100=yes AC_ARG_ENABLE(wsp100, [ --disable-wsp100 disable wsp100 remote drone source],,wsp100=no) 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_DEFINE(USE_LOCAL_DUMP, 1, Use local dumper code) local=yes # gpsmap checks # We include GPS handling code regardless, for now. AC_DEFINE(HAVE_GPS, 1, GPS support will be built.) 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'` CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-O.//g'` fi AC_SUBST(threadlib) sharedatadir=$datadir sharedatadir=`( test "$prefix" = NONE && prefix=$ac_default_prefix test "$exec_prefix" = NONE && exec_prefix=${prefix} eval echo "$sharedatadir" )` sharedatadir=${sharedatadir} AC_SUBST(sharedatadir) AC_CONFIG_FILES([Makefile scripts/kismet extra/buzzme/Makefile extra/Makefile conf/kismet.conf conf/kismet_ui.conf]) AC_OUTPUT echo echo "Configuration complete: " echo " Compiling for: $host_os ($host_cpu)" echo " C++ Library: $foundcxxl" echo " Installing as group: $instgrp" echo " Man pages owned by: $mangrp" echo " Installing into: $prefix" printf " 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 printf " Terminal Control: " echo "$termcontrol"; printf " Linux WEXT capture : " if test "$linux_wireless" = "yes"; then echo "yes" elif test "$linux" != "yes"; then echo "n/a (only Linux)" else echo "no" fi printf " OSX/Darwin capture : " if test "$darwin" = "yes"; then echo "yes" elif test "$darwin" != "yes"; then echo "n/a (only OSX/Darwin)" else echo "no" fi printf " PCRE Regex Filters : " if test "$wantpcre" = "yes"; then echo "yes" else echo "no" fi printf " pcap capture: " if test "$pcap" = "yes"; then echo "yes" else echo "no" fi printf " airpcap control: " if test "$airpcap" = "yes"; then echo "yes" elif test "$cygwin" != "yes"; then echo "n/a (only Cygwin/Win32)" else echo "no" fi printf " WSP100 capture: " if test "$wsp100" = "yes"; then echo "yes"; else echo "no"; fi printf " Viha capture: " if test "$want_viha" = "yes"; then echo "yes"; elif test "$darwin" != "yes"; then echo "n/a (only Darwin)" else echo "no"; fi printf " Radiotap headers: " echo "$radiotaploc"; printf " Using local dump code: " if test "$local" = "yes"; then echo "yes" else echo "no" fi printf " PThread Support: " if test "$pthr" = "no"; then if test "$wantgpsmap" = "no"; then echo "n/a (GPSMap not enabled)" else echo "no" fi else echo "yes" fi if test "$linux_wireless" != "yes" -a "$linux" = "yes"; then echo "*** WARNING ***" echo "Linux Wireless Extensions were disabled. Compiling without wext on a " echo "Linux system is certianly possible, however nearly all of the packet " echo "sources will be disabled (including capture sources for Cisco, Madwifi, " echo "Orinoco, Prism, and just about every other live capture method). Make " echo "sure this is what you want to do." 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 echo echo "Configuration complete. You are not running a linux-based system," echo "you will likely need to use 'gmake' instead of 'make'." echo "Run 'gmake dep' to generate dependencies and 'gmake' followed by" echo "'gmake install' to compile and install Kismet" echo "Kismet WILL NOT be installed suid-root by default. If you wish to install" echo "Kismet as a suid-root utility, READ THE DOCUMENTATION and run " echo "'make suidinstall'." echo "DO NOT INSTALL KISMET AS SUID-ROOT IF YOU HAVE UNTRUSTED USERS ON YOUR SYSTEM." else verminor=`uname -r | cut -d '.' -f 2` # Stupid redhat vertiny=`uname -r | cut -d '.' -f 3 | cut -f 1 -d-` if test "$verminor" = "4" -a "$vertiny" -lt 16 ; then AC_MSG_WARN(There have been a number of major improvements in the linux-wireless extentions and in the aironet drivers in recent versions. It is recomended that you run at least kernel version 2.4.16, otherwise you may experience difficulties.) fi echo echo "Configuration complete. Run 'make dep' to generate dependencies" echo "and 'make' followed by 'make install' to compile and install." fi