]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-largefile.m4
6ef4b81e18e42d077933fd81396654d239e828b0
[thirdparty/cups.git] / config-scripts / cups-largefile.m4
1 dnl
2 dnl "$Id$"
3 dnl
4 dnl Large file support stuff for CUPS.
5 dnl
6 dnl Copyright 2007-2011 by Apple Inc.
7 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
8 dnl
9 dnl These coded instructions, statements, and computer programs are the
10 dnl property of Apple Inc. and are protected by Federal copyright
11 dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 dnl which should have been included with this file. If this file is
13 dnl file is missing or damaged, see the license at "http://www.cups.org/".
14 dnl
15
16 dnl Check for largefile support...
17 AC_SYS_LARGEFILE
18
19 dnl Define largefile options as needed...
20 LARGEFILE=""
21 if test x$enable_largefile != xno; then
22 LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
23
24 if test x$ac_cv_sys_large_files = x1; then
25 LARGEFILE="$LARGEFILE -D_LARGE_FILES"
26 fi
27
28 if test x$ac_cv_sys_file_offset_bits = x64; then
29 LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
30 fi
31 fi
32 AC_SUBST(LARGEFILE)
33
34 dnl Check for "long long" support...
35 AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
36 [if test "$GCC" = yes; then
37 ac_cv_c_long_long=yes
38 else
39 AC_TRY_COMPILE(,[long long int i;],
40 ac_cv_c_long_long=yes,
41 ac_cv_c_long_long=no)
42 fi])
43
44 if test $ac_cv_c_long_long = yes; then
45 AC_DEFINE(HAVE_LONG_LONG)
46 fi
47
48 AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
49
50 dnl
51 dnl End of "$Id$".
52 dnl