Skip to content

Commit

Permalink
[embedlite-components] Fix compilation against system nspr.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tworaz authored and rainemak committed Jun 16, 2016
1 parent 6291315 commit 483da40
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion configure.ac
Expand Up @@ -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,
Expand Down

0 comments on commit 483da40

Please sign in to comment.