"Fossies" - the Fresh Open Source Software Archive

Member "wcalc-2.5/config/readline.m4" (19 Dec 2013, 1671 Bytes) of package /linux/privat/wcalc-2.5.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "readline.m4": 2.4.1_vs_2.5.

    1 dnl Available from the GNU Autoconf Macro Archive at:
    2 dnl http://autoconf-archive.cryp.to/vl_lib_readline.html
    3 dnl last modified 2002-04-04
    4 dnl
    5 AC_DEFUN([VL_LIB_READLINE], [
    6   AC_CACHE_CHECK([for a readline compatible library],
    7                  vl_cv_lib_readline, [
    8     ORIG_LIBS="$LIBS"
    9     for readline_lib in readline edit editline; do
   10       for termcap_lib in "" termcap curses ncurses; do
   11         if test -z "$termcap_lib"; then
   12           TRY_LIB="-l$readline_lib"
   13         else
   14           TRY_LIB="-l$readline_lib -l$termcap_lib"
   15         fi
   16         LIBS="$ORIG_LIBS $TRY_LIB"
   17         dnl AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB")
   18         AC_TRY_LINK_FUNC(rl_filename_completion_function, vl_cv_lib_readline="$TRY_LIB")
   19         if test -n "$vl_cv_lib_readline"; then
   20           break
   21         fi
   22       done
   23       if test -n "$vl_cv_lib_readline"; then
   24         break
   25       fi
   26     done
   27     if test -z "$vl_cv_lib_readline"; then
   28       vl_cv_lib_readline="no"
   29       LIBS="$ORIG_LIBS"
   30     fi
   31   ])
   32 
   33   if test "$vl_cv_lib_readline" != "no"; then
   34     AC_DEFINE(HAVE_LIBREADLINE, 1,
   35               [Define if you have a readline compatible library])
   36     AC_CHECK_HEADERS(readline.h readline/readline.h)
   37     AC_CACHE_CHECK([whether readline supports history],
   38                    vl_cv_lib_readline_history, [
   39       vl_cv_lib_readline_history="no"
   40       AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes")
   41     ])
   42     if test "$vl_cv_lib_readline_history" = "yes"; then
   43       AC_DEFINE(HAVE_READLINE_HISTORY, 1,
   44                 [Define if your readline library has \`add_history'])
   45       AC_CHECK_HEADERS(history.h readline/history.h)
   46     fi
   47   fi
   48 ])dnl