SQLite

Check-in [cbf72b04bb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the amalgamation-tarball configure script so that it can use header file "readline/readline.h" with library file "libedit".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cbf72b04bb0650b62336d86b22ef59315ccdc183
User & Date: dan 2016-05-28 15:09:35.313
Context
2016-05-28
15:22
Enhance "PRAGMA compile_options" so that it shows the version of the compiler used to generate the executable, for common compilers. (check-in: 6a0f200957 user: drh tags: trunk)
15:09
Update the amalgamation-tarball configure script so that it can use header file "readline/readline.h" with library file "libedit". (check-in: cbf72b04bb user: dan tags: trunk)
14:53
Add the vfsstat.c loadable extension - a VFS shim that measures the amount of I/O, and an eponymous virtual table that is used to extract and view the measurements. (check-in: 0987487dd4 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to autoconf/configure.ac.
26
27
28
29
30
31
32
33


34
35
36










37
38
39
40
41
42
43
44
45

46
47
48
49
50
51

52
53

54
55
56


57
58

59
60
61
62
63
64

65


66
67
68
69
70
71
72
73
# Check for library functions that SQLite can optionally use.
AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
AC_FUNC_STRERROR_R

AC_CONFIG_FILES([Makefile sqlite3.pc])
AC_SUBST(BUILD_CFLAGS)

#-----------------------------------------------------------------------


#   --enable-editline
#   --enable-readline
#










AC_ARG_ENABLE(editline, [AS_HELP_STRING(
  [--enable-editline], 
  [use BSD libedit])], 
  [], [enable_editline=yes])
AC_ARG_ENABLE(readline, [AS_HELP_STRING(
  [--enable-readline], 
  [use readline])], 
  [], [enable_readline=yes])
if test x"$enable_editline" != xno ; then

  sLIBS=$LIBS
  LIBS=""
  AC_SEARCH_LIBS([readline],[edit],[enable_readline=no],[enable_editline=no])
  READLINE_LIBS=$LIBS
  if test x"$LIBS" != "x"; then
    AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline)

    enable_readline=no
  else

    unset ac_cv_search_readline
  fi
  LIBS=$sLIBS


fi
if test x"$enable_readline" != xno ; then

  sLIBS=$LIBS
  LIBS=""
  AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
  AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
  AC_CHECK_FUNCS(readline, [], [])
  READLINE_LIBS=$LIBS

  LIBS=$sLIBS


fi
AC_SUBST(READLINE_LIBS)
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-threadsafe
#
AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING(







|
>
>



>
>
>
>
>
>
>
>
>
>
|
<
<
<
|
|
<
<
|
>
|
|
|
<
<
|
>
|
<
>
|
<
|
>
>
|
|
>
|
|
|
|
|
|
>
|
>
>
|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49



50
51


52
53
54
55
56


57
58
59

60
61

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Check for library functions that SQLite can optionally use.
AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
AC_FUNC_STRERROR_R

AC_CONFIG_FILES([Makefile sqlite3.pc])
AC_SUBST(BUILD_CFLAGS)

#-------------------------------------------------------------------------
# Two options to enable readline compatible libraries: 
#
#   --enable-editline
#   --enable-readline
#
# Both are enabled by default. If, after command line processing both are
# still enabled, the script searches for editline first and automatically
# disables readline if it is found. So, to use readline explicitly, the
# user must pass "--disable-editline". To disable command line editing
# support altogether, "--disable-editline --disable-readline".
#
# When searching for either library, check for headers before libraries 
# as some distros supply packages that contain libraries but not header
# files, which come as a separate development package.
#
AC_ARG_ENABLE(editline, [AS_HELP_STRING([--enable-editline],[use BSD libedit])])



AC_ARG_ENABLE(readline, [AS_HELP_STRING([--enable-readline],[use readline])])



AS_IF([ test x"$enable_editline" != xno ],[
  AC_CHECK_HEADERS([editline/readline.h],[
    sLIBS=$LIBS
    LIBS=""
    AC_SEARCH_LIBS([readline],[edit],[


      AC_DEFINE([HAVE_EDITLINE],1,Define to use BSD editline)
      READLINE_LIBS=$LIBS
      enable_readline=no

    ])
    AS_UNSET(ac_cv_search_readline)

    LIBS=$sLIBS
  ])
])

AS_IF([ test x"$enable_readline" != xno ],[
  AC_CHECK_HEADERS([readline/readline.h],[
    sLIBS=$LIBS
    LIBS=""
    AC_SEARCH_LIBS(tgetent, termcap curses ncurses ncursesw, [], [])
    AC_SEARCH_LIBS(readline,[readline edit], [
      AC_DEFINE([HAVE_READLINE],1,Define to use readline or wrapper)
      READLINE_LIBS=$LIBS
    ])
    LIBS=$sLIBS
  ])
])

AC_SUBST(READLINE_LIBS)
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-threadsafe
#
AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING(