Commit 29cd8410 authored by gwenn's avatar gwenn Committed by GitHub

Merge pull request #15 from navytux/y/pkgconfig

Switch to pkg-config to detect libsqlite3 CFLAGS/LDFLAGS
parents e9894afa 355427a8
...@@ -29,7 +29,8 @@ $ cp ~/Downloads/sqlite-amalgamation-xxx/sqlite3.{c,h} $GOPATH/src/github.com/gw ...@@ -29,7 +29,8 @@ $ cp ~/Downloads/sqlite-amalgamation-xxx/sqlite3.{c,h} $GOPATH/src/github.com/gw
- patch sqlite.go file - patch sqlite.go file
``` ```
-#cgo LDFLAGS: -lsqlite3 -#cgo linux freebsd pkg-config: sqlite3
-#cgo !linux,!freebsd LDFLAGS: -lsqlite3
+#cgo CFLAGS: -I. +#cgo CFLAGS: -I.
+#cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA=1 +#cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA=1
``` ```
......
...@@ -6,9 +6,8 @@ ...@@ -6,9 +6,8 @@
package sqlite package sqlite
/* /*
#cgo LDFLAGS: -lsqlite3 #cgo linux freebsd pkg-config: sqlite3
#cgo freebsd LDFLAGS: -lsqlite3 -L/usr/local/lib #cgo !linux,!freebsd LDFLAGS: -lsqlite3
#cgo freebsd CFLAGS: -I/usr/local/include
#include <sqlite3.h> #include <sqlite3.h>
#include <stdlib.h> #include <stdlib.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment