[uim-commit] r1092 - branches/r5rs

omote at freedesktop.org omote at freedesktop.org
Mon Aug 1 22:49:40 EST 2005


Author: omote
Date: 2005-08-01 05:49:10 -0700 (Mon, 01 Aug 2005)
New Revision: 1092

Modified:
   branches/r5rs/configure.ac
Log:
* This commit removes libreadline support. Because license of GNU readline
  is GPL, uim has possiblity of polluted by GNU readline. libedit is
  alternative implementation for line editing distributed under BSDL. We have
  to use libedit if we want to use the functionalities of history, line
  editing, and so on.
* configure.ac: Remove GNU readline support. Only libedit is supported. This
  code based on openssh-4.1p1.



Modified: branches/r5rs/configure.ac
===================================================================
--- branches/r5rs/configure.ac	2005-08-01 05:03:47 UTC (rev 1091)
+++ branches/r5rs/configure.ac	2005-08-01 12:49:10 UTC (rev 1092)
@@ -482,65 +482,24 @@
 ])
 
 AC_SUBST(EBLIB_LIBS)
-dnl This code was taken from librep-0.17
 
-dnl Save in case test with directory specified fails
-_cppflags=${CPPFLAGS}
-_ldflags=${LDFLAGS}
+dnl Check whether user wants libedit support
+dnl This code was based on openssh-4.1p1
+AC_ARG_WITH(libedit,
+        [  --with-libedit[[=DIR]] Enable libedit support],
+        [ if test "x$withval" != "xno" -a "x$withval" != "xyes"; then
+		CPPFLAGS="${CPPFLAGS} -I$withval/include"
+		LDFLAGS="${LDFLAGS} -L$withval/lib"
+	  fi ])
 
-AC_ARG_WITH(readline-prefix,
-        [  --with-readline-prefix=DIR path to readline compatible library],
-        [ if test "$withval" != "no" -a "$withval" != "yes"; then
+AC_CHECK_LIB(edit, el_init,
+		[
+		    LIBEDIT_LIBS="-ledit -lcurses"
+		    AC_SUBST(LIBEDIT_LIBS)
+		], [ AC_MSG_ERROR(libedit not found) ],
+		[ -lcurses ]
+)
 
-          CPPFLAGS="${CPPFLAGS} -I$withval/include"
-          LDFLAGS="${LDFLAGS} -L$withval/lib"
-        fi ])
-
-ORIG_LIBS="$LIBS"
-unset ac_lib_readline
-AC_CACHE_CHECK([for a readline compatible library], ac_lib_readline, [
-   for readline_lib in readline edit editline; do
-      for termcap_lib in "" termcap terminfo termlib curses ncurses; do
-         if test -z "$termcap_lib"; then
-            TRY_LIB="-l$readline_lib"
-         else
-            TRY_LIB="-l$readline_lib -l$termcap_lib"
-         fi
-         LIBS="$TRY_LIB"
-         AC_TRY_LINK_FUNC(readline, ac_lib_readline="$readline_lib $tcap")
-         if test -n "$ac_lib_readline"; then
-            break
-         fi
-      done
-      if test -n "$ac_lib_readline"; then
-         break
-      fi
-   done
-   if test -z "$ac_lib_readline"; then
-      ac_lib_readline="no"
-   fi
-])
-
-if test -n "$ac_lib_readline"; then
-   READLINE_LIBS="$LIBS"
-else
-   READLINE_LIBS=""
-fi
-LIBS="$ORIG_LIBS"
-
-if test -z "$READLINE_LIBS"; then
-   if test "$with_readline_prefix" = "yes"; then
-      AC_MSG_ERROR([Can't find readline libraries])
-   else
-        CPPFLAGS=${_cppflags}
-        LDFLAGS=${_ldflags}
-   fi
-fi
-
-AC_SUBST(READLINE_LIBS)
-
-
-
 AM_CONDITIONAL(M17NLIB, test x$use_m17nlib = xyes)
 AM_CONDITIONAL(SCIM, test x$use_scim = xyes)
 AM_CONDITIONAL(ANTHY, test x$use_anthy = xyes)



More information about the uim-commit mailing list