--- CMakeLists.txt.orig	2015-09-11 15:30:41 UTC
+++ CMakeLists.txt
@@ -16,7 +16,7 @@ else()
     set(USING_GCC "YES")
 endif()
 
-if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD" OR "${CMAKE_SYSTEM_NAME}" MATCHES "NetBSD")
+if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD" OR "${CMAKE_SYSTEM_NAME}" MATCHES "MidnightBSD")
     set(BSD "YES")
 endif()
 
@@ -72,6 +72,7 @@ if(WITH_JSON)
     endif()
 
     add_definitions("-DJSON")
+    string(REPLACE ";" " "  JSON_CFLAGS "${JSON_CFLAGS}")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}")
 endif()
 
@@ -126,20 +127,16 @@ add_subdirectory(src)
 if(RESPECT_INSTALL_PREFIX_CONFIG)
     set(CONFIG_DESTINATION "etc/zmap")
 else()
-    set(CONFIG_DESTINATION "/etc/zmap")
+    set(CONFIG_DESTINATION "/usr/local/etc/zmap")
 endif()
 
 FILE(GLOB CONF_FILES "${PROJECT_SOURCE_DIR}/conf/*")
 
-message(STATUS "Default ZMap configuration file location is /etc/zmap")
+message(STATUS "Default ZMap configuration file location is /usr/local/etc/zmap")
 foreach(EACH_CONF ${CONF_FILES})
     get_filename_component(CONF_BASENAME ${EACH_CONF} NAME)
     message(STATUS "Checking if ${CONF_BASENAME} exists there...")
-    if(NOT EXISTS "/etc/zmap/${CONF_BASENAME}")
-        install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION})
-    else()
-        message(WARNING "Existing configuration file detected at /etc/zmap/${CONF_BASENAME}, ${CONF_BASENAME} from sources will NOT be installed. Please check and install manually!")
-    endif()
+    install(FILES ${EACH_CONF} DESTINATION ${CONFIG_DESTINATION})
 endforeach()
 
 # Allow Debian Packaging
