Server mode tests
[hiphop-php.git] / CMake / FindReadline.cmake
blob9fd06fcc8edd39101683ba822f1a4f27d9af24f5
1 # from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake
2 # http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS
3 # --> BSD licensed
5 # GNU Readline library finder
6 if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
7   set(READLINE_FOUND TRUE)
8 else(READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
9   FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h
10     /usr/include/readline
11   )
13 # 2008-04-22 The next clause used to read like this:
15 #  FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
16 #        FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses )
17 #        include(FindPackageHandleStandardArgs)
18 #        FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY )
20 # I was advised to modify it such that it will find an ncurses library if
21 # required, but not if one was explicitly given, that is, it allows the
22 # default to be overridden. PH
24   FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
25         include(FindPackageHandleStandardArgs)
26         FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY )
28   MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
29 endif(READLINE_INCLUDE_DIR AND READLINE_LIBRARY)