Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
3.5KB

  1. # ===============================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_sys_largefile_sensitive.html
  3. # ===============================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_SYS_LARGEFILE_SENSITIVE
  8. #
  9. # DESCRIPTION
  10. #
  11. # Check whether the current system is sensitive to -Ddefines making off_t
  12. # having different types/sizes. Automatically define a config.h symbol
  13. # LARGEFILE_SENSITIVE if that is the case, otherwise leave everything as
  14. # is.
  15. #
  16. # This macro builds on top of AC_SYS_LARGEFILE to detect whether special
  17. # options are needed to make the code use 64bit off_t - in many setups
  18. # this will also make the code use 64bit off_t immediately.
  19. #
  20. # The common use of a LARGEFILE_SENSITIVE config.h-define is to rename
  21. # exported functions, usually adding a 64 to the original function name.
  22. # Such renamings are only needed on systems being both (a) 32bit off_t by
  23. # default and (b) implementing large.file extensions (as for unix98).
  24. #
  25. # a renaming section could look like this:
  26. #
  27. # #if defined LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 == 64
  28. # #define zzip_open zzip_open64
  29. # #define zzip_seek zzip_seek64
  30. # #endif
  31. #
  32. # for libraries, it is best to take advantage of the prefix-config.h
  33. # macro, otherwise you want to export a renamed LARGEFILE_SENSITIVE in an
  34. # installed header file. -> see AX_PREFIX_CONFIG_H
  35. #
  36. # LICENSE
  37. #
  38. # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
  39. #
  40. # This program is free software; you can redistribute it and/or modify it
  41. # under the terms of the GNU General Public License as published by the
  42. # Free Software Foundation; either version 3 of the License, or (at your
  43. # option) any later version.
  44. #
  45. # This program is distributed in the hope that it will be useful, but
  46. # WITHOUT ANY WARRANTY; without even the implied warranty of
  47. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  48. # Public License for more details.
  49. #
  50. # You should have received a copy of the GNU General Public License along
  51. # with this program. If not, see <https://www.gnu.org/licenses/>.
  52. #
  53. # As a special exception, the respective Autoconf Macro's copyright owner
  54. # gives unlimited permission to copy, distribute and modify the configure
  55. # scripts that are the output of Autoconf when processing the Macro. You
  56. # need not follow the terms of the GNU General Public License when using
  57. # or distributing such scripts, even though portions of the text of the
  58. # Macro appear in them. The GNU General Public License (GPL) does govern
  59. # all other use of the material that constitutes the Autoconf Macro.
  60. #
  61. # This special exception to the GPL applies to versions of the Autoconf
  62. # Macro released by the Autoconf Archive. When you make and distribute a
  63. # modified version of the Autoconf Macro, you may extend this special
  64. # exception to the GPL to apply to your modified version as well.
  65. #serial 10
  66. AU_ALIAS([AC_SYS_LARGEFILE_SENSITIVE], [AX_SYS_LARGEFILE_SENSITIVE])
  67. AC_DEFUN([AX_SYS_LARGEFILE_SENSITIVE],[dnl
  68. AC_REQUIRE([AC_SYS_LARGEFILE])dnl
  69. # we know about some internals of ac_sys_largefile here...
  70. AC_MSG_CHECKING(whether system differentiates 64bit off_t by defines)
  71. ac_cv_sys_largefile_sensitive="no"
  72. if test ".${ac_cv_sys_file_offset_bits-no}${ac_cv_sys_large_files-no}" != ".nono"
  73. then ac_cv_sys_largefile_sensitive="yes"
  74. AC_DEFINE(LARGEFILE_SENSITIVE, 1,
  75. [whether the system defaults to 32bit off_t but can do 64bit when requested])
  76. fi
  77. AC_MSG_RESULT([$ac_cv_sys_largefile_sensitive])
  78. ])