1 diff -ruN freeradius-1.0.5-old/src/modules/rlm_ldap/configure.in freeradius-1.0.5-new/src/modules/rlm_ldap/configure.in
2 --- freeradius-1.0.5-old/src/modules/rlm_ldap/configure.in 2005-08-22 16:50:46.000000000 +0200
3 +++ freeradius-1.0.5-new/src/modules/rlm_ldap/configure.in 2005-12-07 08:20:15.000000000 +0100
5 dnl Static linking will probably not work, but nobody ever
6 dnl complained about it.
7 smart_try_dir=$rlm_ldap_lib_dir
9 + AC_SMART_CHECK_LIB(sasl, sasl_encode)
10 + AC_SMART_CHECK_LIB(lber, ber_init)
12 if test "x$rlm_ldap_with_threads" = "xyes"; then
13 AC_SMART_CHECK_LIB(ldap_r, ldap_init)
14 if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then
15 diff -ruN freeradius-1.0.5-old/src/modules/rlm_ldap/configure freeradius-1.0.5-new/src/modules/rlm_ldap/configure
16 --- freeradius-1.0.5-old/src/modules/rlm_ldap/configure 2005-08-22 16:53:52.000000000 +0200
17 +++ freeradius-1.0.5-new/src/modules/rlm_ldap/configure 2005-12-07 08:20:41.000000000 +0100
18 @@ -929,13 +929,311 @@
21 smart_try_dir=$rlm_ldap_lib_dir
25 +sm_lib_safe=`echo "sasl" | sed 'y%./+-%__p_%'`
26 +sm_func_safe=`echo "sasl_encode" | sed 'y%./+-%__p_%'`
27 +echo $ac_n "checking for sasl_encode in -lsasl""... $ac_c" 1>&6
28 +echo "configure:939: checking for sasl_encode in -lsasl" >&5
34 +if test "x$smart_try_dir" != "x"; then
35 + for try in $smart_try_dir; do
36 + LIBS="-L$try -lsasl $old_LIBS"
37 + cat > conftest.$ac_ext <<EOF
38 +#line 949 "configure"
39 +#include "confdefs.h"
40 +extern char sasl_encode();
45 +if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
47 + smart_lib="-L$try -lsasl"
49 + echo "configure: failed program was:" >&5
50 + cat conftest.$ac_ext >&5
53 + if test "x$smart_lib" != "x"; then
60 +if test "x$smart_lib" = "x"; then
61 + LIBS="-lsasl $old_LIBS"
62 + cat > conftest.$ac_ext <<EOF
63 +#line 974 "configure"
64 +#include "confdefs.h"
65 +extern char sasl_encode();
70 +if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74 + echo "configure: failed program was:" >&5
75 + cat conftest.$ac_ext >&5
81 +if test "x$smart_lib" = "x"; then
84 +if test "x$LOCATE" != "x"; then
86 + file=libsasl${libltdl_cv_shlibext}
88 + for x in `${LOCATE} $file 2>/dev/null`; do
89 + base=`echo $x | sed "s%/${file}%%"`
90 + if test "x$x" = "x$base"; then
94 + dir=`${DIRNAME} $x 2>/dev/null`
95 + exclude=`echo ${dir} | ${GREP} /home`
96 + if test "x$exclude" != "x"; then
100 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
101 + if test "x$already" = "x"; then
107 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
111 +if test "x$LOCATE" != "x"; then
115 + for x in `${LOCATE} $file 2>/dev/null`; do
116 + base=`echo $x | sed "s%/${file}%%"`
117 + if test "x$x" = "x$base"; then
121 + dir=`${DIRNAME} $x 2>/dev/null`
122 + exclude=`echo ${dir} | ${GREP} /home`
123 + if test "x$exclude" != "x"; then
127 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
128 + if test "x$already" = "x"; then
134 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
137 + for try in $smart_lib_dir /usr/local/lib /opt/lib; do
138 + LIBS="-L$try -lsasl $old_LIBS"
139 + cat > conftest.$ac_ext <<EOF
140 +#line 1051 "configure"
141 +#include "confdefs.h"
142 +extern char sasl_encode();
147 +if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
149 + smart_lib="-L$try -lsasl"
151 + echo "configure: failed program was:" >&5
152 + cat conftest.$ac_ext >&5
155 + if test "x$smart_lib" != "x"; then
162 +if test "x$smart_lib" != "x"; then
163 + echo "$ac_t""yes" 1>&6
164 + eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
165 + LIBS="$smart_lib $old_LIBS"
166 + SMART_LIBS="$smart_lib $SMART_LIBS"
168 + echo "$ac_t""no" 1>&6
173 +sm_lib_safe=`echo "lber" | sed 'y%./+-%__p_%'`
174 +sm_func_safe=`echo "ber_init" | sed 'y%./+-%__p_%'`
175 +echo $ac_n "checking for ber_init in -llber""... $ac_c" 1>&6
176 +echo "configure:1087: checking for ber_init in -llber" >&5
182 +if test "x$smart_try_dir" != "x"; then
183 + for try in $smart_try_dir; do
184 + LIBS="-L$try -llber $old_LIBS"
185 + cat > conftest.$ac_ext <<EOF
186 +#line 1097 "configure"
187 +#include "confdefs.h"
188 +extern char ber_init();
193 +if { (eval echo configure:1104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
195 + smart_lib="-L$try -llber"
197 + echo "configure: failed program was:" >&5
198 + cat conftest.$ac_ext >&5
201 + if test "x$smart_lib" != "x"; then
208 +if test "x$smart_lib" = "x"; then
209 + LIBS="-llber $old_LIBS"
210 + cat > conftest.$ac_ext <<EOF
211 +#line 1122 "configure"
212 +#include "confdefs.h"
213 +extern char ber_init();
218 +if { (eval echo configure:1129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
222 + echo "configure: failed program was:" >&5
223 + cat conftest.$ac_ext >&5
229 +if test "x$smart_lib" = "x"; then
232 +if test "x$LOCATE" != "x"; then
234 + file=liblber${libltdl_cv_shlibext}
236 + for x in `${LOCATE} $file 2>/dev/null`; do
237 + base=`echo $x | sed "s%/${file}%%"`
238 + if test "x$x" = "x$base"; then
242 + dir=`${DIRNAME} $x 2>/dev/null`
243 + exclude=`echo ${dir} | ${GREP} /home`
244 + if test "x$exclude" != "x"; then
248 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
249 + if test "x$already" = "x"; then
255 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
259 +if test "x$LOCATE" != "x"; then
263 + for x in `${LOCATE} $file 2>/dev/null`; do
264 + base=`echo $x | sed "s%/${file}%%"`
265 + if test "x$x" = "x$base"; then
269 + dir=`${DIRNAME} $x 2>/dev/null`
270 + exclude=`echo ${dir} | ${GREP} /home`
271 + if test "x$exclude" != "x"; then
275 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
276 + if test "x$already" = "x"; then
282 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
285 + for try in $smart_lib_dir /usr/local/lib /opt/lib; do
286 + LIBS="-L$try -llber $old_LIBS"
287 + cat > conftest.$ac_ext <<EOF
288 +#line 1199 "configure"
289 +#include "confdefs.h"
290 +extern char ber_init();
295 +if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
297 + smart_lib="-L$try -llber"
299 + echo "configure: failed program was:" >&5
300 + cat conftest.$ac_ext >&5
303 + if test "x$smart_lib" != "x"; then
310 +if test "x$smart_lib" != "x"; then
311 + echo "$ac_t""yes" 1>&6
312 + eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
313 + LIBS="$smart_lib $old_LIBS"
314 + SMART_LIBS="$smart_lib $SMART_LIBS"
316 + echo "$ac_t""no" 1>&6
320 if test "x$rlm_ldap_with_threads" = "xyes"; then
323 sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
324 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
325 echo $ac_n "checking for ldap_init in -lldap_r""... $ac_c" 1>&6
326 -echo "configure:939: checking for ldap_init in -lldap_r" >&5
327 +echo "configure:1237: checking for ldap_init in -lldap_r" >&5
331 @@ -945,14 +1243,14 @@
332 for try in $smart_try_dir; do
333 LIBS="-L$try -lldap_r $old_LIBS"
334 cat > conftest.$ac_ext <<EOF
335 -#line 949 "configure"
336 +#line 1247 "configure"
337 #include "confdefs.h"
338 extern char ldap_init();
343 -if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
344 +if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
346 smart_lib="-L$try -lldap_r"
348 @@ -970,14 +1268,14 @@
349 if test "x$smart_lib" = "x"; then
350 LIBS="-lldap_r $old_LIBS"
351 cat > conftest.$ac_ext <<EOF
352 -#line 974 "configure"
353 +#line 1272 "configure"
354 #include "confdefs.h"
355 extern char ldap_init();
360 -if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
361 +if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
365 @@ -1047,14 +1345,14 @@
366 for try in $smart_lib_dir /usr/local/lib /opt/lib; do
367 LIBS="-L$try -lldap_r $old_LIBS"
368 cat > conftest.$ac_ext <<EOF
369 -#line 1051 "configure"
370 +#line 1349 "configure"
371 #include "confdefs.h"
372 extern char ldap_init();
377 -if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
378 +if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
380 smart_lib="-L$try -lldap_r"
382 @@ -1087,7 +1385,7 @@
383 sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
384 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
385 echo $ac_n "checking for ldap_init in -lldap""... $ac_c" 1>&6
386 -echo "configure:1091: checking for ldap_init in -lldap" >&5
387 +echo "configure:1389: checking for ldap_init in -lldap" >&5
391 @@ -1097,14 +1395,14 @@
392 for try in $smart_try_dir; do
393 LIBS="-L$try -lldap $old_LIBS"
394 cat > conftest.$ac_ext <<EOF
395 -#line 1101 "configure"
396 +#line 1399 "configure"
397 #include "confdefs.h"
398 extern char ldap_init();
403 -if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
404 +if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
406 smart_lib="-L$try -lldap"
408 @@ -1122,14 +1420,14 @@
409 if test "x$smart_lib" = "x"; then
410 LIBS="-lldap $old_LIBS"
411 cat > conftest.$ac_ext <<EOF
412 -#line 1126 "configure"
413 +#line 1424 "configure"
414 #include "confdefs.h"
415 extern char ldap_init();
420 -if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
421 +if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
425 @@ -1199,14 +1497,14 @@
426 for try in $smart_lib_dir /usr/local/lib /opt/lib; do
427 LIBS="-L$try -lldap $old_LIBS"
428 cat > conftest.$ac_ext <<EOF
429 -#line 1203 "configure"
430 +#line 1501 "configure"
431 #include "confdefs.h"
432 extern char ldap_init();
437 -if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438 +if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
440 smart_lib="-L$try -lldap"
442 @@ -1241,7 +1539,7 @@
444 ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
445 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
446 -echo "configure:1245: checking for ldap.h" >&5
447 +echo "configure:1543: checking for ldap.h" >&5
451 @@ -1251,7 +1549,7 @@
452 for try in $smart_try_dir; do
453 CFLAGS="$old_CFLAGS -I$try"
454 cat > conftest.$ac_ext <<EOF
455 -#line 1255 "configure"
456 +#line 1553 "configure"
457 #include "confdefs.h"
460 @@ -1259,7 +1557,7 @@
464 -if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
465 +if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
467 smart_include="-I$try"
469 @@ -1278,7 +1576,7 @@
471 if test "x$smart_include" = "x"; then
472 cat > conftest.$ac_ext <<EOF
473 -#line 1282 "configure"
474 +#line 1580 "configure"
475 #include "confdefs.h"
478 @@ -1286,7 +1584,7 @@
482 -if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
483 +if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
487 @@ -1330,7 +1628,7 @@
488 for try in $smart_include_dir /usr/local/include /opt/include; do
489 CFLAGS="$old_CFLAGS -I$try"
490 cat > conftest.$ac_ext <<EOF
491 -#line 1334 "configure"
492 +#line 1632 "configure"
493 #include "confdefs.h"
496 @@ -1338,7 +1636,7 @@
500 -if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
501 +if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
503 smart_include="-I$try"
505 @@ -1371,12 +1669,12 @@
507 if test "x$fail" = "x"; then
508 echo $ac_n "checking for ldap_start_tls_s""... $ac_c" 1>&6
509 -echo "configure:1375: checking for ldap_start_tls_s" >&5
510 +echo "configure:1673: checking for ldap_start_tls_s" >&5
511 if eval "test \"`echo '$''{'ac_cv_func_ldap_start_tls_s'+set}'`\" = set"; then
512 echo $ac_n "(cached) $ac_c" 1>&6
514 cat > conftest.$ac_ext <<EOF
515 -#line 1380 "configure"
516 +#line 1678 "configure"
517 #include "confdefs.h"
518 /* System header to define __stub macros and hopefully few prototypes,
519 which can conflict with char ldap_start_tls_s(); below. */
520 @@ -1399,7 +1697,7 @@
524 -if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
525 +if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
527 eval "ac_cv_func_ldap_start_tls_s=yes"
529 @@ -1419,12 +1717,12 @@
532 echo $ac_n "checking for ldap_initialize""... $ac_c" 1>&6
533 -echo "configure:1423: checking for ldap_initialize" >&5
534 +echo "configure:1721: checking for ldap_initialize" >&5
535 if eval "test \"`echo '$''{'ac_cv_func_ldap_initialize'+set}'`\" = set"; then
536 echo $ac_n "(cached) $ac_c" 1>&6
538 cat > conftest.$ac_ext <<EOF
539 -#line 1428 "configure"
540 +#line 1726 "configure"
541 #include "confdefs.h"
542 /* System header to define __stub macros and hopefully few prototypes,
543 which can conflict with char ldap_initialize(); below. */
544 @@ -1447,7 +1745,7 @@
548 -if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
549 +if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
551 eval "ac_cv_func_ldap_initialize=yes"
553 @@ -1467,12 +1765,12 @@
556 echo $ac_n "checking for ldap_int_tls_config""... $ac_c" 1>&6
557 -echo "configure:1471: checking for ldap_int_tls_config" >&5
558 +echo "configure:1769: checking for ldap_int_tls_config" >&5
559 if eval "test \"`echo '$''{'ac_cv_func_ldap_int_tls_config'+set}'`\" = set"; then
560 echo $ac_n "(cached) $ac_c" 1>&6
562 cat > conftest.$ac_ext <<EOF
563 -#line 1476 "configure"
564 +#line 1774 "configure"
565 #include "confdefs.h"
566 /* System header to define __stub macros and hopefully few prototypes,
567 which can conflict with char ldap_int_tls_config(); below. */
568 @@ -1495,7 +1793,7 @@
572 -if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
573 +if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
575 eval "ac_cv_func_ldap_int_tls_config=yes"