diff --git a/CMakeLists.txt b/CMakeLists.txt index d4956b19..3747faa1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -629,12 +629,15 @@ endif ( enable-oboe ) unset ( WITH_READLINE CACHE ) unset ( READLINE_LIBS CACHE ) if ( enable-readline ) - find_package ( Readline ) - set ( FOUND_READLINE ${HAVE_READLINE} ) - if ( HAVE_READLINE ) + pkg_check_modules ( READLINE readline ) + if ( NOT READLINE_FOUND ) + find_package ( Readline ) + set ( READLINE_FOUND ${HAVE_READLINE} ) + endif ( NOT READLINE_FOUND ) + if ( READLINE_FOUND ) set ( WITH_READLINE 1 ) set ( READLINE_LIBS ${READLINE_LIBRARIES} ) - endif ( HAVE_READLINE ) + endif ( READLINE_FOUND ) endif ( enable-readline ) unset ( ENABLE_MIXER_THREADS CACHE )