From 094d7ac7ff23a6b0700ef7a4936a36ab2eeb5f2d Mon Sep 17 00:00:00 2001 From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com> Date: Sat, 23 Nov 2013 13:06:48 -0600 Subject: [PATCH] get include paths from php-config --- src/bindings/php/SConscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindings/php/SConscript b/src/bindings/php/SConscript index a7fdb5de..bed12266 100644 --- a/src/bindings/php/SConscript +++ b/src/bindings/php/SConscript @@ -4,7 +4,8 @@ Import('env libhammer_shared') phpenv = env.Clone(IMPLICIT_COMMAND_DEPENDENCIES = 0) -phpenv.Append(CPPPATH = ['../../', '/usr/include/php5', '/usr/include/php5/main', '/usr/include/php5/Zend', '/usr/include/php5/TSRM']) +php_include = os.popen("php-config --include-dir").read().rstrip() +phpenv.Append(CPPPATH = ['../../', php_include, os.path.join(php_include, 'main'), os.path.join(php_include, 'Zend'), os.path.join(php_include, 'TSRM')]) phpenv.Append(CCFLAGS = ['-fpic', '-DSWIG', '-Wno-all', '-Wno-extra', '-Wno-error']) phpenv.Append(LIBS = ['hammer']) phpenv.Append(LIBPATH = ['../../']) -- GitLab