summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake16
1 files changed, 15 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 0a645e9..24e2a7a 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -26,6 +26,18 @@ if( WITH_GCC_VISIBILITY )
endif( WITH_GCC_VISIBILITY )
+##### get the system's default path for libraries
+
+tde_save_and_set( CMAKE_INSTALL_PREFIX "/usr" )
+include( GNUInstallDirs OPTIONAL )
+if( CMAKE_INSTALL_LIBDIR )
+ set( SYSTEM_LIBDIR "${CMAKE_INSTALL_LIBDIR}" )
+else( )
+ set( SYSTEM_LIBDIR "lib${LIB_SUFFIX}" )
+endif( )
+tde_restore( CMAKE_INSTALL_PREFIX )
+
+
##### check for ldap
find_library( HAVE_LIBLDAP ldap )
@@ -76,7 +88,9 @@ endif( )
find_path( HEIMDAL_LIBDIR
NAMES libhdb.so
- HINTS ${KRB5_LIBRARY_DIRS} ${KRB5_LIBDIR} /usr/lib
+ HINTS
+ ${KRB5_LIBRARY_DIRS} ${KRB5_LIBDIR}
+ /usr/${SYSTEM_LIBDIR} /usr/local/${SYSTEM_LIBDIR}
PATH_SUFFIXES "heimdal"
)
if( NOT "${HEIMDAL_LIBDIR}" STREQUAL "${KRB5_LIBDIR}" )