patch-acinclude_m4 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. --- freeradius-server-3.0.8.orig/acinclude.m4 2015-04-22 19:21:34.000000000 +0200
  2. +++ freeradius-server-3.0.8/acinclude.m4 2015-05-13 22:13:54.000000000 +0200
  3. @@ -218,22 +218,22 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'`
  4. old_CPPFLAGS="$CPPFLAGS"
  5. smart_include=
  6. dnl # The default directories we search in (in addition to the compilers search path)
  7. -smart_include_dir="/usr/local/include /opt/include"
  8. +dnl smart_include_dir="/usr/local/include /opt/include"
  9. dnl # Our local versions
  10. _smart_try_dir=
  11. _smart_include_dir=
  12. dnl # Add variants with the different prefixes and one with no prefix
  13. -for _prefix in $smart_prefix ""; do
  14. - for _dir in $smart_try_dir; do
  15. - _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
  16. - done
  17. -
  18. - for _dir in $smart_include_dir; do
  19. - _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
  20. - done
  21. -done
  22. +dnl for _prefix in $smart_prefix ""; do
  23. +dnl for _dir in $smart_try_dir; do
  24. +dnl _smart_try_dir="${_smart_try_dir} ${_dir}/${_prefix}"
  25. +dnl done
  26. +dnl
  27. +dnl for _dir in $smart_include_dir; do
  28. +dnl _smart_include_dir="${_smart_include_dir} ${_dir}/${_prefix}"
  29. +dnl done
  30. +dnl done
  31. dnl #
  32. dnl # Try any user-specified directory first otherwise we may pick up
  33. @@ -262,73 +262,73 @@ fi
  34. dnl #
  35. dnl # Try using the default includes (with prefixes).
  36. dnl #
  37. -if test "x$smart_include" = "x"; then
  38. - for _prefix in $smart_prefix; do
  39. - AC_MSG_CHECKING([for ${_prefix}/$1])
  40. -
  41. - AC_TRY_COMPILE([$2
  42. - #include <$1>],
  43. - [int a = 1;],
  44. - [
  45. - smart_include="-isystem ${_prefix}/"
  46. - AC_MSG_RESULT(yes)
  47. - break
  48. - ],
  49. - [
  50. - smart_include=
  51. - AC_MSG_RESULT(no)
  52. - ])
  53. - done
  54. -fi
  55. +dnl if test "x$smart_include" = "x"; then
  56. +dnl for _prefix in $smart_prefix; do
  57. +dnl AC_MSG_CHECKING([for ${_prefix}/$1])
  58. +dnl
  59. +dnl AC_TRY_COMPILE([$2
  60. +dnl #include <$1>],
  61. +dnl [int a = 1;],
  62. +dnl [
  63. +dnl smart_include="-isystem ${_prefix}/"
  64. +dnl AC_MSG_RESULT(yes)
  65. +dnl break
  66. +dnl ],
  67. +dnl [
  68. +dnl smart_include=
  69. +dnl AC_MSG_RESULT(no)
  70. +dnl ])
  71. +dnl done
  72. +dnl fi
  73. dnl #
  74. dnl # Try using the default includes (without prefixes).
  75. dnl #
  76. if test "x$smart_include" = "x"; then
  77. - AC_MSG_CHECKING([for $1])
  78. -
  79. - AC_TRY_COMPILE([$2
  80. + AC_MSG_CHECKING([for $1])
  81. +
  82. + AC_TRY_COMPILE([$2
  83. #include <$1>],
  84. - [int a = 1;],
  85. - [
  86. - smart_include=" "
  87. - AC_MSG_RESULT(yes)
  88. - break
  89. - ],
  90. - [
  91. - smart_include=
  92. + [int a = 1;],
  93. + [
  94. + smart_include=" "
  95. + AC_MSG_RESULT(yes)
  96. + break
  97. + ],
  98. + [
  99. + smart_include=
  100. AC_MSG_RESULT(no)
  101. - ])
  102. + ])
  103. fi
  104. dnl #
  105. dnl # Try to guess possible locations.
  106. dnl #
  107. -if test "x$smart_include" = "x"; then
  108. -
  109. - for prefix in $smart_prefix; do
  110. - FR_LOCATE_DIR(_smart_include_dir,"${_prefix}/${1}")
  111. - done
  112. - FR_LOCATE_DIR(_smart_include_dir, $1)
  113. -
  114. - for try in $_smart_include_dir; do
  115. - AC_MSG_CHECKING([for $1 in $try])
  116. - CPPFLAGS="-isystem $try $old_CPPFLAGS"
  117. - AC_TRY_COMPILE([$2
  118. - #include <$1>],
  119. - [int a = 1;],
  120. - [
  121. - smart_include="-isystem $try"
  122. - AC_MSG_RESULT(yes)
  123. - break
  124. - ],
  125. - [
  126. - smart_include=
  127. - AC_MSG_RESULT(no)
  128. - ])
  129. - done
  130. - CPPFLAGS="$old_CPPFLAGS"
  131. -fi
  132. +dnl if test "x$smart_include" = "x"; then
  133. +dnl
  134. +dnl for prefix in $smart_prefix; do
  135. +dnl FR_LOCATE_DIR(_smart_include_dir,"${_prefix}/${1}")
  136. +dnl done
  137. +dnl FR_LOCATE_DIR(_smart_include_dir, $1)
  138. +dnl
  139. +dnl for try in $_smart_include_dir; do
  140. +dnl AC_MSG_CHECKING([for $1 in $try])
  141. +dnl CPPFLAGS="-isystem $try $old_CPPFLAGS"
  142. +dnl AC_TRY_COMPILE([$2
  143. +dnl #include <$1>],
  144. +dnl [int a = 1;],
  145. +dnl [
  146. +dnl smart_include="-isystem $try"
  147. +dnl AC_MSG_RESULT(yes)
  148. +dnl break
  149. +dnl ],
  150. +dnl [
  151. +dnl smart_include=
  152. +dnl AC_MSG_RESULT(no)
  153. +dnl ])
  154. +dnl done
  155. +dnl CPPFLAGS="$old_CPPFLAGS"
  156. +dnl fi
  157. dnl #
  158. dnl # Found it, set the appropriate variable.