Bug 1331 - check for libsasl needed for libldap on Solaris in configure
Summary: check for libsasl needed for libldap on Solaris in configure
Status: RESOLVED LATER
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.3
Hardware: All Solaris
: P2 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-09 08:30 UTC by Thomas Müller
Modified: 2004-10-29 07:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Müller 2004-05-09 08:30:34 UTC
For building Samba under Solaris 8 with the libldap from Sun directory server
5.2 SDK libsasl is also needed otherwise configure will report undefined symbols
in libldap when checking libldap. Therefor configure has to do a check for
libsasl. I have added the check to configure after the check of liblber ans
before the check of libldap. I have tested it under Solaris 8 and it works well. 

Hope it would be in the next release.
Thomas
snip......
.
.
		case "$LDAP_LIBS" in
		    *-llber*)
			;;
		    *)
			LDAP_LIBS="-llber $LDAP_LIBS"
			;;
		esac


fi


  ##################################################################
  # we might need the sasl lib on some systems. To avoid link errors
  # this test must be before the libldap test, i.e. this is a must 
  # for building against libldap from Sun directory server 5.2
  # otherwise libldap will have errors because of undefined symbols



ac_check_lib_ext_save_LIBS=$LIBS
LIBS="-lsasl $LDAP_LIBS  $LIBS"




        echo "$as_me:$LINENO: checking for sasl_dispose in -lsasl" >&5
echo $ECHO_N "checking for sasl_dispose in -lsasl... $ECHO_C" >&6
if test "${ac_cv_lib_ext_lsasl_sasl_dispose+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char sasl_dispose ();
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
sasl_dispose ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_ext_lsasl_sasl_dispose=yes;
		  ac_cv_lib_ext_lsasl=yes
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_lib_ext_lsasl_sasl_dispose=no;
		  ac_cv_lib_ext_lsasl=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext

fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ext_lsasl_sasl_dispose" >&5
echo "${ECHO_T}$ac_cv_lib_ext_lsasl_sasl_dispose" >&6
    if test $ac_cv_lib_ext_lsasl_sasl_dispose = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_SASL_DISPOSE 1
_ACEOF

fi

LIBS=$ac_check_lib_ext_save_LIBS

if test $ac_cv_lib_ext_lsasl = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSASL 1
_ACEOF

		case "$LDAP_LIBS" in
		    *-lsasl*)
			;;
		    *)
			LDAP_LIBS="-lsasl $LDAP_LIBS"
			;;
		esac


fi

  ########################################################
  # now see if we can find the ldap libs in standard paths
Comment 1 Gerald (Jerry) Carter (dead mail address) 2004-10-29 07:37:34 UTC
sasl libs may not be needed if you disabled them in the OpenLDAP 
client libs.