FIND_PATH(LIBSAMPLERATE_INCLUDE_DIR samplerate.h)
FIND_LIBRARY(LIBSAMPLERATE_LIBRARIES NAMES samplerate)

IF(LIBSAMPLERATE_INCLUDE_DIR AND LIBSAMPLERATE_LIBRARIES)
	SET(LIBSAMPLERATE_FOUND TRUE)
ENDIF(LIBSAMPLERATE_INCLUDE_DIR AND LIBSAMPLERATE_LIBRARIES)

IF(LIBSAMPLERATE_FOUND)
	IF (NOT Libsamplerate_FIND_QUIETLY)
		MESSAGE(STATUS "Found libsamplerate includes:	${LIBSAMPLERATE_INCLUDE_DIR}/samplerate.h")
		MESSAGE(STATUS "Found libsamplerate library: ${LIBSAMPLERATE_LIBRARIES}")
	ENDIF (NOT Libsamplerate_FIND_QUIETLY)
ELSE(LIBSAMPLERATE_FOUND)
	IF (Libsamplerate_FIND_REQUIRED)
		MESSAGE(FATAL_ERROR "Could NOT find libsamplerate development files")
	ENDIF (Libsamplerate_FIND_REQUIRED)
ENDIF(LIBSAMPLERATE_FOUND)