+bindir := $(prefix)/bin
+sharedir := $(prefix)/share
+docdir := $(sharedir)/doc
+mandir := $(sharedir)/man
+
+ifeq ($(shell pkg-config --atleast-version 1.9 mozilla-gtkmozembed-embedding && echo yes),yes)
+ moz_name := xulrunner-1.9
+ moz_pc := mozilla-gtkmozembed-embedding
+ moz_cppflags_extra := $(shell pkg-config --cflags xulrunner-nspr)
+ moz_unstable_cppflags_extra :=
+ moz_ldflags_extra :=
+else
+ ifeq ($(shell pkg-config --exists xulrunner-gtkmozembed && echo yes),yes)
+ moz_name := xulrunner
+ moz_pc := xulrunner-gtkmozembed
+ else
+ moz_name := mozilla
+ moz_pc := mozilla-gtkmozembed
+ endif
+ moz_unstable_cppflags_extra = \
+ $(addprefix -I$(moz_include_dir)/, \
+ content docshell dom gfx imglib2 layout locale necko uconv webshell widget) \
+ -DMOZILLA_INTERNAL_API
+ moz_ldflags_extra = -Wl,-rpath,$(moz_lib_dir)
+endif
+
+moz_prefix := $(shell pkg-config --variable=prefix $(moz_pc))
+moz_include_dir := $(shell pkg-config --variable=includedir $(moz_pc))
+moz_lib_dir := $(moz_prefix)/lib/$(moz_name)
+
+moz_version := $(shell pkg-config --modversion $(moz_pc))
+moz_version_major := $(word 1,$(subst ., ,$(moz_version)))
+moz_version_minor := $(word 2,$(subst ., ,$(moz_version)))