Commit 0676f33a authored by Jeremy Linton's avatar Jeremy Linton Committed by Colin Walters

change mozjs interface module to c++

The JSAPI is now a full C++ interface. Convert the polkit
to JavaScript interface module to C++ compilation in order to
support newer versions of spidermonkey.
Signed-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
parent 32e9a69c
......@@ -30,6 +30,8 @@ AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_SYS_LARGEFILE
AM_PROG_CC_C_O
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11()
# Taken from dbus
AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
......@@ -142,6 +144,7 @@ AS_IF([test x${with_mozjs} != xauto], [
])
])
AC_SUBST(LIBJS_CFLAGS)
AC_SUBST(LIBJS_CXXFLAGS)
AC_SUBST(LIBJS_LIBS)
EXPAT_LIB=""
......
......@@ -32,7 +32,7 @@ libpolkit_backend_1_la_SOURCES = \
polkitbackendprivate.h \
polkitbackendauthority.h polkitbackendauthority.c \
polkitbackendinteractiveauthority.h polkitbackendinteractiveauthority.c \
polkitbackendjsauthority.h polkitbackendjsauthority.c \
polkitbackendjsauthority.h polkitbackendjsauthority.cpp \
polkitbackendactionpool.h polkitbackendactionpool.c \
polkitbackendactionlookup.h polkitbackendactionlookup.c \
$(NULL)
......@@ -53,6 +53,8 @@ libpolkit_backend_1_la_CFLAGS = \
$(LIBJS_CFLAGS) \
$(NULL)
libpolkit_backend_1_la_CXXFLAGS = $(libpolkit_backend_1_la_CFLAGS) -fpermissive
libpolkit_backend_1_la_LIBADD = \
$(GLIB_LIBS) \
$(LIBSYSTEMD_LIBS) \
......@@ -73,6 +75,9 @@ polkitd_SOURCES = \
polkitd.c \
$(NULL)
# force C++ link via dummy C++ file, (see GNU automake manual section 8.3.5)
nodist_EXTRA_polkitd_SOURCES = dummy-force-cpp-link.cxx
polkitd_CFLAGS = \
-DPOLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE \
-DG_LOG_DOMAIN=\"polkitd-1\" \
......
......@@ -35,6 +35,9 @@ TEST_PROGS =
TEST_PROGS += polkitbackendjsauthoritytest
polkitbackendjsauthoritytest_SOURCES = test-polkitbackendjsauthority.c
# force C++ link via dummy C++ file, (see GNU automake manual section 8.3.5)
nodist_EXTRA_polkitbackendjsauthoritytest_SOURCES = dummy-force-cpp-link.cxx
# ----------------------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment