]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Check for readline libs now adds appropriate curses or termcap lib when needed (CVS...
authorpaul <paul@noemail.net>
Tue, 22 Apr 2003 08:04:49 +0000 (08:04 +0000)
committerpaul <paul@noemail.net>
Tue, 22 Apr 2003 08:04:49 +0000 (08:04 +0000)
FossilOrigin-Name: 393dd91c252531bb5abfe424b86a5f7eb20edcfc

configure
configure.ac
manifest
manifest.uuid

index cb70e94d5eceb195005418e3fcf6cc80e7abdf92..1180ae674900fb077e2bf0541e5f1a69263e7642 100755 (executable)
--- a/configure
+++ b/configure
@@ -1434,7 +1434,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 # The following RCS revision string applies to configure.in
-# $Revision: 1.15 $
+# $Revision: 1.16 $
 
 #########
 # Programs needed
@@ -8838,13 +8838,13 @@ if test "$config_TARGET_READLINE_LIBS" != ""; then
 else
   CC=$TARGET_CC
   LIBS=""
-  echo "$as_me:$LINENO: checking for library containing readline" >&5
-echo $ECHO_N "checking for library containing readline... $ECHO_C" >&6
-if test "${ac_cv_search_readline+set}" = set; then
+  echo "$as_me:$LINENO: checking for library containing tgetent" >&5
+echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6
+if test "${ac_cv_search_tgetent+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
-ac_cv_search_readline=no
+ac_cv_search_tgetent=no
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -8859,11 +8859,11 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char readline ();
+char tgetent ();
 int
 main ()
 {
-readline ();
+tgetent ();
   ;
   return 0;
 }
@@ -8880,15 +8880,15 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_readline="none required"
+  ac_cv_search_tgetent="none required"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_readline" = no; then
-  for ac_lib in readline; do
+if test "$ac_cv_search_tgetent" = no; then
+  for ac_lib in readline ncurses curses termcap; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
@@ -8904,11 +8904,11 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char readline ();
+char tgetent ();
 int
 main ()
 {
-readline ();
+tgetent ();
   ;
   return 0;
 }
@@ -8925,7 +8925,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_readline="-l$ac_lib"
+  ac_cv_search_tgetent="-l$ac_lib"
 break
 else
   echo "$as_me: failed program was:" >&5
@@ -8937,10 +8937,74 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 LIBS=$ac_func_search_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_readline" >&5
-echo "${ECHO_T}$ac_cv_search_readline" >&6
-if test "$ac_cv_search_readline" != no; then
-  test "$ac_cv_search_readline" = "none required" || LIBS="$ac_cv_search_readline $LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5
+echo "${ECHO_T}$ac_cv_search_tgetent" >&6
+if test "$ac_cv_search_tgetent" != no; then
+  test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
+echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
+if test "${ac_cv_lib_readline_readline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char readline ();
+int
+main ()
+{
+readline ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_readline_readline=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_readline_readline=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
+if test $ac_cv_lib_readline_readline = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBREADLINE 1
+_ACEOF
+
+  LIBS="-lreadline $LIBS"
 
 fi
 
index cb6476c48543b8adaa377167869059746ad428b4..1ba578f6bfdf3e929df84c624cb70fac4b989d1f 100644 (file)
@@ -138,7 +138,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.4 $
+# $Revision: 1.5 $
 
 #########
 # Programs needed
@@ -472,7 +472,8 @@ if test "$config_TARGET_READLINE_LIBS" != ""; then
 else
   CC=$TARGET_CC
   LIBS=""
-  AC_SEARCH_LIBS(readline, readline,,,)
+  AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap])
+  AC_CHECK_LIB([readline], [readline])
   TARGET_READLINE_LIBS="$LIBS"
 fi
 AC_SUBST(TARGET_READLINE_LIBS)
index c23914e7962e81f0cee5892c6c5ca8ede3cc5949..47faae40d125b3c22c5e4ceb7ce3b3078b8d7886 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\ssupport\sfor\sTEMPORARY\striggers.\s\sSuch\striggers\scan\swrite\stemporary\sor\npermanent\stables.\s(CVS\s926)
-D 2003-04-21T18:48:46
+C Check\sfor\sreadline\slibs\snow\sadds\sappropriate\scurses\sor\stermcap\slib\swhen\sneeded\s(CVS\s927)
+D 2003-04-22T08:04:49
 F Makefile.in 004acec253ecdde985c8ecd5b7c9accdb210378f
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -7,8 +7,8 @@ F VERSION e5b03976c56deafa24511d6ef17d64a28679e9bd
 F aclocal.m4 ff32919e75f42b2d4213fe3c6f79dd0fe47f7769
 F config.guess 831db445a8ae31d1f773fce85e14c16c8677417d
 F config.sub 975368989965310238930ecf8e7f06a23061dbb1
-F configure df43f93754fd81b151e8c6d81b750bf0e9480a8a x
-F configure.ac a158f37fc6b15821406e4d5d4f9a0ed35b8b0e6b
+F configure 8c9c261da9037dba368e5454de877a22255661ad x
+F configure.ac 3c199bb4d54c6aa8501dcc84facb50bebfefeaad
 F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
 F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
@@ -165,7 +165,7 @@ F www/speed.tcl cb4c10a722614aea76d2c51f32ee43400d5951be
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 11cab41c4f02cdddc4fd3f57555573ac2814a81b
-R fdfcbaff78e43d8a367933863118062c
-U drh
-Z 56b9d2fa20bf8f19c521466c7923ae4d
+P 58ddd587b0f5d565ae3b0ba3a1fa5c20d459f3fc
+R 56bc5369df13f5ed3e79edd9e52598e8
+U paul
+Z 46984dea9f9baae2ea78dc3185931bfa
index 32f8638b888d510f2824532950afa4a476bc698a..2cc2843131a4416018115a3ff4f663f76cdb1dad 100644 (file)
@@ -1 +1 @@
-58ddd587b0f5d565ae3b0ba3a1fa5c20d459f3fc
\ No newline at end of file
+393dd91c252531bb5abfe424b86a5f7eb20edcfc
\ No newline at end of file