sasl.m4 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # BEGIN COPYRIGHT BLOCK
  2. # Copyright (C) 2007 Red Hat, Inc.
  3. # All rights reserved.
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU General Public License
  7. # as published by the Free Software Foundation; either version 2
  8. # of the License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. #
  19. # END COPYRIGHT BLOCK
  20. # -*- tab-width: 4; -*-
  21. # Configure paths for SASL
  22. dnl ========================================================
  23. dnl = sasl is used to support various authentication mechanisms
  24. dnl = such as DIGEST-MD5 and GSSAPI.
  25. dnl ========================================================
  26. dnl ========================================================
  27. dnl = Use the sasl libraries on the system (assuming it exists)
  28. dnl ========================================================
  29. AC_CHECKING(for SASL)
  30. AC_MSG_CHECKING(for --with-sasl)
  31. AC_ARG_WITH(sasl,
  32. AS_HELP_STRING([--with-sasl@<:@=PATH@:>@],[Use SASL from supplied path]),
  33. dnl = Look in the standard system locations
  34. [
  35. if test "$withval" = "yes"; then
  36. AC_MSG_RESULT(yes)
  37. elif test "$withval" = "no"; then
  38. AC_MSG_RESULT(no)
  39. AC_MSG_ERROR([SASL is required.])
  40. dnl = Check the user provided location
  41. elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then
  42. AC_MSG_RESULT([using $withval])
  43. if test -f "$withval/include/sasl/sasl.h"; then
  44. sasl_inc="-I$withval/include/sasl"
  45. elif test -f "$withval/include/sasl.h"; then
  46. sasl_inc="-I$withval/include"
  47. else
  48. AC_MSG_ERROR(sasl.h not found)
  49. fi
  50. sasl_lib="-L$withval/lib"
  51. sasl_libdir="$withval/lib"
  52. else
  53. AC_MSG_RESULT(yes)
  54. AC_MSG_ERROR([SASL not found in $withval])
  55. fi
  56. ],
  57. AC_MSG_RESULT(yes))
  58. AC_MSG_CHECKING(for --with-sasl-inc)
  59. AC_ARG_WITH(sasl-inc,
  60. AS_HELP_STRING([--with-sasl-inc=PATH],[SASL include file directory]),
  61. [
  62. if test -f "$withval"/sasl.h; then
  63. AC_MSG_RESULT([using $withval])
  64. sasl_inc="-I$withval"
  65. else
  66. echo
  67. AC_MSG_ERROR([$withval/sasl.h not found])
  68. fi
  69. ],
  70. AC_MSG_RESULT(no))
  71. AC_MSG_CHECKING(for --with-sasl-lib)
  72. AC_ARG_WITH(sasl-lib,
  73. AS_HELP_STRING([--with-sasl-lib=PATH],[SASL library directory]),
  74. [
  75. if test -d "$withval"; then
  76. AC_MSG_RESULT([using $withval])
  77. sasl_lib="-L$withval"
  78. sasl_libdir="$withval"
  79. else
  80. echo
  81. AC_MSG_ERROR([$withval not found])
  82. fi
  83. ],
  84. AC_MSG_RESULT(no))
  85. if test -z "$sasl_inc"; then
  86. AC_MSG_CHECKING(for sasl.h)
  87. dnl - Check for sasl in standard system locations
  88. if test -f /usr/include/sasl/sasl.h; then
  89. AC_MSG_RESULT([using /usr/include/sasl/sasl.h])
  90. sasl_inc="-I/usr/include/sasl"
  91. elif test -f /usr/include/sasl.h; then
  92. AC_MSG_RESULT([using /usr/include/sasl.h])
  93. sasl_inc="-I/usr/include"
  94. else
  95. AC_MSG_RESULT(no)
  96. AC_MSG_ERROR([SASL not found, specify with --with-sasl.])
  97. fi
  98. fi