| 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_LARGEFILE_TEST], [ |
| 41 |
AC_LANG_PUSH([C++]) |
| 42 |
AC_CHECK_SIZEOF([off_t]) |
| 43 |
AC_SYS_LONG_FILE_NAMES |
| 44 |
AC_SYS_LARGEFILE |
| 45 |
AC_FUNC_FSEEKO |
| 46 |
AC_CHECK_SIZEOF([off_t]) |
| 47 |
AC_LANG_POP([C++]) |
| 48 |
|
| 49 |
ac_cv_sizeof_off_t_cpp=$ac_cv_sizeof_off_t |
| 50 |
unset ac_cv_sizeof_off_t |
| 51 |
|
| 52 |
AC_LANG_PUSH([C]) |
| 53 |
AC_CHECK_SIZEOF([off_t]) |
| 54 |
AC_SYS_LONG_FILE_NAMES |
| 55 |
AC_SYS_LARGEFILE |
| 56 |
AC_FUNC_FSEEKO |
| 57 |
AC_CHECK_SIZEOF([off_t]) |
| 58 |
AC_LANG_POP([C]) |
| 59 |
|
| 60 |
ac_cv_sizeof_off_t_c=$ac_cv_sizeof_off_t |
| 61 |
unset ac_cv_sizeof_off_t |
| 62 |
]) |
| 63 |
|
| 64 |
AC_DEFUN([AIRCRACK_NG_LARGEFILE], [ |
| 65 |
|
| 66 |
_AIRCRACK_NG_LARGEFILE_TEST |
| 67 |
|
| 68 |
AS_IF([test ".$ac_cv_sizeof_off_t_c" != ".$ac_cv_sizeof_off_t_cpp"], [ |
| 69 |
AS_IF([test $ac_cv_sizeof_off_t_cpp -eq 4], [ |
| 70 |
AC_DEFINE([_FILE_OFFSET_BITS], [64], [Define this if 64-bit file access requires this define to be present]) |
| 71 |
CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64" |
| 72 |
]) |
| 73 |
AS_IF([test $ac_cv_sizeof_off_t_c -eq 4], [ |
| 74 |
AC_DEFINE([_FILE_OFFSET_BITS], [64], [Define this if 64-bit file access requires this define to be present]) |
| 75 |
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64" |
| 76 |
]) |
| 77 |
unset ac_cv_sizeof_off_t |
| 78 |
_AIRCRACK_NG_LARGEFILE_TEST |
| 79 |
AS_IF([test ".$ac_cv_sizeof_off_t_c" != ".$ac_cv_sizeof_off_t_cpp"], [ |
| 80 |
AC_MSG_ERROR([Cannot figure out how to make C and C++ compilers have the same sized off_t.]) |
| 81 |
]) |
| 82 |
]) |
| 83 |
|
| 84 |
AS_IF([test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono"], [ |
| 85 |
AC_DEFINE([_LARGEFILE64_SOURCE], [1], [Define this if 64-bit file access requires this define to be present]) |
| 86 |
]) |
| 87 |
]) |