diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-20 18:47:46 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-20 19:06:12 +0200 |
commit | 6666bbf908b3f2a61a9ec1959e975de54dc23b0d (patch) | |
tree | d0d619da5220c9386c1c90284be18f4d840b0dbc /src | |
parent | 36792c7b489c984db95e2384660f1933c0498db0 (diff) | |
download | mad-6666bbf908b3f2a61a9ec1959e975de54dc23b0d.tar mad-6666bbf908b3f2a61a9ec1959e975de54dc23b0d.zip |
madc: Added support for BSD editline
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/madc.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 72ed248..b705a89 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,4 +25,4 @@ add_executable(mad mad.cpp) target_link_libraries(mad Daemon Common Net Core) add_executable(madc madc.cpp) -target_link_libraries(madc Client Common Net Core ${READLINE_LIBRARY}) +target_link_libraries(madc Client Common Net Core ${EDITLINE_LIBRARY}) diff --git a/src/madc.cpp b/src/madc.cpp index 0500c0f..c55fd3e 100644 --- a/src/madc.cpp +++ b/src/madc.cpp @@ -17,6 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" + #include "Core/ConfigManager.h" #include "Common/ClientConnection.h" @@ -31,8 +33,12 @@ #include <iostream> -#include <readline/readline.h> -#include <readline/history.h> +#ifdef EDITLINE_FOUND +# include <editline/readline.h> +#else +# include <readline/readline.h> +# include <readline/history.h> +#endif using namespace Mad; |