@@ -1,14 +1,14 @@ dnl -*- autoconf -*- dnl FILE: "/home/joze/src/tclreadline/configure.in" -dnl LAST MODIFICATION: "Fre, 08 Dez 2000 01:36:25 +0100 (joze)" -dnl (C) 1998 - 2000 by Johannes Zellner, +dnl LAST MODIFICATION: "Mit, 10 Jan 2001 06:26:43 +0100 (joze)" +dnl (C) 1998 - 2001 by Johannes Zellner, dnl $Id$ dnl --- dnl tclreadline -- gnu readline for tcl dnl http://www.zellner.org/tclreadline/ -dnl Copyright (c) 1998 - 2000, Johannes Zellner +dnl Copyright (c) 1998 - 2001, Johannes Zellner dnl This software is copyright under the BSD license. AC_INIT(tclreadline.c) AM_CONFIG_HEADER(config.h) AC_PREREQ(2.13) @@ -15,11 +15,11 @@ AC_REVISION($Revision$) AC_CONFIG_AUX_DIR(./aux) MAJOR=2 MINOR=1 -PATCHLEVEL=0 +PATCHLEVEL=1 VERSION=$MAJOR.$MINOR PATCHLEVEL_STR=$VERSION.$PATCHLEVEL AC_SUBST(MAJOR) AC_SUBST(MINOR) @@ -154,30 +154,37 @@ AC_ARG_WITH(readline-includes, [ --with-readline-includes=DIR readline include files in DIR], rl_includes=$withval, rl_includes="") +dnl look for readline/readline.h +dnl ^^^^^^^^ AC_MSG_CHECKING([where to look for readline.h]) READLINE_INCLUDE_DIR="" -for dir in $rl_includes /usr/local/include/readline /usr/local/include /usr/include/readline /usr/include ; do - if test -r $dir/readline.h; then +for dir in $rl_includes /usr/local/include /usr/include ; do + if test -r $dir/readline/readline.h; then READLINE_INCLUDE_DIR=$dir break fi done + +dnl look directly in the include dirs for readline.h +if test -z "$READLINE_INCLUDE_DIR"; then + for dir in $rl_includes /usr/local/include /usr/include ; do + if test -r $dir/readline.h; then + READLINE_INCLUDE_DIR=$dir + AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1, [ Define if we have libreadline. ]) + break + fi + done +fi if test -z "$READLINE_INCLUDE_DIR"; then AC_MSG_ERROR([ Can't find readline.h. Use --with-readline-includes to specify the directory containing readline.h on your system.]) -else - AC_MSG_RESULT($READLINE_INCLUDE_DIR/readline.h) - base="`(basename ${READLINE_INCLUDE_DIR}) 2>/dev/null`" - if test "x${base}" != "xreadline"; then - AC_DEFINE_UNQUOTED(READLINE_LIBRARY, 1, [ Define if we have libreadline. ]) - fi fi AC_ARG_WITH(readline-library, [ --with-readline-library=DIR lib spec to readline (e.g. '-L/usr/local/lib -lreadline')],