--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,38 +191,19 @@
 #
 # Find codec2
 #
-if(NOT USE_STATIC_CODEC2)
-    message(STATUS "Looking for codec2...")
-    # 'CONFIG' removed due to incompatibility with cmake version
-    # in Ubuntu 12.04 (Precise) -- Stuart Longland
-    find_package(codec2 QUIET)
-    if(codec2_FOUND)
-        get_target_property(CODEC2_LIBRARY codec2 LOCATION)
-        message(STATUS "  codec2 library: ${CODEC2_LIBRARY}")
-        message(STATUS "  codec2 headers: ${codec2_INCLUDE_DIRS}")
-    else()
-        # Try to find manually
-        find_path(CODEC2_INCLUDE_DIRS codec2.h
-                  PATH_SUFFIXES codec2)
-        find_library(CODEC2_LIBRARY NAMES codec2)
-        if(CODEC2_LIBRARY AND CODEC2_INCLUDE_DIRS)
-            message(STATUS "  codec2 library: ${CODEC2_LIBRARY}")
-            message(STATUS "  codec2 headers: ${CODEC2_INCLUDE_DIRS}")
-            list(APPEND FREEDV_LINK_LIBS ${CODEC2_LIBRARY})
-            include_directories(${CODEC2_INCLUDE_DIRS})
-        else()
-            message(FATAL_ERROR "codec2 library not found.
-Linux: 
-Codec2 may not be in your distribution so build yourself or use the cmake option to build statically into FreeDV.
-Windws:
-It's easiest to use the cmake option: USE_STATIC_CODEC2"
-        )
-        endif()
-    endif()
-else(NOT USE_STATIC_CODEC2)
-    message(STATUS "Will attempt static build of codec2.")
-    include(cmake/BuildCodec2.cmake)
-endif(NOT USE_STATIC_CODEC2)
+find_path(CODEC2_INCLUDE_DIRS codec2.h
+  HINTS Build/usr/include/
+  PATH_SUFFIXES codec2)
+find_library(CODEC2_LIBRARY NAMES codec2 libcodec2.a
+  HINTS Build/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/)
+if(CODEC2_LIBRARY AND CODEC2_INCLUDE_DIRS)
+  message(STATUS "  codec2 library: ${CODEC2_LIBRARY}")
+  message(STATUS "  codec2 headers: ${CODEC2_INCLUDE_DIRS}")
+  list(APPEND FREEDV_LINK_LIBS ${CODEC2_LIBRARY})
+  include_directories(${CODEC2_INCLUDE_DIRS})
+else()
+  message(FATAL_ERROR "codec2 library not found.")
+endif()
 
 #
 # Find or build portaudio Library
@@ -297,6 +278,31 @@
     include(cmake/BuildSamplerate.cmake)
 endif(NOT USE_STATIC_SAMPLERATE)
 
+#
+# Find sox library
+#
+if(NOT USE_STATIC_SOX)
+    message(STATUS "Looking for sox...")
+    find_library(LIBSOX_LIBRARY sox)
+    find_path(LIBSOX_INCLUDE_DIR NAMES sox/sox.h sox.h)
+    message(STATUS "  sox library: ${LIBSOX_LIBRARY}")
+    message(STATUS "  sox headers: ${LIBSOX_INCLUDE_DIR}")
+    if(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
+        list(APPEND FREEDV_LINK_LIBS ${LIBSOX_LIBRARY})
+        include_directories(${LIBSOX_INCLUDE_DIR})
+    else(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
+        message(FATAL_ERROR "sox library not found.
+On Linux systems try installing:
+    sox-devel (RPM based systems)
+    libsox-dev (DEB based systems)
+On Windows it's easiest to use the cmake option: USE_STATIC_SOX"
+        )
+    endif(LIBSOX_LIBRARY AND LIBSOX_INCLUDE_DIR)
+else(NOT USE_STATIC_SOX)
+    message(STATUS "Will attempt static build of sox.")
+    include(cmake/BuildSox.cmake)
+endif(NOT USE_STATIC_SOX)
+
 #    
 # sndfile Library
 #
