diff --git a/configure.ac b/configure.ac index d149ff2b1..da937cd09 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # Checks for programs. AC_PROG_CC +AC_PROG_CXX # Initialize libtool LT_PREREQ([2.2.6]) diff --git a/src/Makefile.am b/src/Makefile.am index 8041052d7..a9f4c6271 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -207,7 +207,7 @@ endif HAVE_MUTTER_WAYLAND libgnome_shell_js_la_SOURCES = \ shell-js.h \ - shell-js.c \ + shell-js.cpp \ $(NULL) libgnome_shell_js_la_LIBADD = \ diff --git a/src/shell-js.c b/src/shell-js.cpp similarity index 96% rename from src/shell-js.c rename to src/shell-js.cpp index 149dcd041..7d057c9e9 100644 --- a/src/shell-js.c +++ b/src/shell-js.cpp @@ -38,7 +38,7 @@ shell_js_add_extension_importer (const char *target_object_script, * we should only ever have one context, so this * should be alright. */ contexts = gjs_context_get_all (); - context = gjs_context_get_native_context (contexts->data); + context = (JSContext*) gjs_context_get_native_context ((GjsContext*)contexts->data); g_list_free_full (contexts, g_object_unref); JS_BeginRequest (context);