Not finding pkg-config shouldn't be fatal on OS X.

pkg-config is usually not installed on OS X machines. Before this change:

    $ go run make.go
    No pkg-config found. Can't determine whether sqlite3 is available, and where.
    exit status 1

Now:

    $ go run make.go
    SQLite not found. Either install it, or run make.go with --sqlite=false
    On OS X, run 'brew install sqlite3' and set PKG_CONFIG_PATH=*snip*
    exit status 2

Change-Id: I52e4c68d0f18bc582f8f4e04ad36caaaedb4f778
This commit is contained in:
Nico Weber 2013-07-02 09:36:33 -07:00
parent 9a283ed155
commit 0d5c552a11
1 changed files with 7 additions and 0 deletions

View File

@ -461,6 +461,13 @@ func haveSQLite() bool {
}
_, err := exec.LookPath("pkg-config")
if err != nil {
if runtime.GOOS == "darwin" {
// OS X usually doesn't have pkg-config installed. Don't
// call Fatalf() so that the nicer error message in main()
// can be printed.
return false
}
log.Fatalf("No pkg-config found. Can't determine whether sqlite3 is available, and where.")
}
cmd := exec.Command("pkg-config", "--libs", "sqlite3")