Author: Cesare Falco <c.falco@ubuntu.com>
Description: Use system library for Sqlite3
 Build against system version of libsqlite3 instead of embedded one
Forwarded: no

Index: mame/makefile
===================================================================
--- mame.orig/makefile	2014-07-31 16:09:44.000000000 +0200
+++ mame/makefile	2014-07-31 16:19:16.000000000 +0200
@@ -231,6 +231,9 @@
 # uncomment next line to build jpeglib as part of MAME build
 BUILD_JPEGLIB = 1
 
+# uncomment next line to build libsqlite3 as part of MAME/MESS build
+BUILD_SQLITE3 = 1
+
 # uncomment next line to build PortMidi as part of MAME/MESS build
 BUILD_MIDILIB = 1
 
@@ -763,7 +766,12 @@
 WEB_LIB = $(OBJ)/libweb.a
 
 # add SQLite3 library
+ifeq ($(BUILD_SQLITE3),1)
 SQLITE3_LIB = $(OBJ)/libsqlite3.a
+else
+LIBS += -lsqlite3
+SQLITE3_LIB =
+endif
 
 # add PortMidi MIDI library
 ifeq ($(BUILD_MIDILIB),1)
