1dnl Aircrack-ng 2dnl 3dnl Copyright (C) 2017 Joseph Benden <joe@benden.us> 4dnl 5dnl Autotool support was written by: Joseph Benden <joe@benden.us> 6dnl 7dnl This program is free software; you can redistribute it and/or modify 8dnl it under the terms of the GNU General Public License as published by 9dnl the Free Software Foundation; either version 2 of the License, or 10dnl (at your option) any later version. 11dnl 12dnl This program is distributed in the hope that it will be useful, 13dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 14dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15dnl GNU General Public License for more details. 16dnl 17dnl You should have received a copy of the GNU General Public License 18dnl along with this program; if not, write to the Free Software 19dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 20dnl 21dnl In addition, as a special exception, the copyright holders give 22dnl permission to link the code of portions of this program with the 23dnl OpenSSL library under certain conditions as described in each 24dnl individual source file, and distribute linked combinations 25dnl including the two. 26dnl 27dnl You must obey the GNU General Public License in all respects 28dnl for all of the code used other than OpenSSL. 29dnl 30dnl If you modify file(s) with this exception, you may extend this 31dnl exception to your dnl version of the file(s), but you are not obligated 32dnl to do so. 33dnl 34dnl If you dnl do not wish to do so, delete this exception statement from your 35dnl version. 36dnl 37dnl If you delete this exception statement from all source files in the 38dnl program, then also delete it here. 39 40AC_DEFUN([AIRCRACK_NG_AIRPCAP], [ 41AC_ARG_WITH(airpcap, 42 [AS_HELP_STRING([--with-airpcap=DIR], [use given DIR for the Airpcap library])]) 43 44case $with_airpcap in 45 no | "") 46 AIRPCAP=no 47 ;; 48 *) 49 AC_MSG_CHECKING([for 32-bit environment]) 50 case "$(uname -m)" in 51 x86_64* | amd64*) 52 AC_MSG_RESULT([no]) 53 AIRPCAP_LIB="bin/x64" 54 ;; 55 *) 56 AC_MSG_RESULT([yes]) 57 AIRPCAP_LIB="bin/x86" 58 ;; 59 esac 60 61 AC_MSG_CHECKING([for airpcap.h]) 62 if test -r "$with_airpcap/Airpcap_Devpack/include/airpcap.h" ; then 63 AIRPCAP_CFLAGS="-I$with_airpcap/Airpcap_Devpack/include" 64 AIRPCAP_LIBS="-L$with_airpcap/Airpcap_Devpack/${AIRPCAP_LIB} -lairpcap" 65 AC_SUBST(AIRPCAP_CFLAGS) 66 AC_SUBST(AIRPCAP_LIBS) 67 AC_DEFINE([HAVE_AIRPCAP], [1], [Define if you have AirPcap.]) 68 AC_MSG_RESULT([yes]) 69 AIRPCAP=yes 70 else 71 AC_MSG_ERROR([airpcap.h could not be found in $with_airpcap/Airpcap_Devpack/include]) 72 AIRPCAP=no 73 fi 74 ;; 75esac 76 77AM_CONDITIONAL([AIRPCAP], [test "$AIRPCAP" = yes]) 78]) 79