Index: CMakeLists.txt
--- CMakeLists.txt.orig	2011-02-25 18:26:22.000000000 +0100
+++ CMakeLists.txt	2011-02-27 11:24:12.000000000 +0100
@@ -51,83 +51,16 @@
 # Platform specific routines
 IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -DFREEBSD")
-	CONFIGURE_FILE(freebsd/rspamd.sh.in freebsd/rspamd.sh @ONLY)
-
-	IF(ENABLE_REDIRECTOR MATCHES "ON")
-		CONFIGURE_FILE(freebsd/redirector.sh.in freebsd/redirector.sh @ONLY)
-	ENDIF(ENABLE_REDIRECTOR MATCHES "ON")
-	IF(CMAKE_INSTALL_PREFIX)
-	    SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
-	ELSE(CMAKE_INSTALL_PREFIX)
-    	IF(NOT ETC_PREFIX)
-    		SET(ETC_PREFIX /usr/local/etc)
-    	ENDIF(NOT ETC_PREFIX)
-    	IF(NOT MAN_PREFIX)
-    		SET(MAN_PREFIX /usr/local/man)
-    	ENDIF(NOT MAN_PREFIX)
-    	IF(NOT PREFIX)
-    		SET(PREFIX /usr/local)
-    	ENDIF(NOT PREFIX)
-	ENDIF(CMAKE_INSTALL_PREFIX)
-    FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS   /lib
-                                               /opt/lib
-                                               /usr/lib
-                                               /usr/local/lib
-                 DOC "Path where the libintl library can be found")
-    LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY})
 	MESSAGE(STATUS "Configuring for FreeBSD")
- 
 ENDIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
 
 IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE -DDARWIN")
-    
-    IF(CMAKE_INSTALL_PREFIX)
-	    SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
-	ELSE(CMAKE_INSTALL_PREFIX)    	
-    	IF(NOT ETC_PREFIX)
-    		SET(ETC_PREFIX /usr/local/etc)
-    	ENDIF(NOT ETC_PREFIX)
-    	IF(NOT MAN_PREFIX)
-    		SET(MAN_PREFIX /usr/local/man)
-    	ENDIF(NOT MAN_PREFIX)
-    	IF(NOT PREFIX)
-    		SET(PREFIX /usr/local)
-    	ENDIF(NOT PREFIX)
-    ENDIF(CMAKE_INSTALL_PREFIX)
-
-    FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS   /lib
-                                               /opt/lib
-                                               /usr/lib
-                                               /usr/local/lib
-                 DOC "Path where the libintl library can be found")
-    LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIBRARY})
 	MESSAGE(STATUS "Configuring for Darwin")
-
 ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
 
 IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -DLINUX")
-	IF(CMAKE_INSTALL_PREFIX)
-	    SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
-	ELSE(CMAKE_INSTALL_PREFIX)    	
-    	IF(NOT ETC_PREFIX)
-    		SET(ETC_PREFIX /etc)
-    	ENDIF(NOT ETC_PREFIX)
-    	IF(NOT PREFIX)
-    		SET(PREFIX /usr)
-    	ENDIF(NOT PREFIX)
-    	IF(NOT MAN_PREFIX)
-    		SET(MAN_PREFIX /usr/share/man)
-    	ENDIF(NOT MAN_PREFIX)
-    ENDIF(CMAKE_INSTALL_PREFIX)    
-    
 	LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
 	LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
 	MESSAGE(STATUS "Configuring for Linux")
@@ -135,22 +68,6 @@
 
 IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -DSOLARIS")
-	IF(CMAKE_INSTALL_PREFIX)
-	    SET(ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(MAN_PREFIX "${CMAKE_INSTALL_PREFIX}/etc")
-	    SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
-	ELSE(CMAKE_INSTALL_PREFIX)    
-    	IF(NOT ETC_PREFIX)
-    		SET(ETC_PREFIX /etc)
-    	ENDIF(NOT ETC_PREFIX)
-    	IF(NOT PREFIX)
-    		SET(PREFIX /opt/rspamd)
-    	ENDIF(NOT PREFIX)
-    	IF(NOT MAN_PREFIX)
-    		SET(MAN_PREFIX /usr/share/man)
-    	ENDIF(NOT MAN_PREFIX)
-    ENDIF(CMAKE_INSTALL_PREFIX)
-    
 	LIST(APPEND CMAKE_REQUIRED_LIBRARIES rt)
 	LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl)
 	LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv)
@@ -204,7 +121,7 @@
 ELSE(ENABLE_STATIC MATCHES "ON")
 	pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.16 gmodule-2.0)
 ENDIF(ENABLE_STATIC MATCHES "ON")
-pkg_check_modules(GMIME2 gmime-2.0)
+pkg_check_modules(GMIME2 DUMMY)
 
 # Try to link with gmime24
 IF(NOT GMIME2_FOUND OR USE_GMIME24)
@@ -463,15 +380,6 @@
 
 SET(CMAKE_C_WARN_FLAGS "")
 
-IF(SUPPORT_W)
-	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W")
-ENDIF(SUPPORT_W)
-IF(SUPPORT_WALL)
-	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wall")
-ENDIF(SUPPORT_WALL)
-IF(SUPPORT_WPOINTER)
-	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wpointer-arith")
-ENDIF(SUPPORT_WPOINTER)
 IF(SUPPORT_WPARAM)
 	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-unused-parameter")
 ENDIF(SUPPORT_WPARAM)
@@ -481,18 +389,12 @@
 IF(SUPPORT_WSIGNCOMPARE)
 	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-sign-compare ")
 ENDIF(SUPPORT_WSIGNCOMPARE)
-IF(SUPPORT_WUNUSED_VAR)
-	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wunused-variable")
-ENDIF(SUPPORT_WUNUSED_VAR)
 IF(SUPPORT_WDECL)
 	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-declaration-after-statement")
 ENDIF(SUPPORT_WDECL)
 IF(SUPPORT_WPOINTER_SIGN)
 	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-pointer-sign")
 ENDIF(SUPPORT_WPOINTER_SIGN)
-IF(SUPPORT_PEDANTIC_FLAG)
-	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -pedantic")
-ENDIF(SUPPORT_PEDANTIC_FLAG)
 IF(SUPPORT_STD_FLAG)
 	SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -std=c99")
 ENDIF(SUPPORT_STD_FLAG)
