• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl
2dnl Large file support stuff for CUPS.
3dnl
4dnl Copyright © 2020-2024 by OpenPrinting.
5dnl Copyright © 2007-2011 by Apple Inc.
6dnl Copyright © 1997-2005 by Easy Software Products, all rights reserved.
7dnl
8dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more
9dnl information.
10dnl
11
12dnl Check for largefile support...
13AC_SYS_LARGEFILE
14
15dnl Define largefile options as needed...
16LARGEFILE=""
17AS_IF([test x$enable_largefile != xno], [
18    LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
19
20    AS_IF([test x$ac_cv_sys_large_files = x1], [
21	LARGEFILE="$LARGEFILE -D_LARGE_FILES"
22    ])
23
24    AS_IF([test x$ac_cv_sys_file_offset_bits = x64], [
25	LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
26    ])
27])
28AC_SUBST([LARGEFILE])
29
30dnl Check for "long long" support...
31AC_CACHE_CHECK([for long long int], [ac_cv_c_long_long], [
32    AS_IF([test "$GCC" = yes], [
33	ac_cv_c_long_long="yes"
34    ], [
35	AC_COMPILE_IFELSE([
36	    AC_LANG_PROGRAM([[ ]], [[long long int i;]])
37	], [
38	    ac_cv_c_long_long="yes"
39	], [
40	    ac_cv_c_long_long="no"
41	])
42    ])
43])
44
45AS_IF([test $ac_cv_c_long_long = yes], [
46    AC_DEFINE([HAVE_LONG_LONG], [1], [Does the compiler support the long long type?])
47])
48
49AC_CHECK_FUNC([strtoll], [
50    AC_DEFINE([HAVE_STRTOLL], [1], [Do we have the strtoll function?])
51])
52