aclocal.m4 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # generated automatically by aclocal 1.17 -*- Autoconf -*-
  2. # Copyright (C) 1996-2024 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. # ===========================================================================
  12. # https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
  13. # ===========================================================================
  14. #
  15. # SYNOPSIS
  16. #
  17. # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
  18. #
  19. # DESCRIPTION
  20. #
  21. # Check whether the given FLAG works with the linker or gives an error.
  22. # (Warnings, however, are ignored)
  23. #
  24. # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
  25. # success/failure.
  26. #
  27. # If EXTRA-FLAGS is defined, it is added to the linker's default flags
  28. # when the check is done. The check is thus made with the flags: "LDFLAGS
  29. # EXTRA-FLAGS FLAG". This can for example be used to force the linker to
  30. # issue an error when a bad flag is given.
  31. #
  32. # INPUT gives an alternative input source to AC_LINK_IFELSE.
  33. #
  34. # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
  35. # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
  36. #
  37. # LICENSE
  38. #
  39. # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
  40. # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
  41. #
  42. # Copying and distribution of this file, with or without modification, are
  43. # permitted in any medium without royalty provided the copyright notice
  44. # and this notice are preserved. This file is offered as-is, without any
  45. # warranty.
  46. #serial 6
  47. AC_DEFUN([AX_CHECK_LINK_FLAG],
  48. [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
  49. AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
  50. AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
  51. ax_check_save_flags=$LDFLAGS
  52. LDFLAGS="$LDFLAGS $4 $1"
  53. AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
  54. [AS_VAR_SET(CACHEVAR,[yes])],
  55. [AS_VAR_SET(CACHEVAR,[no])])
  56. LDFLAGS=$ax_check_save_flags])
  57. AS_VAR_IF(CACHEVAR,yes,
  58. [m4_default([$2], :)],
  59. [m4_default([$3], :)])
  60. AS_VAR_POPDEF([CACHEVAR])dnl
  61. ])dnl AX_CHECK_LINK_FLAGS
  62. # ===========================================================================
  63. # https://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
  64. # ===========================================================================
  65. #
  66. # SYNOPSIS
  67. #
  68. # AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
  69. #
  70. # DESCRIPTION
  71. #
  72. # Perform some cleanups on the value of $VARNAME (interpreted as a path):
  73. #
  74. # - empty paths are changed to '.'
  75. # - trailing slashes are removed
  76. # - repeated slashes are squeezed except a leading doubled slash '//'
  77. # (which might indicate a networked disk on some OS).
  78. #
  79. # REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
  80. # REFERENCE_STRING contains some backslashes, all slashes and backslashes
  81. # are turned into backslashes, otherwise they are all turned into slashes.
  82. #
  83. # This makes processing of DOS filenames quite easier, because you can
  84. # turn a filename to the Unix notation, make your processing, and turn it
  85. # back to original notation.
  86. #
  87. # filename='A:\FOO\\BAR\'
  88. # old_filename="$filename"
  89. # # Switch to the unix notation
  90. # AX_NORMALIZE_PATH([filename], ["/"])
  91. # # now we have $filename = 'A:/FOO/BAR' and we can process it as if
  92. # # it was a Unix path. For instance let's say that you want
  93. # # to append '/subpath':
  94. # filename="$filename/subpath"
  95. # # finally switch back to the original notation
  96. # AX_NORMALIZE_PATH([filename], ["$old_filename"])
  97. # # now $filename equals to 'A:\FOO\BAR\subpath'
  98. #
  99. # One good reason to make all path processing with the unix convention is
  100. # that backslashes have a special meaning in many cases. For instance
  101. #
  102. # expr 'A:\FOO' : 'A:\Foo'
  103. #
  104. # will return 0 because the second argument is a regex in which
  105. # backslashes have to be backslashed. In other words, to have the two
  106. # strings to match you should write this instead:
  107. #
  108. # expr 'A:\Foo' : 'A:\\Foo'
  109. #
  110. # Such behavior makes DOS filenames extremely unpleasant to work with. So
  111. # temporary turn your paths to the Unix notation, and revert them to the
  112. # original notation after the processing. See the macro
  113. # AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
  114. #
  115. # REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
  116. # converted to backslashes if $VARIABLE already contains some backslashes
  117. # (see $thirddir below).
  118. #
  119. # firstdir='/usr/local//share'
  120. # seconddir='C:\Program Files\\'
  121. # thirddir='C:\home/usr/'
  122. # AX_NORMALIZE_PATH([firstdir])
  123. # AX_NORMALIZE_PATH([seconddir])
  124. # AX_NORMALIZE_PATH([thirddir])
  125. # # $firstdir = '/usr/local/share'
  126. # # $seconddir = 'C:\Program Files'
  127. # # $thirddir = 'C:\home\usr'
  128. #
  129. # LICENSE
  130. #
  131. # Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
  132. #
  133. # This program is free software; you can redistribute it and/or modify it
  134. # under the terms of the GNU General Public License as published by the
  135. # Free Software Foundation; either version 2 of the License, or (at your
  136. # option) any later version.
  137. #
  138. # This program is distributed in the hope that it will be useful, but
  139. # WITHOUT ANY WARRANTY; without even the implied warranty of
  140. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  141. # Public License for more details.
  142. #
  143. # You should have received a copy of the GNU General Public License along
  144. # with this program. If not, see <https://www.gnu.org/licenses/>.
  145. #
  146. # As a special exception, the respective Autoconf Macro's copyright owner
  147. # gives unlimited permission to copy, distribute and modify the configure
  148. # scripts that are the output of Autoconf when processing the Macro. You
  149. # need not follow the terms of the GNU General Public License when using
  150. # or distributing such scripts, even though portions of the text of the
  151. # Macro appear in them. The GNU General Public License (GPL) does govern
  152. # all other use of the material that constitutes the Autoconf Macro.
  153. #
  154. # This special exception to the GPL applies to versions of the Autoconf
  155. # Macro released by the Autoconf Archive. When you make and distribute a
  156. # modified version of the Autoconf Macro, you may extend this special
  157. # exception to the GPL to apply to your modified version as well.
  158. #serial 8
  159. AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH])
  160. AC_DEFUN([AX_NORMALIZE_PATH],
  161. [case ":[$]$1:" in
  162. # change empty paths to '.'
  163. ::) $1='.' ;;
  164. # strip trailing slashes
  165. :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
  166. :*:) ;;
  167. esac
  168. # squeeze repeated slashes
  169. case ifelse($2,,"[$]$1",$2) in
  170. # if the path contains any backslashes, turn slashes into backslashes
  171. *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
  172. # if the path contains slashes, also turn backslashes into slashes
  173. *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
  174. esac])
  175. m4_include([macros/ax_nagios_get_distrib.m4])
  176. m4_include([macros/ax_nagios_get_files.m4])
  177. m4_include([macros/ax_nagios_get_inetd.m4])
  178. m4_include([macros/ax_nagios_get_init.m4])
  179. m4_include([macros/ax_nagios_get_os.m4])
  180. m4_include([macros/ax_nagios_get_paths.m4])
  181. m4_include([macros/ax_nagios_get_ssl.m4])