5 AC_DEFUN([AC_CHECK_SL],[
9 LIB_sl='$(top_builddir)/lib/sl/libsl.la'
10 INC_sl='-I$(top_builddir)/include'
11 DEPEND_sl='$(top_builddir)/lib/sl/libsl.la'
14 [ --with-sl=dir make with sl in dir],
15 [if test "$with_sl" != "no"; then
19 if test "X$withval" != "Xyes"; then
20 if test -f "$withval/lib/liblsl.la" ; then
21 LIB_sl="$withval/lib/liblsl.la"
23 LIB_sl="-L$withval/lib -lsl"
25 INC_sl="-I$withval/include"
30 fi],[with_sl=builtin])
32 AC_ARG_WITH(sl-include,
33 [ --with-sl-include=dir make with sl headers in dir],
34 [if test "$with_sl" != "no"; then
37 if test "X$withval" != "Xyes"; then
45 [ --with-sl-lib=dir make with sl lib in dir],
46 [if test "$with_sl" != "no"; then
50 if test "X$withval" != "Xyes"; then
51 if test -f "$withval/liblsl.la" ; then
52 LIB_sl="$withval/liblsl.la"
54 LIB_sl="-L$withval -lsl"
61 dnl kerberos may include sl, lets use that if available
62 dnl should this try the roken path instead?
64 if test "X$SL_H" != "X"; then
67 LIBS="$KRB5_LIB_DIR -lsl $LIB_readline_ac $LIBS"
69 AC_MSG_CHECKING([for sl in $KRB5_LIB_DIR])
71 AC_TRY_LINK_FUNC(sl_apropos,
72 [working_krb_sl_libs=yes],[working_krb_sl_libs=no])
73 AC_MSG_RESULT($working_krb_sl_libs)
77 if test "X$working_krb_sl_libs" = "Xyes"; then
81 LIB_sl="$KRB5_LIB_DIR -lsl"
82 INC_sl="$KRB5_INC_DIR"
93 AC_MSG_CHECKING([if sl have sl_apropos])
94 AC_CACHE_VAL(ac_cv_slcompat_sl_apropos,[
96 if test "X$with_sl" = "Xbuiltin"; then
97 dnl built in sl do have sl_apropos
98 ac_cv_slcompat_sl_apropos=builtin
101 LIBS="$LIB_sl $LIB_readline_ac $LIBS"
102 AC_TRY_LINK_FUNC(sl_apropos,
103 [ac_cv_slcompat_sl_apropos=yes],[ac_cv_slcompat_sl_apropos=no])
109 if test "X$ac_cv_slcompat_sl_apropos" = "Xno"; then
110 AC_DEFINE_UNQUOTED(NEED_SLCOMPAT_SL_APROPOS, 1,[libsl need sl_apropos])
113 AC_MSG_RESULT($ac_cv_slcompat_sl_apropos)