The ./configure script does not really check for presence of SQLite header and library files.
If there is no SQLite version installed in the system, the configuration summary is incorrect:
./configure --with-sqlite=yes
...
checking for curl-config... no
checking Checking for SQLite... enabled
checking Checking for DWGdirect... disabled
...
DODS support: no
SQLite support: yes
DWGdirect support no
...
Next, compilation fails with (expected) error message:
make[3]: Entering directory `/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/ogr/ogrsf_frmts/sqlite'
g++ -Wall -fPIC -O2 -I.. -I/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/port
-I/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/gcore
-I/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/alg
-I/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/ogr
-I/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/ogr/ogrsf_frmts -DOGR_ENABLED
-I/home/mloskot/dev/gdal/_svn/branches/1.4/gdal/port -c -o ../o/ogrsqlitedatasource.o
ogrsqlitedatasource.cpp
In file included from ogrsqlitedatasource.cpp:30:
ogr_sqlite.h:35:21: error: sqlite3.h: No such file or directory
...
There was very similar Ticket #1508 but related to detecting Python files.