/ Check-in [4626c84b]
Login

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

Overview
Comment:make the readline checks more flexible and handle cross-compiling logic (CVS 3646)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4626c84bae1a11d3cdad4901b19caf44406bd62a
User & Date: vapier 2007-02-17 14:28:26
Context
2007-02-17
14:31
punt custom handling of cross-compile logic and move towards the standard autotool way of things (CVS 3647) check-in: 9817b433 user: vapier tags: trunk
14:28
make the readline checks more flexible and handle cross-compiling logic (CVS 3646) check-in: 4626c84b user: vapier tags: trunk
2007-02-14
12:32
In the corrupt2.test script, change uses of (open ... a) to (open ... RDWR) to work around inconsistencies in behavior across various platforms. (CVS 3645) check-in: 50e86b03 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to configure.ac.

   112    112   # the corresponding code.
   113    113   #
   114    114   AC_INIT(src/sqlite.h.in)
   115    115   
   116    116   dnl Put the RCS revision string after AC_INIT so that it will also
   117    117   dnl show in in configure.
   118    118   # The following RCS revision string applies to configure.in
   119         -# $Revision: 1.26 $
          119  +# $Revision: 1.27 $
   120    120   
   121    121   #########
   122    122   # Programs needed
   123    123   #
   124    124   AC_PROG_LIBTOOL
   125    125   AC_PROG_INSTALL
   126    126   AC_PROG_AWK
................................................................................
   588    588   fi
   589    589   AC_SUBST(HAVE_TCL)
   590    590   
   591    591   ##########
   592    592   # Figure out what C libraries are required to compile programs
   593    593   # that use "readline()" library.
   594    594   #
   595         -if test "$config_TARGET_READLINE_LIBS" != ""; then
   596         -  TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
   597         -else
   598         -  CC=$TARGET_CC
   599         -  LIBS=""
   600         -  AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap])
   601         -  AC_CHECK_LIB([readline], [readline])
   602         -  TARGET_READLINE_LIBS="$LIBS"
          595  +TARGET_READLINE_LIBS=""
          596  +TARGET_READLINE_INC=""
          597  +TARGET_HAVE_READLINE=0
          598  +AC_ARG_ENABLE([readline],
          599  +	[AC_HELP_STRING([--disable-readline],[disable readline support [default=detect]])],
          600  +	[with_readline=$enableval],
          601  +	[with_readline=auto])
          602  +
          603  +if test x"$with_readline" != xno; then
          604  +	found="yes"
          605  +
          606  +	AC_ARG_WITH([readline-lib],
          607  +		[AC_HELP_STRING([--with-readline-lib],[specify readline library])],
          608  +		[with_readline_lib=$withval],
          609  +		[with_readline_lib="auto"])
          610  +	if test "x$with_readline_lib" = xauto; then
          611  +		save_LIBS="$LIBS"
          612  +		LIBS=""
          613  +		AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap], [term_LIBS="$LIBS"], [term_LIBS=""])
          614  +		AC_CHECK_LIB([readline], [readline], [TARGET_READLINE_LIBS="-lreadline"], [found="no"])
          615  +		TARGET_READLINE_LIBS="$TARGET_READLINE_LIBS $term_LIBS"
          616  +		LIBS="$save_LIBS"
          617  +	else
          618  +		TARGET_READLINE_LIBS="$with_readline_lib"
          619  +	fi
          620  +
          621  +	AC_ARG_WITH([readline-inc],
          622  +		[AC_HELP_STRING([--with-readline-inc],[specify readline include paths])],
          623  +		[with_readline_inc=$withval],
          624  +		[with_readline_inc="auto"])
          625  +	if test "x$with_readline_inc" = xauto; then
          626  +		AC_CHECK_HEADER(readline.h, [found="yes"], [
          627  +			found="no"
          628  +			if test "$cross_compiling" != yes; then
          629  +				for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
          630  +					for subdir in include include/readline; do
          631  +						AC_CHECK_FILE($dir/$subdir/readline.h, found=yes)
          632  +						if test "$found" = "yes"; then
          633  +							TARGET_READLINE_INC="-I$dir/$subdir"
          634  +							break
          635  +						fi
          636  +					done
          637  +					test "$found" = "yes" && break
          638  +				done
          639  +			fi
          640  +		])
          641  +	else
          642  +		TARGET_READLINE_INC="$with_readline_inc"
          643  +	fi
          644  +
          645  +	if test x"$found" = xno; then
          646  +		TARGET_READLINE_LIBS=""
          647  +		TARGET_READLINE_INC=""
          648  +		TARGET_HAVE_READLINE=0
          649  +	else
          650  +		TARGET_HAVE_READLINE=1
          651  +	fi
   603    652   fi
          653  +
   604    654   AC_SUBST(TARGET_READLINE_LIBS)
          655  +AC_SUBST(TARGET_READLINE_INC)
          656  +AC_SUBST(TARGET_HAVE_READLINE)
   605    657   
   606    658   ##########
   607    659   # Figure out what C libraries are required to compile programs
   608    660   # that use "fdatasync()" function.
   609    661   #
   610    662   CC=$TARGET_CC
   611    663   LIBS=$TARGET_LIBS
   612    664   AC_SEARCH_LIBS(fdatasync, [rt])
   613    665   TARGET_LIBS="$LIBS"
   614    666   
   615         -##########
   616         -# Figure out where to get the READLINE header files.
   617         -#
   618         -AC_MSG_CHECKING([readline header files])
   619         -found=no
   620         -if test "$config_TARGET_READLINE_INC" != ""; then
   621         -  TARGET_READLINE_INC=$config_TARGET_READLINE_INC
   622         -  found=yes
   623         -fi
   624         -if test "$found" = "yes"; then
   625         -  AC_MSG_RESULT($TARGET_READLINE_INC)
   626         -else
   627         -  AC_MSG_RESULT(not specified: still searching...)
   628         -  AC_CHECK_HEADER(readline.h, [found=yes])
   629         -fi
   630         -if test "$found" = "no"; then
   631         -  for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
   632         -    AC_CHECK_FILE($dir/include/readline.h, found=yes)
   633         -    if test "$found" = "yes"; then
   634         -      TARGET_READLINE_INC="-I$dir/include"
   635         -      break
   636         -    fi
   637         -    AC_CHECK_FILE($dir/include/readline/readline.h, found=yes)
   638         -    if test "$found" = "yes"; then
   639         -      TARGET_READLINE_INC="-I$dir/include/readline"
   640         -      break
   641         -    fi
   642         -  done
   643         -fi
   644         -if test "$found" = "yes"; then
   645         -  if test "$TARGET_READLINE_LIBS" = ""; then
   646         -    TARGET_HAVE_READLINE=0
   647         -  else
   648         -    TARGET_HAVE_READLINE=1
   649         -  fi
   650         -else
   651         -  TARGET_HAVE_READLINE=0
   652         -fi
   653         -AC_SUBST(TARGET_READLINE_INC)
   654         -AC_SUBST(TARGET_HAVE_READLINE)
   655         -
   656    667   #########
   657    668   # check for debug enabled
   658    669   AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]),
   659    670         [use_debug=$enableval],[use_debug=no])
   660    671   if test "${use_debug}" = "yes" ; then
   661    672     TARGET_DEBUG="-DSQLITE_DEBUG=1"
   662    673   else