1 diff -ruN freeradius-1.1.1-old/src/modules/rlm_ldap/configure freeradius-1.1.1-new/src/modules/rlm_ldap/configure
2 --- freeradius-1.1.1-old/src/modules/rlm_ldap/configure 2005-12-08 20:32:53.000000000 +0100
3 +++ freeradius-1.1.1-new/src/modules/rlm_ldap/configure 2006-05-21 19:54:07.000000000 +0200
7 smart_try_dir=$rlm_ldap_lib_dir
11 +sm_lib_safe=`echo "sasl" | sed 'y%./+-%__p_%'`
12 +sm_func_safe=`echo "sasl_encode" | sed 'y%./+-%__p_%'`
13 +echo $ac_n "checking for sasl_encode in -lsasl""... $ac_c" 1>&6
14 +echo "configure:939: checking for sasl_encode in -lsasl" >&5
20 +if test "x$smart_try_dir" != "x"; then
21 + for try in $smart_try_dir; do
22 + LIBS="-L$try -lsasl $old_LIBS"
23 + cat > conftest.$ac_ext <<EOF
24 +#line 949 "configure"
25 +#include "confdefs.h"
26 +extern char sasl_encode();
31 +if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
33 + smart_lib="-L$try -lsasl"
35 + echo "configure: failed program was:" >&5
36 + cat conftest.$ac_ext >&5
39 + if test "x$smart_lib" != "x"; then
46 +if test "x$smart_lib" = "x"; then
47 + LIBS="-lsasl $old_LIBS"
48 + cat > conftest.$ac_ext <<EOF
49 +#line 974 "configure"
50 +#include "confdefs.h"
51 +extern char sasl_encode();
56 +if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
60 + echo "configure: failed program was:" >&5
61 + cat conftest.$ac_ext >&5
67 +if test "x$smart_lib" = "x"; then
70 +if test "x$LOCATE" != "x"; then
72 + file=libsasl${libltdl_cv_shlibext}
74 + for x in `${LOCATE} $file 2>/dev/null`; do
75 + base=`echo $x | sed "s%/${file}%%"`
76 + if test "x$x" = "x$base"; then
80 + dir=`${DIRNAME} $x 2>/dev/null`
81 + exclude=`echo ${dir} | ${GREP} /home`
82 + if test "x$exclude" != "x"; then
86 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
87 + if test "x$already" = "x"; then
93 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
97 +if test "x$LOCATE" != "x"; then
101 + for x in `${LOCATE} $file 2>/dev/null`; do
102 + base=`echo $x | sed "s%/${file}%%"`
103 + if test "x$x" = "x$base"; then
107 + dir=`${DIRNAME} $x 2>/dev/null`
108 + exclude=`echo ${dir} | ${GREP} /home`
109 + if test "x$exclude" != "x"; then
113 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
114 + if test "x$already" = "x"; then
120 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
123 + for try in $smart_lib_dir /usr/local/lib /opt/lib; do
124 + LIBS="-L$try -lsasl $old_LIBS"
125 + cat > conftest.$ac_ext <<EOF
126 +#line 1051 "configure"
127 +#include "confdefs.h"
128 +extern char sasl_encode();
133 +if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
135 + smart_lib="-L$try -lsasl"
137 + echo "configure: failed program was:" >&5
138 + cat conftest.$ac_ext >&5
141 + if test "x$smart_lib" != "x"; then
148 +if test "x$smart_lib" != "x"; then
149 + echo "$ac_t""yes" 1>&6
150 + eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
151 + LIBS="$smart_lib $old_LIBS"
152 + SMART_LIBS="$smart_lib $SMART_LIBS"
154 + echo "$ac_t""no" 1>&6
159 +sm_lib_safe=`echo "lber" | sed 'y%./+-%__p_%'`
160 +sm_func_safe=`echo "ber_init" | sed 'y%./+-%__p_%'`
161 +echo $ac_n "checking for ber_init in -llber""... $ac_c" 1>&6
162 +echo "configure:1087: checking for ber_init in -llber" >&5
168 +if test "x$smart_try_dir" != "x"; then
169 + for try in $smart_try_dir; do
170 + LIBS="-L$try -llber $old_LIBS"
171 + cat > conftest.$ac_ext <<EOF
172 +#line 1097 "configure"
173 +#include "confdefs.h"
174 +extern char ber_init();
179 +if { (eval echo configure:1104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
181 + smart_lib="-L$try -llber"
183 + echo "configure: failed program was:" >&5
184 + cat conftest.$ac_ext >&5
187 + if test "x$smart_lib" != "x"; then
194 +if test "x$smart_lib" = "x"; then
195 + LIBS="-llber $old_LIBS"
196 + cat > conftest.$ac_ext <<EOF
197 +#line 1122 "configure"
198 +#include "confdefs.h"
199 +extern char ber_init();
204 +if { (eval echo configure:1129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
208 + echo "configure: failed program was:" >&5
209 + cat conftest.$ac_ext >&5
215 +if test "x$smart_lib" = "x"; then
218 +if test "x$LOCATE" != "x"; then
220 + file=liblber${libltdl_cv_shlibext}
222 + for x in `${LOCATE} $file 2>/dev/null`; do
223 + base=`echo $x | sed "s%/${file}%%"`
224 + if test "x$x" = "x$base"; then
228 + dir=`${DIRNAME} $x 2>/dev/null`
229 + exclude=`echo ${dir} | ${GREP} /home`
230 + if test "x$exclude" != "x"; then
234 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
235 + if test "x$already" = "x"; then
241 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
245 +if test "x$LOCATE" != "x"; then
249 + for x in `${LOCATE} $file 2>/dev/null`; do
250 + base=`echo $x | sed "s%/${file}%%"`
251 + if test "x$x" = "x$base"; then
255 + dir=`${DIRNAME} $x 2>/dev/null`
256 + exclude=`echo ${dir} | ${GREP} /home`
257 + if test "x$exclude" != "x"; then
261 + already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
262 + if test "x$already" = "x"; then
268 +eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
271 + for try in $smart_lib_dir /usr/local/lib /opt/lib; do
272 + LIBS="-L$try -llber $old_LIBS"
273 + cat > conftest.$ac_ext <<EOF
274 +#line 1199 "configure"
275 +#include "confdefs.h"
276 +extern char ber_init();
281 +if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
283 + smart_lib="-L$try -llber"
285 + echo "configure: failed program was:" >&5
286 + cat conftest.$ac_ext >&5
289 + if test "x$smart_lib" != "x"; then
296 +if test "x$smart_lib" != "x"; then
297 + echo "$ac_t""yes" 1>&6
298 + eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
299 + LIBS="$smart_lib $old_LIBS"
300 + SMART_LIBS="$smart_lib $SMART_LIBS"
302 + echo "$ac_t""no" 1>&6
306 if test "x$rlm_ldap_with_threads" = "xyes"; then
309 sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
310 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
311 echo $ac_n "checking for ldap_init in -lldap_r""... $ac_c" 1>&6
312 -echo "configure:939: checking for ldap_init in -lldap_r" >&5
313 +echo "configure:1237: checking for ldap_init in -lldap_r" >&5
317 @@ -945,14 +1243,14 @@
318 for try in $smart_try_dir; do
319 LIBS="-L$try -lldap_r $old_LIBS"
320 cat > conftest.$ac_ext <<EOF
321 -#line 949 "configure"
322 +#line 1247 "configure"
323 #include "confdefs.h"
324 extern char ldap_init();
329 -if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
330 +if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
332 smart_lib="-L$try -lldap_r"
334 @@ -970,14 +1268,14 @@
335 if test "x$smart_lib" = "x"; then
336 LIBS="-lldap_r $old_LIBS"
337 cat > conftest.$ac_ext <<EOF
338 -#line 974 "configure"
339 +#line 1272 "configure"
340 #include "confdefs.h"
341 extern char ldap_init();
346 -if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
347 +if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
351 @@ -1047,14 +1345,14 @@
352 for try in $smart_lib_dir /usr/local/lib /opt/lib; do
353 LIBS="-L$try -lldap_r $old_LIBS"
354 cat > conftest.$ac_ext <<EOF
355 -#line 1051 "configure"
356 +#line 1349 "configure"
357 #include "confdefs.h"
358 extern char ldap_init();
363 -if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
364 +if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
366 smart_lib="-L$try -lldap_r"
368 @@ -1087,7 +1385,7 @@
369 sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
370 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
371 echo $ac_n "checking for ldap_init in -lldap""... $ac_c" 1>&6
372 -echo "configure:1091: checking for ldap_init in -lldap" >&5
373 +echo "configure:1389: checking for ldap_init in -lldap" >&5
377 @@ -1097,14 +1395,14 @@
378 for try in $smart_try_dir; do
379 LIBS="-L$try -lldap $old_LIBS"
380 cat > conftest.$ac_ext <<EOF
381 -#line 1101 "configure"
382 +#line 1399 "configure"
383 #include "confdefs.h"
384 extern char ldap_init();
389 -if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
390 +if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
392 smart_lib="-L$try -lldap"
394 @@ -1122,14 +1420,14 @@
395 if test "x$smart_lib" = "x"; then
396 LIBS="-lldap $old_LIBS"
397 cat > conftest.$ac_ext <<EOF
398 -#line 1126 "configure"
399 +#line 1424 "configure"
400 #include "confdefs.h"
401 extern char ldap_init();
406 -if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
407 +if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
411 @@ -1199,14 +1497,14 @@
412 for try in $smart_lib_dir /usr/local/lib /opt/lib; do
413 LIBS="-L$try -lldap $old_LIBS"
414 cat > conftest.$ac_ext <<EOF
415 -#line 1203 "configure"
416 +#line 1501 "configure"
417 #include "confdefs.h"
418 extern char ldap_init();
423 -if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
424 +if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
426 smart_lib="-L$try -lldap"
428 @@ -1241,7 +1539,7 @@
430 ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
431 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
432 -echo "configure:1245: checking for ldap.h" >&5
433 +echo "configure:1543: checking for ldap.h" >&5
437 @@ -1251,7 +1549,7 @@
438 for try in $smart_try_dir; do
439 CFLAGS="$old_CFLAGS -I$try"
440 cat > conftest.$ac_ext <<EOF
441 -#line 1255 "configure"
442 +#line 1553 "configure"
443 #include "confdefs.h"
446 @@ -1259,7 +1557,7 @@
450 -if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451 +if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
453 smart_include="-I$try"
455 @@ -1278,7 +1576,7 @@
457 if test "x$smart_include" = "x"; then
458 cat > conftest.$ac_ext <<EOF
459 -#line 1282 "configure"
460 +#line 1580 "configure"
461 #include "confdefs.h"
464 @@ -1286,7 +1584,7 @@
468 -if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
469 +if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
473 @@ -1330,7 +1628,7 @@
474 for try in $smart_include_dir /usr/local/include /opt/include; do
475 CFLAGS="$old_CFLAGS -I$try"
476 cat > conftest.$ac_ext <<EOF
477 -#line 1334 "configure"
478 +#line 1632 "configure"
479 #include "confdefs.h"
482 @@ -1338,7 +1636,7 @@
486 -if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
487 +if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
489 smart_include="-I$try"
491 @@ -1371,12 +1669,12 @@
493 if test "x$fail" = "x"; then
494 echo $ac_n "checking for ldap_start_tls_s""... $ac_c" 1>&6
495 -echo "configure:1375: checking for ldap_start_tls_s" >&5
496 +echo "configure:1673: checking for ldap_start_tls_s" >&5
497 if eval "test \"`echo '$''{'ac_cv_func_ldap_start_tls_s'+set}'`\" = set"; then
498 echo $ac_n "(cached) $ac_c" 1>&6
500 cat > conftest.$ac_ext <<EOF
501 -#line 1380 "configure"
502 +#line 1678 "configure"
503 #include "confdefs.h"
504 /* System header to define __stub macros and hopefully few prototypes,
505 which can conflict with char ldap_start_tls_s(); below. */
506 @@ -1399,7 +1697,7 @@
510 -if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
511 +if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
513 eval "ac_cv_func_ldap_start_tls_s=yes"
515 @@ -1419,12 +1717,12 @@
518 echo $ac_n "checking for ldap_initialize""... $ac_c" 1>&6
519 -echo "configure:1423: checking for ldap_initialize" >&5
520 +echo "configure:1721: checking for ldap_initialize" >&5
521 if eval "test \"`echo '$''{'ac_cv_func_ldap_initialize'+set}'`\" = set"; then
522 echo $ac_n "(cached) $ac_c" 1>&6
524 cat > conftest.$ac_ext <<EOF
525 -#line 1428 "configure"
526 +#line 1726 "configure"
527 #include "confdefs.h"
528 /* System header to define __stub macros and hopefully few prototypes,
529 which can conflict with char ldap_initialize(); below. */
530 @@ -1447,7 +1745,7 @@
534 -if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
535 +if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
537 eval "ac_cv_func_ldap_initialize=yes"
539 @@ -1467,12 +1765,12 @@
542 echo $ac_n "checking for ldap_int_tls_config""... $ac_c" 1>&6
543 -echo "configure:1471: checking for ldap_int_tls_config" >&5
544 +echo "configure:1769: checking for ldap_int_tls_config" >&5
545 if eval "test \"`echo '$''{'ac_cv_func_ldap_int_tls_config'+set}'`\" = set"; then
546 echo $ac_n "(cached) $ac_c" 1>&6
548 cat > conftest.$ac_ext <<EOF
549 -#line 1476 "configure"
550 +#line 1774 "configure"
551 #include "confdefs.h"
552 /* System header to define __stub macros and hopefully few prototypes,
553 which can conflict with char ldap_int_tls_config(); below. */
554 @@ -1495,7 +1793,7 @@
558 -if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
559 +if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
561 eval "ac_cv_func_ldap_int_tls_config=yes"
563 diff -ruN freeradius-1.1.1-old/src/modules/rlm_ldap/configure.in freeradius-1.1.1-new/src/modules/rlm_ldap/configure.in
564 --- freeradius-1.1.1-old/src/modules/rlm_ldap/configure.in 2005-08-22 16:50:46.000000000 +0200
565 +++ freeradius-1.1.1-new/src/modules/rlm_ldap/configure.in 2006-05-21 19:51:25.000000000 +0200
567 dnl Static linking will probably not work, but nobody ever
568 dnl complained about it.
569 smart_try_dir=$rlm_ldap_lib_dir
571 + AC_SMART_CHECK_LIB(sasl, sasl_encode)
572 + AC_SMART_CHECK_LIB(lber, ber_init)
574 if test "x$rlm_ldap_with_threads" = "xyes"; then
575 AC_SMART_CHECK_LIB(ldap_r, ldap_init)
576 if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then