Skip to content

Commit 790219a

Browse files
Add generated build dirs as include paths
When doing an out-of-source build, certain generated headers are written into the build tree. The directories containing these headers need to be added as #include search paths for the build to succeed.
1 parent 88734c5 commit 790219a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

config.m4

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,10 @@ if test "$PHP_MONGODB" != "no"; then
370370
PHP_MONGODB_ADD_SOURCES([src/libmongoc/src/libbson/src/jsonsl/], $PHP_MONGODB_JSONSL_SOURCES, $PHP_MONGODB_BUNDLED_CFLAGS)
371371
PHP_MONGODB_ADD_SOURCES([src/libmongoc/src/libmongoc/src/mongoc/], $PHP_MONGODB_MONGOC_SOURCES, $PHP_MONGODB_BUNDLED_CFLAGS)
372372

373+
# Add the build directories as include paths to some generated files
374+
PHP_ADD_INCLUDE([$PWD/src/libmongoc/src/libbson/src])
375+
PHP_ADD_INCLUDE([$PWD/src/libmongoc/src/libmongoc/src])
376+
373377
PHP_MONGODB_ADD_INCLUDE([src/libmongoc/src/common/src/])
374378
PHP_MONGODB_ADD_INCLUDE([src/libmongoc/src/uthash/])
375379
PHP_MONGODB_ADD_INCLUDE([src/libmongoc/src/libbson/src/])
@@ -394,11 +398,11 @@ if test "$PHP_MONGODB" != "no"; then
394398
ac_config_dir=PHP_EXT_SRCDIR(mongodb)
395399

396400
AC_CONFIG_FILES([
397-
${ac_config_dir}/src/libmongoc/src/common/src/common-config.h
398-
${ac_config_dir}/src/libmongoc/src/libbson/src/bson/config.h
399-
${ac_config_dir}/src/libmongoc/src/libbson/src/bson/version.h
400-
${ac_config_dir}/src/libmongoc/src/libmongoc/src/mongoc/mongoc-config.h
401-
${ac_config_dir}/src/libmongoc/src/libmongoc/src/mongoc/mongoc-version.h
401+
src/libmongoc/src/common/src/common-config.h
402+
src/libmongoc/src/libbson/src/bson/config.h
403+
src/libmongoc/src/libbson/src/bson/version.h
404+
src/libmongoc/src/libmongoc/src/mongoc/mongoc-config.h
405+
src/libmongoc/src/libmongoc/src/mongoc/mongoc-version.h
402406
])
403407

404408
if test "x$bundled_utf8proc" = "xyes"; then

0 commit comments

Comments
 (0)