Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
4a3e43f2
Commit
4a3e43f2
authored
Jan 23, 2014
by
Guillaume BIENKOWSKI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use PKGCONFIG when possible for LDAP
parent
3944782c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
12 deletions
+33
-12
configure.ac
configure.ac
+30
-10
coreapi/Makefile.am
coreapi/Makefile.am
+3
-2
No files found.
configure.ac
View file @
4a3e43f2
...
...
@@ -177,19 +177,39 @@ AC_ARG_ENABLE(ldap,
)
if test "$enable_ldap" = "true"; then
AC_CHECK_LIB(sasl2, sasl_client_init , [foo=bar],
[AC_MSG_ERROR(You need SASL for LDAP support)]
PKG_CHECK_MODULES(LDAP, [openldap],[found_ldap=yes], [found_ldap=no])
if test "$found_ldap" = "no"; then
AC_CHECK_LIB(ldap,ldap_initialize, [LDAP_LIBS="-lldap -llber"],
[AC_MSG_ERROR([You need libldap for LDAP support])]
)
AC_CHECK_LIB(ldap,ldap_initialize, LDAP_LIBS="-lldap -llber -lsasl2",
[AC_MSG_ERROR(You need libldap for LDAP support)]
)
AC_CHECK_HEADERS(ldap.h)
AC_CHECK_HEADERS(sasl/sasl.h)
AC_CHECK_HEADERS(ldap.h, [foo=bar], [AC_MSG_ERROR( [ldap.h not found] ) ] )
found_ldap=yes
fi
PKG_CHECK_MODULES(SASL, [libsasl2],[found_sasl=yes],[found_sasl=no] )
if test "$found_sasl" = "no"; then
AC_CHECK_LIB(sasl2, sasl_client_init , [SASL_LIBS="-lsasl2"],
[AC_MSG_ERROR([You need SASL for LDAP support] ) ]
)
AC_CHECK_HEADERS(sasl/sasl.h,foo=bar, [AC_MSG_ERROR([sasl/sasl.h not found])])
found_sasl=yes
fi
AC_SUBST(LDAP_CFLAGS)
AC_SUBST(LDAP_LIBS)
AC_DEFINE(BUILD_LDAP,1,[Defined if LDAP build option enabled])
AC_SUBST(SASL_CFLAGS)
AC_SUBST(SASL_LIBS)
if test "$found_ldap$found_sasl" = "yesyes"; then
AC_DEFINE(BUILD_LDAP,1,[Defined if LDAP build option enabled])
else
AC_MSG_ERROR([Can't use LDAP due to previous errors])
fi
fi
AM_CONDITIONAL(BUILD_LDAP, test x$enable_ldap != xfalse)
dnl conditionnal build of console interface.
...
...
coreapi/Makefile.am
View file @
4a3e43f2
...
...
@@ -109,7 +109,7 @@ liblinphone_la_LIBADD= \
$(LIBSOUP_LIBS)
\
$(SQLITE3_LIBS)
\
$(LIBXML2_LIBS)
\
$(LDAP_LIBS)
$(LDAP_LIBS)
$(SASL_LIBS)
if
ENABLE_TESTS
...
...
@@ -144,7 +144,8 @@ AM_CFLAGS=\
$(VIDEO_CFLAGS)
\
$(TUNNEL_CFLAGS)
\
$(SQLITE3_CFLAGS)
\
$(LIBXML2_CFLAGS)
$(LIBXML2_CFLAGS)
\
$(LDAP_CFLAGS)
$(SASL_CFLAGS)
if
BUILD_WIZARD
AM_CFLAGS
+=
-DBUILD_WIZARD
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment