diff --git a/vvp/config.h.in b/vvp/config.h.in index a9d5605f1..71691a402 100644 --- a/vvp/config.h.in +++ b/vvp/config.h.in @@ -44,6 +44,7 @@ # undef HAVE_MALLOC_H # undef HAVE_LIBREADLINE # undef HAVE_READLINE_READLINE_H +# undef HAVE_LIBHISTORY # undef HAVE_READLINE_HISTORY_H # undef HAVE_INTTYPES_H # undef HAVE_LROUND @@ -63,6 +64,14 @@ #endif #endif +/* Figure if I can use history. */ +#undef USE_HISTORY +#ifdef HAVE_LIBHISTORY +#ifdef HAVE_READLINE_HISTORY_H +# define USE_HISTORY +#endif +#endif + #ifndef MODULE_DIR # define MODULE_DIR "." #endif diff --git a/vvp/stop.cc b/vvp/stop.cc index 07b6e2af8..b20230fd8 100644 --- a/vvp/stop.cc +++ b/vvp/stop.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2007 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -30,10 +30,10 @@ # include "schedule.h" # include # include -#ifdef HAVE_READLINE_READLINE_H +#ifdef USE_READLINE # include #endif -#ifdef HAVE_READLINE_HISTORY_H +#ifdef USE_HISTORY # include #endif # include @@ -499,7 +499,7 @@ void stop_handler(int rc) first += 1; if (first[0] != 0) { -#ifdef HAVE_READLINE_HISTORY_H +#ifdef USE_HISTORY add_history(first); #endif invoke_command(first);