summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-11-03 03:17:51 +0000
committersabetts <sabetts>2003-11-03 03:17:51 +0000
commitc1c11da66b23e72c0820be0eb47fdd864eea8f53 (patch)
treec8b2f1cf0407e53174a9c81364ec376cb4956afc /configure.in
parentcafd2e3f092ee5d694520c31cfbd33abcf1af843 (diff)
downloadratpoison-c1c11da66b23e72c0820be0eb47fdd864eea8f53.zip
* configure.in: Add "--disable-history" handling.
Conditionalize libhistory checks accordingly. * README: Mention "--disable history". * src/history.c: Surround most of the code with "#ifdef HAVE_READLINE_HISTORY_H". * src/ratpoison.h: Only #include history.h when "#ifdef HAVE_READLINE_HISTORY_H". * src/main.c (main, clean_up): Only load and save history, respectively, when "#ifdef HAVE_READLINE_HISTORY_H". * src/editor.c (editor_history_previous, editor_history_next): Return EDIT_NO_OP when not "#ifdef HAVE_READLINE_HISTORY_H". (editor_enter): Do not do line expansion or history add when not "#ifdef HAVE_READLINE_HISTORY_H". * doc/ratpoison.texi: Mention that history cycling and processing is not available when ratpoison is configured with the "--disable-history" option.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in25
1 files changed, 16 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 961523c..6d58f3a 100644
--- a/configure.in
+++ b/configure.in
@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
-dnl $Id: configure.in,v 1.38 2003/05/31 09:14:27 sabetts Exp $
+dnl $Id: configure.in,v 1.39 2003/11/03 03:17:59 sabetts Exp $
AC_INIT(src/main.c)
AM_INIT_AUTOMAKE(ratpoison, 1.3.0-cvs)
@@ -63,17 +63,24 @@ if test "x$no_x" = "xyes"; then
AC_MSG_ERROR([*** Can't find X11 headers and libs])
fi
-dnl Just a hack ....
-AC_CHECK_LIB(history, add_history, [ AC_CHECK_HEADER(readline/history.h, HISTORY="yes")])
-
-if test "x$HISTORY" = "xyes"; then
- LIBS="$LIBS -lhistory"
-else
- AC_MSG_ERROR([*** Can't find History headers and libs])
+dnl Those who do not learn the lessons of history
+dnl are doomed to delete it... yuk yuk. --ttn
+AC_ARG_ENABLE(history,
+ [ --disable-history ignore libhistory (default: use it)],
+ [ if test x${enableval} = xyes ; then
+ check_for_libhistory=yes
+ else
+ check_for_libhistory=no
+ fi],[check_for_libhistory=yes])
+
+if test x$check_for_libhistory = xyes ; then
+ AC_CHECK_HEADERS([readline/history.h])
+ AC_CHECK_LIB(history, add_history,
+ LIBS="$LIBS -lhistory",
+ AC_MSG_ERROR([*** Can't find History headers and libs]))
fi
-
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"