source: trunk/FACT++/.macro_dir/ac_check_readline.m4@ 14284

Last change on this file since 14284 was 10210, checked in by tbretz, 14 years ago
New import
File size: 1.8 KB
Line 
1dnl Rewritten from scratch. --wojtekka
2dnl $Id: readline.m4 1323 2003-01-19 17:28:54Z wojtekka $
3
4AC_DEFUN([AC_CHECK_READLINE],[
5 AC_SUBST(READLINE_LIBS)
6 AC_SUBST(READLINE_INCLUDES)
7
8 AC_ARG_WITH(readline,
9 [[ --with-readline[=dir] Compile with readline/locate base dir]],
10 if test "x$withval" = "xno" ; then
11 without_readline=yes
12 elif test "x$withval" != "xyes" ; then
13 with_arg="$withval/include:-L$withval/lib $withval/include/readline:-L$withval/lib"
14 fi)
15
16 AC_MSG_CHECKING(for readline.h)
17
18 if test "x$without_readline" != "xyes"; then
19 for i in $with_arg \
20 /usr/include: \
21 /usr/local/include:-L/usr/local/lib \
22 /usr/freeware/include:-L/usr/freeware/lib32 \
23 /usr/pkg/include:-L/usr/pkg/lib \
24 /sw/include:-L/sw/lib \
25 /cw/include:-L/cw/lib \
26 /net/caladium/usr/people/piotr.nba/temp/pkg/include:-L/net/caladium/usr/people/piotr.nba/temp/pkg/lib \
27 /boot/home/config/include:-L/boot/home/config/lib; do
28
29 incl=`echo "$i" | sed 's/:.*//'`
30 lib=`echo "$i" | sed 's/.*://'`
31
32 if test -f $incl/readline/readline.h ; then
33 AC_MSG_RESULT($incl/readline/readline.h)
34 READLINE_LIBS="$lib -lreadline"
35 if test "$incl" != "/usr/include"; then
36 READLINE_INCLUDES="-I$incl/readline -I$incl"
37 else
38 READLINE_INCLUDES="-I$incl/readline"
39 fi
40 AC_DEFINE(HAVE_READLINE, 1, [define if You want readline])
41 have_readline=yes
42 break
43 elif test -f $incl/readline.h -a "x$incl" != "x/usr/include"; then
44 AC_MSG_RESULT($incl/readline.h)
45 READLINE_LIBS="$lib -lreadline"
46 READLINE_INCLUDES="-I$incl"
47 AC_DEFINE(HAVE_READLINE, 1, [define if You want readline])
48 have_readline=yes
49 break
50 fi
51 done
52 fi
53
54 if test "x$have_readline" != "xyes"; then
55 AC_MSG_RESULT(not found)
56 fi
57])
58
Note: See TracBrowser for help on using the repository browser.