From 0d5c552a11670bb6c96cfec74201a9ebfc2578f2 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 2 Jul 2013 09:36:33 -0700 Subject: [PATCH] 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 --- make.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/make.go b/make.go index a43e10156..a725774a5 100644 --- a/make.go +++ b/make.go @@ -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")