diff --git a/src/bindings/php/SConscript b/src/bindings/php/SConscript index a7fdb5dedfac4625ba109f2346a0ea35c5eed3cb..bed12266d3e2746ae099d9d59853e418f0c1a0c8 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 = ['../../'])