Fix krb5 library detection. This resolves FTBFS with heimdal-krb5.

Based on similar patch for libraries/libtdeldap from Slavek Banko.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 9 years ago
parent 3b5b7d6a6c
commit 7e28ca59bf

@ -1,10 +1,10 @@
INCLUDES= $(all_includes) $(KDE_INCLUDES)/tde INCLUDES= $(all_includes) $(KDE_INCLUDES)/tde $(KRB5_CFLAGS)
bin_PROGRAMS = tdeldapmanager bin_PROGRAMS = tdeldapmanager
tdeldapmanager_SOURCES = main.cpp tdeldapmanager_SOURCES = main.cpp
tdeldapmanager_METASOURCES = AUTO tdeldapmanager_METASOURCES = AUTO
tdeldapmanager_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdeldap tdeldapmanager_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdeldap $(KRB5_LIBS)
KDE_OPTIONS = nofinal KDE_OPTIONS = nofinal

@ -4,3 +4,40 @@ AM_INIT_AUTOMAKE(autostart, 0.1)
AC_C_BIGENDIAN AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN AC_CHECK_KDEMAXPATHLEN
PKG_CHECK_MODULES(KRB5, krb5, have_krb5=yes, have_krb5=no)
if test "x$have_krb5" = "xno"; then
# Try to find krb5 without pkg-config file
AC_MSG_CHECKING(krb5)
AC_FIND_FILE(krb5.h, [\
/usr/local/include/heimdal /usr/local/include \
/usr/include/heimdal /usr/include \
], krb5_includes)
if test "x$krb5_includes" != "xNO"; then
krb5_multiarch="`gcc -print-multiarch 2>/dev/null`"
AC_FIND_FILE(libkrb5.so, [\
/usr/local/lib/$krb5_multiarch/heimdal /usr/local/lib64/heimdal /usr/local/lib/heimdal \
/usr/local/lib/$krb5_multiarch /usr/local/lib64 /usr/local/lib \
/usr/lib/$krb5_multiarch/heimdal /usr/lib64/heimdal /usr/lib/heimdal \
/usr/lib/$krb5_multiarch /usr/lib64 /usr/lib \
], krb5_libs)
if test "x$krb5_libs" != "xNO"; then
AC_MSG_RESULT([libraries $krb5_libs, headers $krb5_includes])
CPPFLAGS="$CPPFLAGS -I$krb5_includes"
CFLAGS="$CFLAGS -I$krb5_includes"
LDFLAGS="$LDFLAGS -L$krb5_libs"
AC_CHECK_HEADER(krb5.h, have_krb5=yes)
fi
fi
if test "x$have_krb5" != "xno"; then
KRB5_CFLAGS="-I$krb5_includes"
KRB5_LIBS="-L$krb5_libs -lkrb5"
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LIBS)
else
AC_MSG_RESULT(no)
fi
fi
if test "x$have_krb5" = "xno"; then
AC_MSG_ERROR([krb5 library is needed but not found on our system])
fi

@ -1,4 +1,4 @@
INCLUDES = $(all_includes) $(KDE_INCLUDES)/tde INCLUDES = $(all_includes) $(KDE_INCLUDES)/tde $(KRB5_CFLAGS)
METASOURCES = AUTO METASOURCES = AUTO
# Install this plugin in the KDE modules directory # Install this plugin in the KDE modules directory
@ -7,7 +7,7 @@ kde_module_LTLIBRARIES = kcm_ldapmanager.la
kcm_ldapmanager_la_SOURCES = ldapmgr.cpp ldapconfigbase.ui userconfigbase.ui groupconfigbase.ui machineconfigbase.ui serviceconfigbase.ui userconfigdlg.cpp groupconfigdlg.cpp machineconfigdlg.cpp serviceconfigdlg.cpp kcm_ldapmanager_la_SOURCES = ldapmgr.cpp ldapconfigbase.ui userconfigbase.ui groupconfigbase.ui machineconfigbase.ui serviceconfigbase.ui userconfigdlg.cpp groupconfigdlg.cpp machineconfigdlg.cpp serviceconfigdlg.cpp
kcm_ldapmanager_la_LIBADD = -ltdeio $(LIB_TDEUI) -lldap -ltdeldap kcm_ldapmanager_la_LIBADD = -ltdeio $(LIB_TDEUI) -lldap -ltdeldap
kcm_ldapmanager_la_LDFLAGS = -avoid-version -module -no-undefined \ kcm_ldapmanager_la_LDFLAGS = -avoid-version -module -no-undefined \
$(all_libraries) $(all_libraries) $(KRB5_LIBS)
xdg_apps_DATA = ldapmanager.desktop xdg_apps_DATA = ldapmanager.desktop

Loading…
Cancel
Save