Commits

Greg Ward committed 41e0e01

build: be more specific about SQLite version

Using sqlite3_errstr() means we need SQLite >= 3.7.15, which is fairly
recent (Dec 2012). So document the requirement and make configure
enforce it.

Comments (0)

Files changed (2)

 vcprompt requires GNU autoconf to build from a source checkout (but
 not from a source tarball).
 
-Support for Subversion >= 1.7 requires SQLite 3. If it's not present on
-the build system, vcprompt will support Subversion <= 1.6. Either way,
-the build should succeed and the tests should pass. To install the
-required files:
+Support for Subversion >= 1.7 requires SQLite >= 3.7.15. If it's not
+present on the build system, vcprompt will still support older
+versions of Subversion. Either way, the build should succeed and the
+tests should pass. To install the required files:
 
   sudo apt-get install libsqlite3-dev   # Debian, Ubuntu
   sudo yum install libsqlite3x-devel    # Fedora, Red Hat
 
+If you have multiple versions of SQLite installed (this can be a
+problem on Mac OS X), you might need to specify the installation
+prefix of the one you want -- e.g., to use the brew package:
+
+  ./configure --with-sqlite3=/usr/local
+
 To see which features are built-in to your vcprompt binary, run
 
   ./vcprompt -F
 # Checks for third-party libraries.
 if test "$with_sqlite3" = "check" -o "$with_sqlite3" = "yes"; then
     AC_CHECK_HEADERS([sqlite3.h])
-    AC_CHECK_LIB(sqlite3, sqlite3_open_v2)
+    AC_CHECK_LIB(sqlite3, sqlite3_errstr)
 elif test "$with_sqlite3" != "no"; then
     CPPFLAGS="$CPPFLAGS -I${with_sqlite3}/include"
     LDFLAGS="$LDFLAGS -L${with_sqlite3}/lib"
     AC_CHECK_HEADERS([sqlite3.h])
-    AC_CHECK_LIB(sqlite3, sqlite3_open_v2)
+    AC_CHECK_LIB(sqlite3, sqlite3_errstr)
 fi
 
 # Checks for typedefs, structures, and compiler characteristics.