]> source.dussan.org Git - rspamd.git/commitdiff
Try to fix libutil...
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 May 2015 14:38:25 +0000 (15:38 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 May 2015 14:38:25 +0000 (15:38 +0100)
CMakeLists.txt

index 44e6ee154071d952539fa0dcd98681012a9e0ddb..0e2c98d9eccc46331eafe46d89215d20f5d1016e 100644 (file)
@@ -535,16 +535,20 @@ FIND_LIBRARY(LIBUTIL_LIBRARY NAMES util
                   PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS}
                  DOC "Path where the libutil library can be found")
 IF(LIBUTIL_LIBRARY)
-       FIND_FILE(HAVE_LIBUTIL_H 
+       FIND_FILE(_LIBUTIL_H 
                                HINTS "${RSPAMD_SEARCH_PATH}" 
                                NAMES libutil.h PATH ${RSPAMD_DEFAULT_INCLUDE_PATHS}
                                PATH_SUFFIXES include
                                DOC "Path to libutil header")
-       IF(HAVE_LIBUTIL_H)
+       IF(_LIBUTIL_H)
+               SET(HAVE_LIBUTIL_H 1)
+               INCLUDE_DIRECTORIES(${_LIBUTIL_H})
+               LIST(APPEND CMAKE_REQUIRED_INCLUDES ${_LIBUTIL_H})
+               SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} -L${LIBUTIL_LIBRARY};-lutil")
                LIST(APPEND RSPAMD_REQUIRED_LIBRARIES util)
                CHECK_FUNCTION_EXISTS(pidfile_open HAVE_PIDFILE)
                CHECK_FUNCTION_EXISTS(pidfile_fileno HAVE_PIDFILE_FILENO)
-       ENDIF(HAVE_LIBUTIL_H)
+       ENDIF(_LIBUTIL_H)
 ENDIF(LIBUTIL_LIBRARY)
 
 # Find libfetch (for FreeBSD)