| 1 |
dnl Aircrack-ng |
| 2 |
dnl |
| 3 |
dnl Copyright (C) 2017 Joseph Benden <[email protected]> |
| 4 |
dnl |
| 5 |
dnl Autotool support was written by: Joseph Benden <[email protected]> |
| 6 |
dnl |
| 7 |
dnl This program is free software; you can redistribute it and/or modify |
| 8 |
dnl it under the terms of the GNU General Public License as published by |
| 9 |
dnl the Free Software Foundation; either version 2 of the License, or |
| 10 |
dnl (at your option) any later version. |
| 11 |
dnl |
| 12 |
dnl This program is distributed in the hope that it will be useful, |
| 13 |
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
dnl GNU General Public License for more details. |
| 16 |
dnl |
| 17 |
dnl You should have received a copy of the GNU General Public License |
| 18 |
dnl along with this program; if not, write to the Free Software |
| 19 |
dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 20 |
dnl |
| 21 |
dnl In addition, as a special exception, the copyright holders give |
| 22 |
dnl permission to link the code of portions of this program with the |
| 23 |
dnl OpenSSL library under certain conditions as described in each |
| 24 |
dnl individual source file, and distribute linked combinations |
| 25 |
dnl including the two. |
| 26 |
dnl |
| 27 |
dnl You must obey the GNU General Public License in all respects |
| 28 |
dnl for all of the code used other than OpenSSL. |
| 29 |
dnl |
| 30 |
dnl If you modify file(s) with this exception, you may extend this |
| 31 |
dnl exception to your dnl version of the file(s), but you are not obligated |
| 32 |
dnl to do so. |
| 33 |
dnl |
| 34 |
dnl If you dnl do not wish to do so, delete this exception statement from your |
| 35 |
dnl version. |
| 36 |
dnl |
| 37 |
dnl If you delete this exception statement from all source files in the |
| 38 |
dnl program, then also delete it here. |
| 39 |
|
| 40 |
AC_DEFUN([AIRCRACK_NG_WINDOWS],[ |
| 41 |
AX_REQUIRE_DEFINED([AC_CHECK_HEADER])[]dnl |
| 42 |
AX_REQUIRE_DEFINED([AX_COMPILER_VENDOR])dnl |
| 43 |
|
| 44 |
AC_ARG_ENABLE(win32-portable, |
| 45 |
AS_HELP_STRING([--enable-win32-portable], |
| 46 |
[Enable portable WIN32 edition]), |
| 47 |
[ |
| 48 |
AC_DEFINE([WIN32_PORTABLE], [1], [Define if portable WIN32 is supported]) |
| 49 |
], []) |
| 50 |
|
| 51 |
case "$host_os" in |
| 52 |
CYGWIN*|MSYS*|cygwin*|msys*) |
| 53 |
AC_CHECK_FILE(/usr/include/w32api/windows.h, [ CPPFLAGS="$CPPFLAGS -I/usr/include/w32api" ], []) |
| 54 |
AC_CHECK_LIB(w32api, WinMain, [ LIBS="$LIBS -lw32api" ]) |
| 55 |
AC_CHECK_HEADER(windows.h, [], [AC_MSG_ERROR([windows.h was not found])]) |
| 56 |
CPPFLAGS="$CPPFLAGS -DCYGWIN" |
| 57 |
CFLAGS="$CFLAGS -mconsole -mwindows" |
| 58 |
CXXFLAGS="$CXXFLAGS -mconsole -mwindows" |
| 59 |
LDFLAGS="$LDFLAGS -mconsole -mwindows" |
| 60 |
|
| 61 |
case "$host_os" in |
| 62 |
MSYS*|msys*) |
| 63 |
CPPFLAGS="$CPPFLAGS -DMSYS2" |
| 64 |
CFLAGS="$CFLAGS -DMSYS2" |
| 65 |
CXXFLAGS="$CXXFLAGS -DMSYS2" |
| 66 |
;; |
| 67 |
esac |
| 68 |
|
| 69 |
case "$ax_cv_c_compiler_vendor" in |
| 70 |
clang) |
| 71 |
LIBS="$LIBS -liconv" |
| 72 |
;; |
| 73 |
esac |
| 74 |
;; |
| 75 |
esac |
| 76 |
]) |