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

This commit is contained in:
Brad Fitzpatrick 2013-07-06 21:49:53 +00:00 committed by Gerrit Code Review
commit bc5edb9011
1 changed files with 7 additions and 0 deletions

View File

@ -484,6 +484,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")