make the readline checks more flexible and handle cross-compiling logic (CVS 3646)
FossilOrigin-Name: 4626c84bae1a11d3cdad4901b19caf44406bd62a
This commit is contained in:
parent
920769d3a6
commit
4c10a8a006
111
configure.ac
111
configure.ac
@ -116,7 +116,7 @@ AC_INIT(src/sqlite.h.in)
|
||||
dnl Put the RCS revision string after AC_INIT so that it will also
|
||||
dnl show in in configure.
|
||||
# The following RCS revision string applies to configure.in
|
||||
# $Revision: 1.26 $
|
||||
# $Revision: 1.27 $
|
||||
|
||||
#########
|
||||
# Programs needed
|
||||
@ -592,16 +592,68 @@ AC_SUBST(HAVE_TCL)
|
||||
# Figure out what C libraries are required to compile programs
|
||||
# that use "readline()" library.
|
||||
#
|
||||
if test "$config_TARGET_READLINE_LIBS" != ""; then
|
||||
TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
|
||||
else
|
||||
CC=$TARGET_CC
|
||||
LIBS=""
|
||||
AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap])
|
||||
AC_CHECK_LIB([readline], [readline])
|
||||
TARGET_READLINE_LIBS="$LIBS"
|
||||
TARGET_READLINE_LIBS=""
|
||||
TARGET_READLINE_INC=""
|
||||
TARGET_HAVE_READLINE=0
|
||||
AC_ARG_ENABLE([readline],
|
||||
[AC_HELP_STRING([--disable-readline],[disable readline support [default=detect]])],
|
||||
[with_readline=$enableval],
|
||||
[with_readline=auto])
|
||||
|
||||
if test x"$with_readline" != xno; then
|
||||
found="yes"
|
||||
|
||||
AC_ARG_WITH([readline-lib],
|
||||
[AC_HELP_STRING([--with-readline-lib],[specify readline library])],
|
||||
[with_readline_lib=$withval],
|
||||
[with_readline_lib="auto"])
|
||||
if test "x$with_readline_lib" = xauto; then
|
||||
save_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap], [term_LIBS="$LIBS"], [term_LIBS=""])
|
||||
AC_CHECK_LIB([readline], [readline], [TARGET_READLINE_LIBS="-lreadline"], [found="no"])
|
||||
TARGET_READLINE_LIBS="$TARGET_READLINE_LIBS $term_LIBS"
|
||||
LIBS="$save_LIBS"
|
||||
else
|
||||
TARGET_READLINE_LIBS="$with_readline_lib"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([readline-inc],
|
||||
[AC_HELP_STRING([--with-readline-inc],[specify readline include paths])],
|
||||
[with_readline_inc=$withval],
|
||||
[with_readline_inc="auto"])
|
||||
if test "x$with_readline_inc" = xauto; then
|
||||
AC_CHECK_HEADER(readline.h, [found="yes"], [
|
||||
found="no"
|
||||
if test "$cross_compiling" != yes; then
|
||||
for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
|
||||
for subdir in include include/readline; do
|
||||
AC_CHECK_FILE($dir/$subdir/readline.h, found=yes)
|
||||
if test "$found" = "yes"; then
|
||||
TARGET_READLINE_INC="-I$dir/$subdir"
|
||||
break
|
||||
fi
|
||||
done
|
||||
test "$found" = "yes" && break
|
||||
done
|
||||
fi
|
||||
])
|
||||
else
|
||||
TARGET_READLINE_INC="$with_readline_inc"
|
||||
fi
|
||||
|
||||
if test x"$found" = xno; then
|
||||
TARGET_READLINE_LIBS=""
|
||||
TARGET_READLINE_INC=""
|
||||
TARGET_HAVE_READLINE=0
|
||||
else
|
||||
TARGET_HAVE_READLINE=1
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(TARGET_READLINE_LIBS)
|
||||
AC_SUBST(TARGET_READLINE_INC)
|
||||
AC_SUBST(TARGET_HAVE_READLINE)
|
||||
|
||||
##########
|
||||
# Figure out what C libraries are required to compile programs
|
||||
@ -612,47 +664,6 @@ LIBS=$TARGET_LIBS
|
||||
AC_SEARCH_LIBS(fdatasync, [rt])
|
||||
TARGET_LIBS="$LIBS"
|
||||
|
||||
##########
|
||||
# Figure out where to get the READLINE header files.
|
||||
#
|
||||
AC_MSG_CHECKING([readline header files])
|
||||
found=no
|
||||
if test "$config_TARGET_READLINE_INC" != ""; then
|
||||
TARGET_READLINE_INC=$config_TARGET_READLINE_INC
|
||||
found=yes
|
||||
fi
|
||||
if test "$found" = "yes"; then
|
||||
AC_MSG_RESULT($TARGET_READLINE_INC)
|
||||
else
|
||||
AC_MSG_RESULT(not specified: still searching...)
|
||||
AC_CHECK_HEADER(readline.h, [found=yes])
|
||||
fi
|
||||
if test "$found" = "no"; then
|
||||
for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
|
||||
AC_CHECK_FILE($dir/include/readline.h, found=yes)
|
||||
if test "$found" = "yes"; then
|
||||
TARGET_READLINE_INC="-I$dir/include"
|
||||
break
|
||||
fi
|
||||
AC_CHECK_FILE($dir/include/readline/readline.h, found=yes)
|
||||
if test "$found" = "yes"; then
|
||||
TARGET_READLINE_INC="-I$dir/include/readline"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "$found" = "yes"; then
|
||||
if test "$TARGET_READLINE_LIBS" = ""; then
|
||||
TARGET_HAVE_READLINE=0
|
||||
else
|
||||
TARGET_HAVE_READLINE=1
|
||||
fi
|
||||
else
|
||||
TARGET_HAVE_READLINE=0
|
||||
fi
|
||||
AC_SUBST(TARGET_READLINE_INC)
|
||||
AC_SUBST(TARGET_HAVE_READLINE)
|
||||
|
||||
#########
|
||||
# check for debug enabled
|
||||
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]),
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C In\sthe\scorrupt2.test\sscript,\nchange\suses\sof\s(open\s...\sa)\sto\s(open\s...\sRDWR)\sto\swork\saround\ninconsistencies\sin\sbehavior\sacross\svarious\splatforms.\s(CVS\s3645)
|
||||
D 2007-02-14T12:32:13
|
||||
C make\sthe\sreadline\schecks\smore\sflexible\sand\shandle\scross-compiling\slogic\s(CVS\s3646)
|
||||
D 2007-02-17T14:28:26
|
||||
F Makefile.in 7fa74bf4359aa899da5586e394d17735f221315f
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -13,7 +13,7 @@ F art/SQLiteLogo3.tiff b9e6bf022ae939bc986cddb8ab99583ca1b02cb3
|
||||
F config.guess 2103e94b15dc57112d7b9ee152c6fac5288895b4
|
||||
F config.sub 9bf686ec001ae7bc53f5b3563c90c62d4c6d48be
|
||||
F configure 6be7b37dd811c43f59c119aa5a713f688a2184c4 x
|
||||
F configure.ac 83eaf11869cd893db6126c0ce77381a9cd264bad
|
||||
F configure.ac cd93d44498e1a81fdd4392a2ef6e8ffcf5f97497
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
|
||||
F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
|
||||
@ -432,7 +432,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P cb78f7cb0f0bf0c799a929fd6ea30f25e2a7b5d0
|
||||
R 0484330afad208636dcf973b7b15d967
|
||||
U drh
|
||||
Z b7d746395662a0a377c1023b5244d08a
|
||||
P 50e86b0368ae0268e7f07e44a746e13ad86a3b8b
|
||||
R 71daed3249be50835edd41036f362c90
|
||||
U vapier
|
||||
Z 1245fecfea91b4e94d0050f9d1849947
|
||||
|
@ -1 +1 @@
|
||||
50e86b0368ae0268e7f07e44a746e13ad86a3b8b
|
||||
4626c84bae1a11d3cdad4901b19caf44406bd62a
|
Loading…
x
Reference in New Issue
Block a user