From 3ae552961fe0972ec7e6ddb161940f6f5bcfafa2 Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Fri, 26 Feb 2016 17:27:41 +0000 Subject: [PATCH] Use pkg-config to link opus --- decoder.go | 2 +- encoder.go | 2 +- errors.go | 2 +- opus.go | 3 +-- stream.go | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/decoder.go b/decoder.go index 94e9838..490b37a 100644 --- a/decoder.go +++ b/decoder.go @@ -10,7 +10,7 @@ import ( ) /* -#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include +#cgo pkg-config: opus #include */ import "C" diff --git a/encoder.go b/encoder.go index e6e3ae4..b6e8935 100644 --- a/encoder.go +++ b/encoder.go @@ -10,7 +10,7 @@ import ( ) /* -#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include +#cgo pkg-config: opus #include */ import "C" diff --git a/errors.go b/errors.go index 9bf482e..b3719c7 100644 --- a/errors.go +++ b/errors.go @@ -5,7 +5,7 @@ import ( ) /* -#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include -Ibuild/include/opus +#cgo pkg-config: opus opusfile #include #include diff --git a/opus.go b/opus.go index 56e70cd..1a5c0c0 100644 --- a/opus.go +++ b/opus.go @@ -14,8 +14,7 @@ package opus // not the user. // // If I missed something, and somebody knows a better way: please let me know. -#cgo LDFLAGS: libopusfile.a libopus.a -logg -lm -#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include +#cgo pkg-config: opus #include // Access the preprocessor from CGO diff --git a/stream.go b/stream.go index 2903d95..f48fa31 100644 --- a/stream.go +++ b/stream.go @@ -7,7 +7,7 @@ import ( ) /* -#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include/opus +#cgo pkg-config: opus #include #include -- 2.48.1