[bugfix] could not explicitly disable readline on some environment where libreadline

is installed
This commit is contained in:
Yuichi Nishiwaki 2014-03-15 21:22:53 +09:00
parent 0e1b6d93b4
commit 495be09d8a
2 changed files with 6 additions and 2 deletions

View File

@ -55,7 +55,11 @@
#endif #endif
#ifndef PIC_ENABLE_READLINE #ifndef PIC_ENABLE_READLINE
# define PIC_ENABLE_READLINE 0 # if PIC_READLINE_FOUND
# define PIC_ENABLE_READLINE 1
# else
# define PIC_ENABLE_READLINE 0
# endif
#endif #endif
#ifndef PIC_NONE_IS_FALSE #ifndef PIC_NONE_IS_FALSE

View File

@ -1,7 +1,7 @@
find_package(READLINE) find_package(READLINE)
if (READLINE_FOUND) if (READLINE_FOUND)
include_directories(${READLINE_INCLUDE_DIRS}) include_directories(${READLINE_INCLUDE_DIRS})
add_definitions(${READLINE_DEFINITIONS} -DPIC_ENABLE_READLINE=1) add_definitions(${READLINE_DEFINITIONS} -DPIC_READLINE_FOUND=1)
endif() endif()
add_executable(repl tools/main.c) add_executable(repl tools/main.c)