php7: Allow for additional `php7.debian` build tag

The additional `php7.debian` build tag allows Go-PHP to be built against
PHP7 on Debian (and Debian-derived, such as Ubuntu) distributions. This
additional build tag is required due to the non-standard include and
library file locations.

Relates-To: #26
This commit is contained in:
Alex Palaistras 2016-09-21 20:19:00 -07:00
parent daf6987b14
commit 7dc4aeac6c
2 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// +build !php7
// +build !php7,!php7.debian
package engine

12
engine/php7-debian.go Normal file
View File

@ -0,0 +1,12 @@
// +build php7.debian
//
// Build tags specific to Debian (and Debian-derived, such as Ubuntu) distributions.
// Debian builds its PHP7 packages with non-standard naming conventions for include
// and library paths, so we need a specific build tag for building against those
// packages.
package engine
// #cgo CFLAGS: -I/usr/include/php/20151012 -Iinclude/php7 -Isrc/php7
// #cgo LDFLAGS: -lphp7.0
import "C"