CONFIGURE_FILE(freebsd/redirector.sh.in freebsd/redirector @ONLY)
ENDIF(ENABLE_REDIRECTOR MATCHES "ON")
MESSAGE(STATUS "Configuring for FreeBSD")
-
+ # Find util library
+
+ FIND_LIBRARY(LIBUTIL_LIBRARY NAMES util
+ HINTS "${RSPAMD_SEARCH_PATH}"
+ PATH_SUFFIXES lib64 lib
+ PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS}
+ DOC "Path where the libutil library can be found")
+ IF(LIBUTIL_LIBRARY)
+ 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(_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(_LIBUTIL_H)
+ ENDIF(LIBUTIL_LIBRARY)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
SET(WITH_GPERF_TOOLS 1)
ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
-# Find util library
-
-FIND_LIBRARY(LIBUTIL_LIBRARY NAMES util
- HINTS "${RSPAMD_SEARCH_PATH}"
- PATH_SUFFIXES lib64 lib
- PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS}
- DOC "Path where the libutil library can be found")
-IF(LIBUTIL_LIBRARY)
- 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(_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(_LIBUTIL_H)
-ENDIF(LIBUTIL_LIBRARY)
-
-# Find libfetch (for FreeBSD)
-
-IF(ENABLE_URL_INCLUDE MATCHES "ON")
- FIND_LIBRARY(LIBFETCH_LIBRARY HINTS "${RSPAMD_SEARCH_PATH}"
- NAMES fetch PATHS PATH_SUFFIXES lib64 lib
- PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS}
- DOC "Path where the libfetch library can be found")
- IF(LIBFETCH_LIBRARY)
- FIND_FILE(HAVE_FETCH_H HINTS "${RSPAMD_SEARCH_PATH}"
- NAMES fetch.h
- PATH_SUFFIXES include
- PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS}
- DOC "Path to libfetch header")
- ELSE(LIBFETCH_LIBRARY)
- # Try to find libcurl
- ProcessPackage(CURL libcurl)
- IF(NOT CURL_FOUND)
- MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration")
- ENDIF(NOT CURL_FOUND)
- ENDIF(LIBFETCH_LIBRARY)
-ENDIF(ENABLE_URL_INCLUDE MATCHES "ON")
-
# Static build
IF(ENABLE_STATIC MATCHES "ON")
INCLUDE_DIRECTORIES(compat)
ENDIF(NOT HAVE_COMPATIBLE_QUEUE_H)
+IF(ENABLE_URL_INCLUDE MATCHES "ON")
+ FIND_LIBRARY(LIBFETCH_LIBRARY HINTS "${RSPAMD_SEARCH_PATH}"
+ NAMES fetch PATHS PATH_SUFFIXES lib64 lib
+ PATHS ${RSPAMD_DEFAULT_LIBRARY_PATHS}
+ DOC "Path where the libfetch library can be found")
+ IF(LIBFETCH_LIBRARY)
+ FIND_FILE(HAVE_FETCH_H HINTS "${RSPAMD_SEARCH_PATH}"
+ NAMES fetch.h
+ PATH_SUFFIXES include
+ PATHS ${RSPAMD_DEFAULT_INCLUDE_PATHS}
+ DOC "Path to libfetch header")
+ ELSE(LIBFETCH_LIBRARY)
+ # Try to find libcurl
+ ProcessPackage(CURL libcurl)
+ IF(NOT CURL_FOUND)
+ MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration")
+ ENDIF(NOT CURL_FOUND)
+ ENDIF(LIBFETCH_LIBRARY)
+ENDIF(ENABLE_URL_INCLUDE MATCHES "ON")
+
IF(NOT DESTDIR)
SET(DESTDIR $ENV{DESTDIR})
ENDIF(NOT DESTDIR)