|
|
@ -49,22 +49,43 @@ if( NOT KRB5_FOUND)
|
|
|
|
COMMAND ${KRB5_CONFIG_EXECUTABLE} --libs
|
|
|
|
COMMAND ${KRB5_CONFIG_EXECUTABLE} --libs
|
|
|
|
OUTPUT_VARIABLE KRB5_LIBRARIES
|
|
|
|
OUTPUT_VARIABLE KRB5_LIBRARIES
|
|
|
|
ERROR_VARIABLE KRB5_LIBRARIES
|
|
|
|
ERROR_VARIABLE KRB5_LIBRARIES
|
|
|
|
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
|
|
|
|
ERROR_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
)
|
|
|
|
execute_process(
|
|
|
|
execute_process(
|
|
|
|
COMMAND ${KRB5_CONFIG_EXECUTABLE} --cflags
|
|
|
|
COMMAND ${KRB5_CONFIG_EXECUTABLE} --cflags
|
|
|
|
OUTPUT_VARIABLE KRB5_INCLUDE_DIRS
|
|
|
|
OUTPUT_VARIABLE KRB5_INCLUDE_DIRS
|
|
|
|
ERROR_VARIABLE KRB5_INCLUDE_DIRS
|
|
|
|
ERROR_VARIABLE KRB5_INCLUDE_DIRS
|
|
|
|
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
|
|
|
|
ERROR_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if( NOT "${KRB5_LIBRARIES}" STREQUAL "" )
|
|
|
|
if( NOT "${KRB5_LIBRARIES}" STREQUAL "" )
|
|
|
|
set( KRB5_FOUND 1 )
|
|
|
|
set( KRB5_FOUND 1 )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
find_file( KRB5_ASN1_H
|
|
|
|
find_path( HEIMDAL_INCLUDEDIR
|
|
|
|
NAMES krb5_asn1.h
|
|
|
|
NAMES krb5_asn1.h
|
|
|
|
HINTS ${KRB5_INCLUDE_DIRS}
|
|
|
|
HINTS ${KRB5_INCLUDE_DIRS} ${KRB5_INCLUDEDIR} /usr/include
|
|
|
|
|
|
|
|
PATH_SUFFIXES "heimdal"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if( "${KRB5_ASN1_H}" STREQUAL "KRB5_ASN1_H-NOTFOUND" )
|
|
|
|
if( NOT "${HEIMDAL_INCLUDEDIR}" STREQUAL "${KRB5_INCLUDEDIR}" )
|
|
|
|
|
|
|
|
# fix Heimdal include dirs
|
|
|
|
|
|
|
|
set( KRB5_INCLUDE_DIRS "${HEIMDAL_INCLUDEDIR}" )
|
|
|
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
find_path( HEIMDAL_LIBDIR
|
|
|
|
|
|
|
|
NAMES libhdb.so
|
|
|
|
|
|
|
|
HINTS ${KRB5_LIBRARY_DIRS} ${KRB5_LIBDIR} /usr/lib
|
|
|
|
|
|
|
|
PATH_SUFFIXES "heimdal"
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
if( NOT "${HEIMDAL_LIBDIR}" STREQUAL "${KRB5_LIBDIR}" )
|
|
|
|
|
|
|
|
# fix Heimdal library dirs
|
|
|
|
|
|
|
|
set( KRB5_LIBRARY_DIRS "${HEIMDAL_LIBDIR}" )
|
|
|
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( "${HEIMDAL_INCLUDEDIR}" STREQUAL "HEIMDAL_INCLUDEDIR-NOTFOUND" OR
|
|
|
|
|
|
|
|
"${HEIMDAL_LIBDIR}" STREQUAL "HEIMDAL_LIBDIR-NOTFOUND" )
|
|
|
|
tde_message_fatal( "Heimdal Kerberos is required, but was not found on our system" )
|
|
|
|
tde_message_fatal( "Heimdal Kerberos is required, but was not found on our system" )
|
|
|
|
endif( )
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
|
|