File: readline.m4

package info (click to toggle)
nmh 1.6-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,204 kB
  • ctags: 3,851
  • sloc: ansic: 48,922; sh: 16,422; makefile: 559; perl: 509; lex: 402; awk: 74
file content (26 lines) | stat: -rw-r--r-- 880 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
dnl
dnl Our readline heuristic.  If we haven't been asked about readline, then
dnl try to compile with it.  If we've been asked for it, then we fail
dnl if we cannot use it.  If we were explicitly NOT asked for it, then
dnl don't even try to use it.
dnl

AC_DEFUN([NMH_READLINE],
[AC_ARG_WITH([readline],
	AS_HELP_STRING([--with-readline],
		       [enable readline editing for whatnow (default=maybe)]),
	[], [with_readline=maybe])
AS_IF([test x"$with_readline" = xyes -o x"$with_readline" = xmaybe],
    [save_LIBS="$LIBS"
    LIBS=
    AC_SEARCH_LIBS([readline], [readline editline],
		   [READLINELIB="$LIBS"
		   AC_DEFINE([READLINE_SUPPORT], [1],
			     [Support for using readline() in whatnow])],
		   [AS_IF([test x"$with_readline" = xyes],
			  [AC_MSG_ERROR([Unable to find a readline library])])],
		   [$TERMLIB])
    LIBS="$save_LIBS"])
])

AC_SUBST([READLINELIB])