sasl.m4 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # BEGIN COPYRIGHT BLOCK
  2. # Copyright (C) 2007 Red Hat, Inc.
  3. # All rights reserved.
  4. #
  5. # License: GPL (version 3 or any later version).
  6. # See LICENSE for details.
  7. # END COPYRIGHT BLOCK
  8. # -*- tab-width: 4; -*-
  9. # Configure paths for SASL
  10. dnl ========================================================
  11. dnl = sasl is used to support various authentication mechanisms
  12. dnl = such as DIGEST-MD5 and GSSAPI.
  13. dnl ========================================================
  14. dnl ========================================================
  15. dnl = Use the sasl libraries on the system (assuming it exists)
  16. dnl ========================================================
  17. AC_CHECKING(for SASL)
  18. AC_MSG_CHECKING(for --with-sasl)
  19. AC_ARG_WITH(sasl,
  20. AS_HELP_STRING([--with-sasl@<:@=PATH@:>@],[Use SASL from supplied path]),
  21. dnl = Look in the standard system locations
  22. [
  23. if test "$withval" = "yes"; then
  24. AC_MSG_RESULT(yes)
  25. elif test "$withval" = "no"; then
  26. AC_MSG_RESULT(no)
  27. AC_MSG_ERROR([SASL is required.])
  28. dnl = Check the user provided location
  29. elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then
  30. AC_MSG_RESULT([using $withval])
  31. if test -f "$withval/include/sasl/sasl.h"; then
  32. sasl_inc="-I$withval/include/sasl"
  33. elif test -f "$withval/include/sasl.h"; then
  34. sasl_inc="-I$withval/include"
  35. else
  36. AC_MSG_ERROR(sasl.h not found)
  37. fi
  38. sasl_lib="-L$withval/lib"
  39. sasl_libdir="$withval/lib"
  40. else
  41. AC_MSG_RESULT(yes)
  42. AC_MSG_ERROR([SASL not found in $withval])
  43. fi
  44. ],
  45. AC_MSG_RESULT(yes))
  46. AC_MSG_CHECKING(for --with-sasl-inc)
  47. AC_ARG_WITH(sasl-inc,
  48. AS_HELP_STRING([--with-sasl-inc=PATH],[SASL include file directory]),
  49. [
  50. if test -f "$withval"/sasl.h; then
  51. AC_MSG_RESULT([using $withval])
  52. sasl_inc="-I$withval"
  53. else
  54. echo
  55. AC_MSG_ERROR([$withval/sasl.h not found])
  56. fi
  57. ],
  58. AC_MSG_RESULT(no))
  59. AC_MSG_CHECKING(for --with-sasl-lib)
  60. AC_ARG_WITH(sasl-lib,
  61. AS_HELP_STRING([--with-sasl-lib=PATH],[SASL library directory]),
  62. [
  63. if test -d "$withval"; then
  64. AC_MSG_RESULT([using $withval])
  65. sasl_lib="-L$withval"
  66. sasl_libdir="$withval"
  67. else
  68. echo
  69. AC_MSG_ERROR([$withval not found])
  70. fi
  71. ],
  72. AC_MSG_RESULT(no))
  73. if test -z "$sasl_inc"; then
  74. AC_MSG_CHECKING(for sasl.h)
  75. dnl - Check for sasl in standard system locations
  76. if test -f /usr/include/sasl/sasl.h; then
  77. AC_MSG_RESULT([using /usr/include/sasl/sasl.h])
  78. sasl_inc="-I/usr/include/sasl"
  79. elif test -f /usr/include/sasl.h; then
  80. AC_MSG_RESULT([using /usr/include/sasl.h])
  81. sasl_inc="-I/usr/include"
  82. else
  83. AC_MSG_RESULT(no)
  84. AC_MSG_ERROR([SASL not found, specify with --with-sasl.])
  85. fi
  86. fi