From e58b28c3cdb4732ee02ae4544a1f8fd7cc4c9e76 Mon Sep 17 00:00:00 2001 From: Piotr Tworek Date: Fri, 11 Sep 2015 17:08:22 +0200 Subject: [PATCH] [embedlite-components] Fix compilation against system nspr. Don't hardcode the system nspr path to /usr/include/nspr4. Instead use pkg-config to determine correct path. Do it only in case we're building the code against system nspr. In case we use bundled gecko version system include paths should not be passed to the compiler. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 40d8c0a..9fa8305 100755 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,11 @@ AS_IF([test "x$with_system_nspr" = "xyes"], if test "$OBJ_PATH" != ""; then SDK_DIR=$OBJ_PATH/dist IDL_DIR=$OBJ_PATH/dist/idl -ENGINE_CFLAGS="-I$OBJ_PATH/dist/include -I$OBJ_PATH/dist/include/nspr -I$OBJ_PATH/dist/include/mozilla -I$OBJ_PATH/dist/include/dom -I/usr/include/nspr4" +ENGINE_CFLAGS="-I$OBJ_PATH/dist/include -I$OBJ_PATH/dist/include/mozilla -I$OBJ_PATH/dist/include/dom" +AS_IF([test "x$with_system_nspr" = "xyes"], + [ENGINE_CFLAGS="${ENGINE_CFLAGS} `pkg-config --cflags-only-I nspr`"], + [ENGINE_CFLAGS="${ENGINE_CFLAGS} -I$OBJ_PATH/dist/include/nspr"] +) ENGINE_LIBS="-L$OBJ_PATH/dist/sdk/lib -lxpcomglue_s -lxul" else PKG_CHECK_MODULES(ENGINE, libxul $NSPR,