2 ===================================================================
3 RCS file: /sqlite/sqlite/configure.ac,v
4 retrieving revision 1.26
5 diff -u -p -r1.26 configure.ac
6 --- configure.ac 3 Jun 2006 18:02:18 -0000 1.26
7 +++ configure.ac 16 Feb 2007 23:31:32 -0000
8 @@ -592,16 +592,68 @@ AC_SUBST(HAVE_TCL)
9 # Figure out what C libraries are required to compile programs
10 # that use "readline()" library.
12 -if test "$config_TARGET_READLINE_LIBS" != ""; then
13 - TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
17 - AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap])
18 - AC_CHECK_LIB([readline], [readline])
19 - TARGET_READLINE_LIBS="$LIBS"
20 +TARGET_READLINE_LIBS=""
21 +TARGET_READLINE_INC=""
22 +TARGET_HAVE_READLINE=0
23 +AC_ARG_ENABLE([readline],
24 + [AC_HELP_STRING([--disable-readline],[disable readline support [default=detect]])],
25 + [with_readline=$enableval],
26 + [with_readline=auto])
28 +if test x"$with_readline" != xno; then
31 + AC_ARG_WITH([readline-lib],
32 + [AC_HELP_STRING([--with-readline-lib],[specify readline library])],
33 + [with_readline_lib=$withval],
34 + [with_readline_lib="auto"])
35 + if test "x$with_readline_lib" = xauto; then
38 + AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap], [term_LIBS="$LIBS"], [term_LIBS=""])
39 + AC_CHECK_LIB([readline], [readline], [TARGET_READLINE_LIBS="-lreadline"], [found="no"])
40 + TARGET_READLINE_LIBS="$TARGET_READLINE_LIBS $term_LIBS"
43 + TARGET_READLINE_LIBS="$with_readline_lib"
46 + AC_ARG_WITH([readline-inc],
47 + [AC_HELP_STRING([--with-readline-inc],[specify readline include paths])],
48 + [with_readline_inc=$withval],
49 + [with_readline_inc="auto"])
50 + if test "x$with_readline_inc" = xauto; then
51 + AC_CHECK_HEADER(readline.h, [found="yes"], [
53 + if test "$cross_compiling" != yes; then
54 + for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
55 + for subdir in include include/readline; do
56 + AC_CHECK_FILE($dir/$subdir/readline.h, found=yes)
57 + if test "$found" = "yes"; then
58 + TARGET_READLINE_INC="-I$dir/$subdir"
62 + test "$found" = "yes" && break
67 + TARGET_READLINE_INC="$with_readline_inc"
70 + if test x"$found" = xno; then
71 + TARGET_READLINE_LIBS=""
72 + TARGET_READLINE_INC=""
73 + TARGET_HAVE_READLINE=0
75 + TARGET_HAVE_READLINE=1
79 AC_SUBST(TARGET_READLINE_LIBS)
80 +AC_SUBST(TARGET_READLINE_INC)
81 +AC_SUBST(TARGET_HAVE_READLINE)
84 # Figure out what C libraries are required to compile programs
85 @@ -612,47 +664,6 @@ LIBS=$TARGET_LIBS
86 AC_SEARCH_LIBS(fdatasync, [rt])
90 -# Figure out where to get the READLINE header files.
92 -AC_MSG_CHECKING([readline header files])
94 -if test "$config_TARGET_READLINE_INC" != ""; then
95 - TARGET_READLINE_INC=$config_TARGET_READLINE_INC
98 -if test "$found" = "yes"; then
99 - AC_MSG_RESULT($TARGET_READLINE_INC)
101 - AC_MSG_RESULT(not specified: still searching...)
102 - AC_CHECK_HEADER(readline.h, [found=yes])
104 -if test "$found" = "no"; then
105 - for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
106 - AC_CHECK_FILE($dir/include/readline.h, found=yes)
107 - if test "$found" = "yes"; then
108 - TARGET_READLINE_INC="-I$dir/include"
111 - AC_CHECK_FILE($dir/include/readline/readline.h, found=yes)
112 - if test "$found" = "yes"; then
113 - TARGET_READLINE_INC="-I$dir/include/readline"
118 -if test "$found" = "yes"; then
119 - if test "$TARGET_READLINE_LIBS" = ""; then
120 - TARGET_HAVE_READLINE=0
122 - TARGET_HAVE_READLINE=1
125 - TARGET_HAVE_READLINE=0
127 -AC_SUBST(TARGET_READLINE_INC)
128 -AC_SUBST(TARGET_HAVE_READLINE)
131 # check for debug enabled
132 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]),