diff -Nru gjs-1.48.3/aclocal.m4 gjs-1.48.5/aclocal.m4 --- gjs-1.48.3/aclocal.m4 2017-05-06 07:07:32.000000000 +0000 +++ gjs-1.48.5/aclocal.m4 2017-06-21 18:05:26.000000000 +0000 @@ -103,10 +103,9 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_COND_IF -*- Autoconf -*- @@ -610,7 +609,8 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further diff -Nru gjs-1.48.3/config.guess gjs-1.48.5/config.guess --- gjs-1.48.3/config.guess 2017-05-06 07:07:35.000000000 +0000 +++ gjs-1.48.5/config.guess 2017-06-21 18:05:28.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-11-29' +timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -149,7 +149,7 @@ LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac @@ -826,7 +826,7 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -969,10 +969,10 @@ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} exit ;; - or32:Linux:*:*) + or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) @@ -1371,154 +1371,6 @@ exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='gjs' PACKAGE_TARNAME='gjs' -PACKAGE_VERSION='1.48.3' -PACKAGE_STRING='gjs 1.48.3' +PACKAGE_VERSION='1.48.5' +PACKAGE_STRING='gjs 1.48.5' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs' PACKAGE_URL='https://wiki.gnome.org/Projects/Gjs' @@ -686,9 +686,13 @@ INTROSPECTION_SCANNER CODE_COVERAGE_RULES CODE_COVERAGE_LDFLAGS +CODE_COVERAGE_LIBS +CODE_COVERAGE_CXXFLAGS CODE_COVERAGE_CFLAGS +CODE_COVERAGE_CPPFLAGS GENHTML LCOV +GCOV CODE_COVERAGE_ENABLED CODE_COVERAGE_ENABLED_FALSE CODE_COVERAGE_ENABLED_TRUE @@ -841,6 +845,7 @@ enable_libtool_lock enable_compile_warnings enable_Werror +with_gcov enable_code_coverage with_cairo with_gtk @@ -1423,7 +1428,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gjs 1.48.3 to adapt to many kinds of systems. +\`configure' configures gjs 1.48.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1493,7 +1498,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gjs 1.48.3:";; + short | recursive ) echo "Configuration of gjs 1.48.5:";; esac cat <<\_ACEOF @@ -1538,6 +1543,7 @@ --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). + --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). --without-cairo Don't build cairo module --without-gtk Don't build GTK-related code --with-xvfb-tests Run all tests under an XVFB server [default=no] @@ -1657,7 +1663,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gjs configure 1.48.3 +gjs configure 1.48.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2147,7 +2153,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gjs $as_me 1.48.3, which was +It was created by gjs $as_me 1.48.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2696,8 +2702,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -3010,7 +3016,7 @@ # Define the identity of the package. PACKAGE='gjs' - VERSION='1.48.3' + VERSION='1.48.5' cat >>confdefs.h <<_ACEOF @@ -3222,8 +3228,9 @@ + # $is_release = (.git directory does not exist) - if test -d ${srcdir}/.git; then : + if test -d ${top_srcdir}/.git; then : ax_is_release=no else ax_is_release=yes @@ -3236,10 +3243,10 @@ -GJS_VERSION=14803 +GJS_VERSION=14805 -$as_echo "#define GJS_VERSION (1 * 100 + 48) * 100 + 3" >>confdefs.h +$as_echo "#define GJS_VERSION (1 * 100 + 48) * 100 + 5" >>confdefs.h GETTEXT_PACKAGE=gjs @@ -4155,7 +4162,7 @@ - ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true + ax_cxx_compile_cxx11_required=true ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4470,8 +4477,7 @@ fi if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" + for switch in -std=gnu++11 -std=gnu++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } @@ -4792,17 +4798,16 @@ fi if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 + for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXX="$CXX" - CXX="$CXX $switch" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5097,21 +5102,17 @@ eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXX="$ac_save_CXX" + CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" fi - done - if test x$ac_success = xyes; then + ac_success=yes break fi done @@ -5141,7 +5142,6 @@ - # no stupid static libraries case `pwd` in *\ * | *\ *) @@ -6754,7 +6754,8 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -7155,10 +7156,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -7197,11 +7194,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -8279,7 +8276,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -8295,9 +8292,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -8316,7 +8323,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -10133,7 +10143,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -10611,6 +10621,9 @@ openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -10832,7 +10845,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -11009,6 +11022,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then @@ -11462,7 +11476,7 @@ link_all_deplibs=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -12299,17 +12313,6 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -12426,7 +12429,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -12490,6 +12493,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -14237,9 +14252,6 @@ ld_shlibs_CXX=yes ;; - gnu*) - ;; - haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes @@ -14401,7 +14413,7 @@ inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -15261,7 +15273,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -15325,7 +15337,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -15696,6 +15708,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs_CXX=no + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -16130,17 +16145,6 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -16257,7 +16261,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -16321,6 +16325,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -17707,8 +17723,6 @@ - - # Variable names @@ -17757,133 +17771,12 @@ fi - # macOS linker does not have --as-needed - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--no-as-needed" >&5 -$as_echo_n "checking whether the linker accepts -Wl,--no-as-needed... " >&6; } -if ${ax_cv_check_ldflags___Wl___no_as_needed+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,--no-as-needed" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ax_cv_check_ldflags___Wl___no_as_needed=yes -else - ax_cv_check_ldflags___Wl___no_as_needed=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___no_as_needed" >&5 -$as_echo "$ax_cv_check_ldflags___Wl___no_as_needed" >&6; } -if test "x$ax_cv_check_ldflags___Wl___no_as_needed" = xyes; then : - - ax_compiler_flags_as_needed_option="-Wl,--no-as-needed" - -else - - ax_compiler_flags_as_needed_option="" - -fi - - - # macOS linker speaks with a different accent - ax_compiler_flags_fatal_warnings_option="" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--fatal-warnings" >&5 -$as_echo_n "checking whether the linker accepts -Wl,--fatal-warnings... " >&6; } -if ${ax_cv_check_ldflags___Wl___fatal_warnings+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,--fatal-warnings" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ax_cv_check_ldflags___Wl___fatal_warnings=yes -else - ax_cv_check_ldflags___Wl___fatal_warnings=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___fatal_warnings" >&5 -$as_echo "$ax_cv_check_ldflags___Wl___fatal_warnings" >&6; } -if test "x$ax_cv_check_ldflags___Wl___fatal_warnings" = xyes; then : - - ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings" - -else - : -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-fatal_warnings" >&5 -$as_echo_n "checking whether the linker accepts -Wl,-fatal_warnings... " >&6; } -if ${ax_cv_check_ldflags___Wl__fatal_warnings+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-fatal_warnings" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ax_cv_check_ldflags___Wl__fatal_warnings=yes -else - ax_cv_check_ldflags___Wl__fatal_warnings=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__fatal_warnings" >&5 -$as_echo "$ax_cv_check_ldflags___Wl__fatal_warnings" >&6; } -if test "x$ax_cv_check_ldflags___Wl__fatal_warnings" = xyes; then : - - ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings" - -else - : -fi - - # Base flags -for flag in $ax_compiler_flags_as_needed_option ; do +for flag in -Wl,--no-as-needed ; do as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 $as_echo_n "checking whether the linker accepts $flag... " >&6; } @@ -18048,7 +17941,7 @@ -for flag in $ax_compiler_flags_fatal_warnings_option ; do +for flag in -Wl,--fatal-warnings ; do as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 $as_echo_n "checking whether the linker accepts $flag... " >&6; } @@ -18248,7 +18141,19 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 + + + # allow to override gcov location + +# Check whether --with-gcov was given. +if test "${with_gcov+set}" = set; then : + withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov +else + _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 $as_echo_n "checking whether to build with code coverage support... " >&6; } # Check whether --enable-code-coverage was given. if test "${enable_code_coverage+set}" = set; then : @@ -18257,6 +18162,7 @@ enable_code_coverage=no fi + if test x$enable_code_coverage = xyes; then CODE_COVERAGE_ENABLED_TRUE= CODE_COVERAGE_ENABLED_FALSE='#' @@ -18272,6 +18178,104 @@ if test "$enable_code_coverage" = "yes" ; then : + # check for gcov + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCOV"; then + ac_cv_prog_GCOV="$GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GCOV=$ac_cv_prog_GCOV +if test -n "$GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GCOV"; then + ac_ct_GCOV=$GCOV + # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GCOV"; then + ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV +if test -n "$ac_ct_GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_GCOV" = x; then + GCOV=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + GCOV=$ac_ct_GCOV + fi +else + GCOV="$ac_cv_prog_GCOV" +fi + + if test "X$GCOV" = "X:"; then : + as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 +fi + + if test "$GCC" = "no" ; then : as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 @@ -18279,7 +18283,7 @@ fi # List of supported lcov versions. - lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11" + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" # Extract the first word of "lcov", so it can be a program name with args. set dummy lcov; ac_word=$2 @@ -18397,8 +18401,14 @@ fi - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" CODE_COVERAGE_LDFLAGS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + + + @@ -18410,6 +18420,7 @@ # # Optional: # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. # (Default: $(top_builddir)) # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated # by lcov for code coverage. (Default: @@ -18417,10 +18428,26 @@ # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage # reports to be created. (Default: # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance. +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. # (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: empty) +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore # # The generated report will be titled using the $(PACKAGE_NAME) and @@ -18431,19 +18458,44 @@ CODE_COVERAGE_DIRECTORY ?= $(top_builddir) CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage -CODE_COVERAGE_LCOV_OPTIONS ?= -CODE_COVERAGE_GENHTML_OPTIONS ?= +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) CODE_COVERAGE_IGNORE_PATTERN ?= +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); code_coverage_quiet = $(code_coverage_quiet_$(V)) code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) code_coverage_quiet_0 = --quiet +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + # Use recursive makes in order to ignore errors during check check-code-coverage: ifeq ($(CODE_COVERAGE_ENABLED),yes) - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture else @echo "Need to reconfigure with --enable-code-coverage" endif @@ -18451,10 +18503,10 @@ # Capture code coverage data code-coverage-capture: code-coverage-capture-hook ifeq ($(CODE_COVERAGE_ENABLED),yes) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" else @echo "Need to reconfigure with --enable-code-coverage" @@ -18465,17 +18517,18 @@ ifeq ($(CODE_COVERAGE_ENABLED),yes) clean: code-coverage-clean +distclean: code-coverage-clean code-coverage-clean: -$(LCOV) --directory $(top_builddir) -z -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . -name "*.gcda" -o -name "*.gcov" -delete + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete endif GITIGNOREFILES ?= GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) -DISTCHECK_CONFIGURE_FLAGS ?= -DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean ' @@ -20494,7 +20547,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gjs $as_me 1.48.3, which was +This file was extended by gjs $as_me 1.48.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20565,7 +20618,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gjs config.status 1.48.3 +gjs config.status 1.48.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru gjs-1.48.3/configure.ac gjs-1.48.5/configure.ac --- gjs-1.48.3/configure.ac 2017-05-06 07:01:38.000000000 +0000 +++ gjs-1.48.5/configure.ac 2017-06-21 18:03:50.000000000 +0000 @@ -3,7 +3,7 @@ m4_define(pkg_major_version, 1) m4_define(pkg_minor_version, 48) -m4_define(pkg_micro_version, 3) +m4_define(pkg_micro_version, 5) m4_define(pkg_version, pkg_major_version.pkg_minor_version.pkg_micro_version) m4_define(pkg_int_version, (pkg_major_version * 100 + pkg_minor_version) * 100 + pkg_micro_version) diff -Nru gjs-1.48.3/debian/changelog gjs-1.48.5/debian/changelog --- gjs-1.48.3/debian/changelog 2017-05-06 07:47:00.000000000 +0000 +++ gjs-1.48.5/debian/changelog 2017-06-21 19:15:36.000000000 +0000 @@ -1,3 +1,9 @@ +gjs (1.48.5-0ubuntu0.1) zesty; urgency=medium + + * New upstream release (LP: #1698553) + + -- Jeremy Bicha Wed, 21 Jun 2017 15:15:36 -0400 + gjs (1.48.3-0ubuntu0.1) zesty; urgency=medium * New upstream release (LP: #1688704) diff -Nru gjs-1.48.3/gi/closure.cpp gjs-1.48.5/gi/closure.cpp --- gjs-1.48.3/gi/closure.cpp 2017-05-06 06:52:14.000000000 +0000 +++ gjs-1.48.5/gi/closure.cpp 2017-06-21 18:04:26.000000000 +0000 @@ -36,6 +36,7 @@ JSRuntime *runtime; JSContext *context; GjsMaybeOwned obj; + unsigned idle_clear_id; }; struct GjsClosure { @@ -132,6 +133,7 @@ closure->priv.obj.reset(); closure->priv.context = nullptr; closure->priv.runtime = nullptr; + closure->priv.idle_clear_id = 0; g_closure_unref(static_cast(data)); return G_SOURCE_REMOVE; @@ -177,7 +179,7 @@ "removing our destroy notifier on global object)", closure); - g_idle_add(closure_clear_idle, closure); + c->idle_clear_id = g_idle_add(closure_clear_idle, closure); g_closure_ref(closure); } @@ -186,7 +188,8 @@ GClosure *closure) { GJS_DEC_COUNTER(closure); - g_idle_add(closure_clear_idle, closure); + Closure *c = &(reinterpret_cast(closure))->priv; + c->idle_clear_id = g_idle_add(closure_clear_idle, closure); g_closure_ref(closure); } @@ -196,6 +199,13 @@ { Closure *self = &((GjsClosure*) closure)->priv; + if (self->idle_clear_id > 0) { + /* Remove any pending closure_clear_idle(), we are doing it + * immediately here. */ + g_source_remove(self->idle_clear_id); + closure_clear_idle(closure); + } + self->~Closure(); } diff -Nru gjs-1.48.3/gi/object.cpp gjs-1.48.5/gi/object.cpp --- gjs-1.48.3/gi/object.cpp 2017-05-06 06:52:14.000000000 +0000 +++ gjs-1.48.5/gi/object.cpp 2017-06-21 18:03:50.000000000 +0000 @@ -54,6 +54,8 @@ #include #include +typedef struct _ConnectData ConnectData; + struct ObjectInstance { GIObjectInfo *info; GObject *gobj; /* NULL if we are the prototype and not an instance */ @@ -61,7 +63,7 @@ GType gtype; /* a list of all signal connections, used when tracing */ - GList *signals; + std::set signals; /* the GObjectClass wrapped by this JS Object (only used for prototypes) */ @@ -73,11 +75,11 @@ unsigned js_object_finalized : 1; }; -typedef struct { +struct _ConnectData { ObjectInstance *obj; - GList *link; GClosure *closure; -} ConnectData; + unsigned idle_invalidate_id; +}; typedef enum { @@ -110,7 +112,7 @@ GJS_DEFINE_PRIV_FROM_JS(ObjectInstance, gjs_object_instance_class) static void disassociate_js_gobject (GObject *gobj); -static void invalidate_all_signals (ObjectInstance *priv); + typedef enum { SOME_ERROR_OCCURRED = false, NO_SUCH_G_PROPERTY, @@ -1391,6 +1393,21 @@ } static void +invalidate_all_signals(ObjectInstance *priv) +{ + /* Can't loop directly through the items, since invalidating an item's + * closure might have the effect of removing the item from the set in the + * invalidate notifier */ + while (!priv->signals.empty()) { + /* This will also free cd, through the closure invalidation mechanism */ + ConnectData *cd = *priv->signals.begin(); + g_closure_invalidate(cd->closure); + /* Erase element if not already erased */ + priv->signals.erase(cd); + } +} + +static void disassociate_js_gobject(GObject *gobj) { ObjectInstance *priv = get_object_qdata(gobj); @@ -1540,43 +1557,44 @@ } static void -invalidate_all_signals(ObjectInstance *priv) -{ - GList *iter, *next; - - for (iter = priv->signals; iter; ) { - ConnectData *cd = (ConnectData*) iter->data; - next = iter->next; - - /* This will also free cd and iter, through - the closure invalidation mechanism */ - g_closure_invalidate(cd->closure); - - iter = next; - } -} - -static void object_instance_trace(JSTracer *tracer, JSObject *obj) { ObjectInstance *priv; - GList *iter; priv = (ObjectInstance *) JS_GetPrivate(obj); if (priv == NULL) return; - for (iter = priv->signals; iter; iter = iter->next) { - ConnectData *cd = (ConnectData *) iter->data; - + for (ConnectData *cd : priv->signals) gjs_closure_trace(cd->closure, tracer); - } for (auto vfunc : priv->vfuncs) vfunc->js_function.trace(tracer, "ObjectInstance::vfunc"); } +/* Removing the signal connection data from the list means that the object stops + * tracing the JS function objects belonging to the closures. Incremental GC + * does not allow that in the middle of a garbage collection. Therefore, we must + * do it in an idle handler. + */ +static gboolean +signal_connection_invalidate_idle(void *user_data) +{ + auto cd = static_cast(user_data); + cd->obj->signals.erase(cd); + g_slice_free(ConnectData, cd); + return G_SOURCE_REMOVE; +} + +static void +signal_connection_invalidated(void *data, + GClosure *closure) +{ + auto cd = static_cast(data); + cd->idle_invalidate_id = g_idle_add(signal_connection_invalidate_idle, cd); +} + static void object_instance_finalize(JSFreeOp *fop, JSObject *obj) @@ -1600,7 +1618,32 @@ bool had_toggle_up; bool had_toggle_down; - invalidate_all_signals (priv); + /* We must invalidate all signal connections now, instead of in an idle + * handler, because the object will not exist anymore when we get + * around to the idle function. We originally needed to defer these + * invalidations to an idle function since the object needs to continue + * tracing its signal connections while GC is going on. However, once + * the object is finalized, it will not be tracing them any longer + * anyway, so it's safe to do them now. + * + * This is basically the same as invalidate_all_signals(), but does not + * defer the invalidation to an idle handler. + */ + for (ConnectData *cd : priv->signals) { + /* First remove any pending invalidation, we are doing it now. */ + if (cd->idle_invalidate_id > 0) { + g_source_remove(cd->idle_invalidate_id); + } else { + /* We have to remove the invalidate notifier, which would + * otherwise schedule a new pending invalidation. */ + g_closure_remove_invalidate_notifier(cd->closure, cd, + signal_connection_invalidated); + g_closure_invalidate(cd->closure); + } + + g_slice_free(ConnectData, cd); + } + priv->signals.clear(); if (G_UNLIKELY (priv->gobj->ref_count <= 0)) { g_error("Finalizing proxy for an already freed object of type: %s.%s\n", @@ -1734,29 +1777,6 @@ return proto; } -/* Removing the signal connection data from the list means that the object stops - * tracing the JS function objects belonging to the closures. Incremental GC - * does not allow that in the middle of a garbage collection. Therefore, we must - * do it in an idle handler. - */ -static gboolean -signal_connection_invalidate_idle(void *user_data) -{ - ConnectData *connect_data = (ConnectData *) user_data; - - connect_data->obj->signals = g_list_delete_link(connect_data->obj->signals, - connect_data->link); - g_slice_free(ConnectData, connect_data); - return G_SOURCE_REMOVE; -} - -static void -signal_connection_invalidated(void *data, - GClosure *closure) -{ - g_idle_add(signal_connection_invalidate_idle, data); -} - static bool real_connect_func(JSContext *context, unsigned argc, @@ -1809,10 +1829,9 @@ if (closure == NULL) goto out; - connect_data = g_slice_new(ConnectData); - priv->signals = g_list_prepend(priv->signals, connect_data); + connect_data = g_slice_new0(ConnectData); + priv->signals.insert(connect_data); connect_data->obj = priv; - connect_data->link = priv->signals; /* This is a weak reference, and will be cleared when the closure is invalidated */ connect_data->closure = closure; g_closure_add_invalidate_notifier(closure, connect_data, signal_connection_invalidated); diff -Nru gjs-1.48.3/gjs/jsapi-util-root.h gjs-1.48.5/gjs/jsapi-util-root.h --- gjs-1.48.3/gjs/jsapi-util-root.h 2017-05-06 06:28:29.000000000 +0000 +++ gjs-1.48.5/gjs/jsapi-util-root.h 2017-06-16 00:30:32.000000000 +0000 @@ -170,11 +170,12 @@ * to remove it. */ m_has_weakref = false; - /* The object is still live across this callback. */ + /* The object is still live entering this callback. The callback + * must reset() this wrapper. */ if (m_notify) m_notify(handle(), m_data); - - reset(); + else + reset(); } public: diff -Nru gjs-1.48.3/install-sh gjs-1.48.5/install-sh --- gjs-1.48.3/install-sh 2017-05-06 07:07:35.000000000 +0000 +++ gjs-1.48.5/install-sh 2017-06-21 18:05:28.000000000 +0000 @@ -345,34 +345,41 @@ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi - rmdir "$tmpdir/d" "$tmpdir" + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; diff -Nru gjs-1.48.3/ltmain.sh gjs-1.48.5/ltmain.sh --- gjs-1.48.3/ltmain.sh 2017-05-06 07:07:29.000000000 +0000 +++ gjs-1.48.5/ltmain.sh 2017-06-21 18:05:20.000000000 +0000 @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11bem1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 +VERSION="2.4.2 Debian-2.4.2-1.11bem1" TIMESTAMP="" package_revision=1.3337 @@ -6124,7 +6124,10 @@ case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -6444,19 +6447,19 @@ # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -7349,6 +7352,9 @@ revision="$number_minor" lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; esac ;; no) diff -Nru gjs-1.48.3/m4/ax_append_compile_flags.m4 gjs-1.48.5/m4/ax_append_compile_flags.m4 --- gjs-1.48.3/m4/ax_append_compile_flags.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_append_compile_flags.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,6 +1,6 @@ -# ============================================================================ -# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html -# ============================================================================ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html +# =========================================================================== # # SYNOPSIS # @@ -41,7 +41,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -56,7 +56,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 6 +#serial 5 AC_DEFUN([AX_APPEND_COMPILE_FLAGS], [AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) diff -Nru gjs-1.48.3/m4/ax_append_flag.m4 gjs-1.48.5/m4/ax_append_flag.m4 --- gjs-1.48.3/m4/ax_append_flag.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_append_flag.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html +# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html # =========================================================================== # # SYNOPSIS @@ -34,7 +34,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -49,7 +49,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 7 +#serial 6 AC_DEFUN([AX_APPEND_FLAG], [dnl diff -Nru gjs-1.48.3/m4/ax_append_link_flags.m4 gjs-1.48.5/m4/ax_append_link_flags.m4 --- gjs-1.48.3/m4/ax_append_link_flags.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_append_link_flags.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html +# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html # =========================================================================== # # SYNOPSIS @@ -39,7 +39,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -54,7 +54,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 6 +#serial 5 AC_DEFUN([AX_APPEND_LINK_FLAGS], [AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) diff -Nru gjs-1.48.3/m4/ax_check_compile_flag.m4 gjs-1.48.5/m4/ax_check_compile_flag.m4 --- gjs-1.48.3/m4/ax_check_compile_flag.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_check_compile_flag.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS @@ -40,7 +40,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -55,7 +55,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 5 +#serial 4 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF diff -Nru gjs-1.48.3/m4/ax_check_link_flag.m4 gjs-1.48.5/m4/ax_check_link_flag.m4 --- gjs-1.48.3/m4/ax_check_link_flag.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_check_link_flag.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html # =========================================================================== # # SYNOPSIS @@ -40,7 +40,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -55,7 +55,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 5 +#serial 4 AC_DEFUN([AX_CHECK_LINK_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF diff -Nru gjs-1.48.3/m4/ax_code_coverage.m4 gjs-1.48.5/m4/ax_code_coverage.m4 --- gjs-1.48.3/m4/ax_code_coverage.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_code_coverage.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,66 +1,118 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html +# =========================================================================== +# # SYNOPSIS # # AX_CODE_COVERAGE() # # DESCRIPTION # -# Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be -# included in the CFLAGS and LIBS/LDFLAGS variables of every build target -# (program or library) which should be built with code coverage support. -# Also defines CODE_COVERAGE_RULES which should be substituted in your -# Makefile; and $enable_code_coverage which can be used in subsequent -# configure output. CODE_COVERAGE_ENABLED is defined and substituted, and -# corresponds to the value of the --enable-code-coverage option, which -# defaults to being disabled. +# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, +# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included +# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every +# build target (program or library) which should be built with code +# coverage support. Also defines CODE_COVERAGE_RULES which should be +# substituted in your Makefile; and $enable_code_coverage which can be +# used in subsequent configure output. CODE_COVERAGE_ENABLED is defined +# and substituted, and corresponds to the value of the +# --enable-code-coverage option, which defaults to being disabled. +# +# Test also for gcov program and create GCOV variable that could be +# substituted. # # Note that all optimisation flags in CFLAGS must be disabled when code # coverage is enabled. # # Usage example: +# # configure.ac: -# AX_CODE_COVERAGE +# +# AX_CODE_COVERAGE # # Makefile.am: -# @CODE_COVERAGE_RULES@ -# my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) … -# my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) … -# -# This results in a “check-code-coverage” rule being added to any Makefile.am -# which includes “@CODE_COVERAGE_RULES@” (assuming the module has been -# configured with --enable-code-coverage). Running `make check-code-coverage` -# in that directory will run the module’s test suite (`make check`) and build -# a code coverage report detailing the code which was touched, then print the -# URI for the report. +# +# @CODE_COVERAGE_RULES@ +# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... +# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... +# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... +# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... +# +# This results in a "check-code-coverage" rule being added to any +# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module +# has been configured with --enable-code-coverage). Running `make +# check-code-coverage` in that directory will run the module's test suite +# (`make check`) and build a code coverage report detailing the code which +# was touched, then print the URI for the report. +# +# In earlier versions of this macro, CODE_COVERAGE_LDFLAGS was defined +# instead of CODE_COVERAGE_LIBS. They are both still defined, but use of +# CODE_COVERAGE_LIBS is preferred for clarity; CODE_COVERAGE_LDFLAGS is +# deprecated. They have the same value. +# +# This code was derived from Makefile.decl in GLib, originally licenced +# under LGPLv2.1+. # # LICENSE # -# Copyright © 2012, 2014 Philip Withnall -# Copyright © 2012 Xan Lopez -# Copyright © 2012 Christian Persch -# Copyright © 2012 Paolo Borelli -# Copyright © 2012 Dan Winship +# Copyright (c) 2012, 2016 Philip Withnall +# Copyright (c) 2012 Xan Lopez +# Copyright (c) 2012 Christian Persch +# Copyright (c) 2012 Paolo Borelli +# Copyright (c) 2012 Dan Winship +# Copyright (c) 2015 Bastien ROUCARIES +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or (at +# your option) any later version. +# +# This library is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser +# General Public License for more details. # -# Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+. -# This file is licenced under LGPLv2.1+. +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . -#serial 1 +#serial 17 AC_DEFUN([AX_CODE_COVERAGE],[ dnl Check for --enable-code-coverage + AC_REQUIRE([AC_PROG_SED]) + + # allow to override gcov location + AC_ARG_WITH([gcov], + [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], + [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) + AC_MSG_CHECKING([whether to build with code coverage support]) - AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no) + AC_ARG_ENABLE([code-coverage], + AS_HELP_STRING([--enable-code-coverage], + [Whether to enable code coverage support]),, + enable_code_coverage=no) + AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) AC_MSG_RESULT($enable_code_coverage) AS_IF([ test "$enable_code_coverage" = "yes" ], [ + # check for gcov + AC_CHECK_TOOL([GCOV], + [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], + [:]) + AS_IF([test "X$GCOV" = "X:"], + [AC_MSG_ERROR([gcov is needed to do coverage])]) + AC_SUBST([GCOV]) + dnl Check if gcc is being used AS_IF([ test "$GCC" = "no" ], [ AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) ]) # List of supported lcov versions. - lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11" + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" AC_CHECK_PROG([LCOV], [lcov], [lcov]) AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) @@ -93,18 +145,26 @@ ]) dnl Build the code coverage flags + dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" CODE_COVERAGE_LDFLAGS="-lgcov" + CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" + AC_SUBST([CODE_COVERAGE_CPPFLAGS]) AC_SUBST([CODE_COVERAGE_CFLAGS]) + AC_SUBST([CODE_COVERAGE_CXXFLAGS]) + AC_SUBST([CODE_COVERAGE_LIBS]) AC_SUBST([CODE_COVERAGE_LDFLAGS]) ]) -CODE_COVERAGE_RULES=' +[CODE_COVERAGE_RULES=' # Code coverage # # Optional: # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. # (Default: $(top_builddir)) # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated # by lcov for code coverage. (Default: @@ -112,10 +172,26 @@ # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage # reports to be created. (Default: # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance. +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. # (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: empty) +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore # # The generated report will be titled using the $(PACKAGE_NAME) and @@ -126,19 +202,44 @@ CODE_COVERAGE_DIRECTORY ?= $(top_builddir) CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage -CODE_COVERAGE_LCOV_OPTIONS ?= -CODE_COVERAGE_GENHTML_OPTIONS ?= +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) CODE_COVERAGE_IGNORE_PATTERN ?= +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); code_coverage_quiet = $(code_coverage_quiet_$(V)) code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) code_coverage_quiet_0 = --quiet +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + # Use recursive makes in order to ignore errors during check check-code-coverage: ifeq ($(CODE_COVERAGE_ENABLED),yes) - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture else @echo "Need to reconfigure with --enable-code-coverage" endif @@ -146,10 +247,10 @@ # Capture code coverage data code-coverage-capture: code-coverage-capture-hook ifeq ($(CODE_COVERAGE_ENABLED),yes) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" else @echo "Need to reconfigure with --enable-code-coverage" @@ -160,20 +261,21 @@ ifeq ($(CODE_COVERAGE_ENABLED),yes) clean: code-coverage-clean +distclean: code-coverage-clean code-coverage-clean: -$(LCOV) --directory $(top_builddir) -z -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . -name "*.gcda" -o -name "*.gcov" -delete + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete endif GITIGNOREFILES ?= GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) -DISTCHECK_CONFIGURE_FLAGS ?= -DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean -' +'] AC_SUBST([CODE_COVERAGE_RULES]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) diff -Nru gjs-1.48.3/m4/ax_compiler_flags_cflags.m4 gjs-1.48.5/m4/ax_compiler_flags_cflags.m4 --- gjs-1.48.3/m4/ax_compiler_flags_cflags.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_compiler_flags_cflags.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,6 +1,6 @@ -# ============================================================================= -# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html -# ============================================================================= +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html +# ============================================================================ # # SYNOPSIS # @@ -25,7 +25,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 13 +#serial 11 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ AC_REQUIRE([AC_PROG_SED]) @@ -34,7 +34,7 @@ AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) # Variable names - m4_define([ax_warn_cflags_variable], + m4_define(ax_warn_cflags_variable, [m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))]) AC_LANG_PUSH([C]) diff -Nru gjs-1.48.3/m4/ax_compiler_flags_cxxflags.m4 gjs-1.48.5/m4/ax_compiler_flags_cxxflags.m4 --- gjs-1.48.3/m4/ax_compiler_flags_cxxflags.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_compiler_flags_cxxflags.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,6 +1,6 @@ -# =============================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html -# =============================================================================== +# ============================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html +# ============================================================================== # # SYNOPSIS # @@ -26,7 +26,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 9 +#serial 7 AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ AC_REQUIRE([AC_PROG_SED]) @@ -35,7 +35,7 @@ AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) # Variable names - m4_define([ax_warn_cxxflags_variable], + m4_define(ax_warn_cxxflags_variable, [m4_normalize(ifelse([$1],,[WARN_CXXFLAGS],[$1]))]) AC_LANG_PUSH([C++]) diff -Nru gjs-1.48.3/m4/ax_compiler_flags_gir.m4 gjs-1.48.5/m4/ax_compiler_flags_gir.m4 --- gjs-1.48.3/m4/ax_compiler_flags_gir.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_compiler_flags_gir.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html +# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html # =========================================================================== # # SYNOPSIS @@ -26,13 +26,13 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 6 +#serial 4 AC_DEFUN([AX_COMPILER_FLAGS_GIR],[ AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) # Variable names - m4_define([ax_warn_scannerflags_variable], + m4_define(ax_warn_scannerflags_variable, [m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))]) # Base flags diff -Nru gjs-1.48.3/m4/ax_compiler_flags_ldflags.m4 gjs-1.48.5/m4/ax_compiler_flags_ldflags.m4 --- gjs-1.48.3/m4/ax_compiler_flags_ldflags.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_compiler_flags_ldflags.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,6 +1,6 @@ -# ============================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html -# ============================================================================== +# ============================================================================= +# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html +# ============================================================================= # # SYNOPSIS # @@ -25,16 +25,15 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 8 +#serial 5 AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS]) AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) - AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) # Variable names - m4_define([ax_warn_ldflags_variable], + m4_define(ax_warn_ldflags_variable, [m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))]) # Always pass -Werror=unknown-warning-option to get Clang to fail on bad @@ -48,25 +47,9 @@ ax_compiler_flags_test="" ]) - # macOS linker does not have --as-needed - AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [ - ax_compiler_flags_as_needed_option="-Wl,--no-as-needed" - ], [ - ax_compiler_flags_as_needed_option="" - ]) - - # macOS linker speaks with a different accent - ax_compiler_flags_fatal_warnings_option="" - AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [ - ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings" - ]) - AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [ - ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings" - ]) - # Base flags AX_APPEND_LINK_FLAGS([ dnl - $ax_compiler_flags_as_needed_option dnl + -Wl,--no-as-needed dnl $3 dnl ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) @@ -83,7 +66,7 @@ # suggest-attribute=format is disabled because it gives too many false # positives AX_APPEND_LINK_FLAGS([ dnl - $ax_compiler_flags_fatal_warnings_option dnl + -Wl,--fatal-warnings dnl ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) ]) diff -Nru gjs-1.48.3/m4/ax_compiler_flags.m4 gjs-1.48.5/m4/ax_compiler_flags.m4 --- gjs-1.48.3/m4/ax_compiler_flags.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_compiler_flags.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html +# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html # =========================================================================== # # SYNOPSIS @@ -101,7 +101,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 14 +#serial 13 # _AX_COMPILER_FLAGS_LANG([LANGNAME]) m4_defun([_AX_COMPILER_FLAGS_LANG], diff -Nru gjs-1.48.3/m4/ax_cxx_compile_stdcxx_11.m4 gjs-1.48.5/m4/ax_cxx_compile_stdcxx_11.m4 --- gjs-1.48.3/m4/ax_cxx_compile_stdcxx_11.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_cxx_compile_stdcxx_11.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,6 +1,6 @@ -# ============================================================================= -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html -# ============================================================================= +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# ============================================================================ # # SYNOPSIS # @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 18 +#serial 17 AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) diff -Nru gjs-1.48.3/m4/ax_cxx_compile_stdcxx.m4 gjs-1.48.5/m4/ax_cxx_compile_stdcxx.m4 --- gjs-1.48.3/m4/ax_cxx_compile_stdcxx.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_cxx_compile_stdcxx.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html # =========================================================================== # # SYNOPSIS @@ -33,23 +33,21 @@ # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler -# Copyright (c) 2016 Krzesimir Nowak # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 7 +#serial 4 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). -AX_REQUIRE_DEFINED([AC_MSG_WARN]) AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl - m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], - [$1], [14], [ax_cxx_compile_alternatives="14 1y"], - [$1], [17], [ax_cxx_compile_alternatives="17 1z"], + m4_if([$1], [11], [], + [$1], [14], [], + [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$2], [], [], [$2], [ext], [], @@ -72,8 +70,7 @@ m4_if([$2], [noext], [], [dnl if test x$ac_success = xno; then - for alternative in ${ax_cxx_compile_alternatives}; do - switch="-std=gnu++${alternative}" + for switch in -std=gnu++$1 -std=gnu++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, @@ -99,27 +96,22 @@ dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf dnl Cray's crayCC needs "-h std=c++11" - for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, - $cachevar, - [ac_save_CXX="$CXX" - CXX="$CXX $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXX="$ac_save_CXX"]) - if eval test x\$$cachevar = xyes; then - CXX="$CXX $switch" - if test -n "$CXXCPP" ; then - CXXCPP="$CXXCPP $switch" - fi - ac_success=yes - break + for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" fi - done - if test x$ac_success = xyes; then + ac_success=yes break fi done @@ -139,7 +131,6 @@ [define if the compiler supports basic C++$1 syntax]) fi AC_SUBST(HAVE_CXX$1) - m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])]) ]) @@ -157,11 +148,6 @@ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 ) -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], - _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 - _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 -) dnl Tests for new features in C++11 @@ -532,7 +518,7 @@ } - namespace test_digit_separators + namespace test_digit_seperators { constexpr auto ten_million = 100'000'000; @@ -574,409 +560,3 @@ #endif // __cplusplus >= 201402L ]]) - - -dnl Tests for new features in C++17 - -m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ - -// If the compiler admits that it is not ready for C++17, why torture it? -// Hopefully, this will speed up the test. - -#ifndef __cplusplus - -#error "This is not a C++ compiler" - -#elif __cplusplus <= 201402L - -#error "This is not a C++17 compiler" - -#else - -#if defined(__clang__) - #define REALLY_CLANG -#else - #if defined(__GNUC__) - #define REALLY_GCC - #endif -#endif - -#include -#include -#include - -namespace cxx17 -{ - -#if !defined(REALLY_CLANG) - namespace test_constexpr_lambdas - { - - // TODO: test it with clang++ from git - - constexpr int foo = [](){return 42;}(); - - } -#endif // !defined(REALLY_CLANG) - - namespace test::nested_namespace::definitions - { - - } - - namespace test_fold_expression - { - - template - int multiply(Args... args) - { - return (args * ... * 1); - } - - template - bool all(Args... args) - { - return (args && ...); - } - - } - - namespace test_extended_static_assert - { - - static_assert (true); - - } - - namespace test_auto_brace_init_list - { - - auto foo = {5}; - auto bar {5}; - - static_assert(std::is_same, decltype(foo)>::value); - static_assert(std::is_same::value); - } - - namespace test_typename_in_template_template_parameter - { - - template typename X> struct D; - - } - - namespace test_fallthrough_nodiscard_maybe_unused_attributes - { - - int f1() - { - return 42; - } - - [[nodiscard]] int f2() - { - [[maybe_unused]] auto unused = f1(); - - switch (f1()) - { - case 17: - f1(); - [[fallthrough]]; - case 42: - f1(); - } - return f1(); - } - - } - - namespace test_extended_aggregate_initialization - { - - struct base1 - { - int b1, b2 = 42; - }; - - struct base2 - { - base2() { - b3 = 42; - } - int b3; - }; - - struct derived : base1, base2 - { - int d; - }; - - derived d1 {{1, 2}, {}, 4}; // full initialization - derived d2 {{}, {}, 4}; // value-initialized bases - - } - - namespace test_general_range_based_for_loop - { - - struct iter - { - int i; - - int& operator* () - { - return i; - } - - const int& operator* () const - { - return i; - } - - iter& operator++() - { - ++i; - return *this; - } - }; - - struct sentinel - { - int i; - }; - - bool operator== (const iter& i, const sentinel& s) - { - return i.i == s.i; - } - - bool operator!= (const iter& i, const sentinel& s) - { - return !(i == s); - } - - struct range - { - iter begin() const - { - return {0}; - } - - sentinel end() const - { - return {5}; - } - }; - - void f() - { - range r {}; - - for (auto i : r) - { - [[maybe_unused]] auto v = i; - } - } - - } - - namespace test_lambda_capture_asterisk_this_by_value - { - - struct t - { - int i; - int foo() - { - return [*this]() - { - return i; - }(); - } - }; - - } - - namespace test_enum_class_construction - { - - enum class byte : unsigned char - {}; - - byte foo {42}; - - } - - namespace test_constexpr_if - { - - template - int f () - { - if constexpr(cond) - { - return 13; - } - else - { - return 42; - } - } - - } - - namespace test_selection_statement_with_initializer - { - - int f() - { - return 13; - } - - int f2() - { - if (auto i = f(); i > 0) - { - return 3; - } - - switch (auto i = f(); i + 4) - { - case 17: - return 2; - - default: - return 1; - } - } - - } - -#if !defined(REALLY_CLANG) - namespace test_template_argument_deduction_for_class_templates - { - - // TODO: test it with clang++ from git - - template - struct pair - { - pair (T1 p1, T2 p2) - : m1 {p1}, - m2 {p2} - {} - - T1 m1; - T2 m2; - }; - - void f() - { - [[maybe_unused]] auto p = pair{13, 42u}; - } - - } -#endif // !defined(REALLY_CLANG) - - namespace test_non_type_auto_template_parameters - { - - template - struct B - {}; - - B<5> b1; - B<'a'> b2; - - } - -#if !defined(REALLY_CLANG) - namespace test_structured_bindings - { - - // TODO: test it with clang++ from git - - int arr[2] = { 1, 2 }; - std::pair pr = { 1, 2 }; - - auto f1() -> int(&)[2] - { - return arr; - } - - auto f2() -> std::pair& - { - return pr; - } - - struct S - { - int x1 : 2; - volatile double y1; - }; - - S f3() - { - return {}; - } - - auto [ x1, y1 ] = f1(); - auto& [ xr1, yr1 ] = f1(); - auto [ x2, y2 ] = f2(); - auto& [ xr2, yr2 ] = f2(); - const auto [ x3, y3 ] = f3(); - - } -#endif // !defined(REALLY_CLANG) - -#if !defined(REALLY_CLANG) - namespace test_exception_spec_type_system - { - - // TODO: test it with clang++ from git - - struct Good {}; - struct Bad {}; - - void g1() noexcept; - void g2(); - - template - Bad - f(T*, T*); - - template - Good - f(T1*, T2*); - - static_assert (std::is_same_v); - - } -#endif // !defined(REALLY_CLANG) - - namespace test_inline_variables - { - - template void f(T) - {} - - template inline T g(T) - { - return T{}; - } - - template<> inline void f<>(int) - {} - - template<> int g<>(int) - { - return 5; - } - - } - -} // namespace cxx17 - -#endif // __cplusplus <= 201402L - -]]) diff -Nru gjs-1.48.3/m4/ax_is_release.m4 gjs-1.48.5/m4/ax_is_release.m4 --- gjs-1.48.3/m4/ax_is_release.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_is_release.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_is_release.html +# http://www.gnu.org/software/autoconf-archive/ax_is_release.html # =========================================================================== # # SYNOPSIS @@ -26,10 +26,6 @@ # * micro-version: ax_is_release will be 'no' if the micro version number # in $PACKAGE_VERSION is odd; this assumes # $PACKAGE_VERSION follows the 'major.minor.micro' scheme -# * dash-version: ax_is_release will be 'no' if there is a dash '-' -# in $PACKAGE_VERSION, for example 1.2-pre3, 1.2.42-a8b9 -# or 2.0-dirty (in particular this is suitable for use -# with git-version-gen) # * always: ax_is_release will always be 'yes' # * never: ax_is_release will always be 'no' # @@ -38,13 +34,12 @@ # LICENSE # # Copyright (c) 2015 Philip Withnall -# Copyright (c) 2016 Collabora Ltd. # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. -#serial 7 +#serial 4 AC_DEFUN([AX_IS_RELEASE],[ AC_BEFORE([AC_INIT],[$0]) @@ -52,7 +47,7 @@ m4_case([$1], [git-directory],[ # $is_release = (.git directory does not exist) - AS_IF([test -d ${srcdir}/.git],[ax_is_release=no],[ax_is_release=yes]) + AS_IF([test -d ${top_srcdir}/.git],[ax_is_release=no],[ax_is_release=yes]) ], [minor-version],[ # $is_release = ($minor_version is even) @@ -66,15 +61,9 @@ AS_IF([test "$(( $micro_version % 2 ))" -ne 0], [ax_is_release=no],[ax_is_release=yes]) ], - [dash-version],[ - # $is_release = ($PACKAGE_VERSION has a dash) - AS_CASE([$PACKAGE_VERSION], - [*-*], [ax_is_release=no], - [*], [ax_is_release=yes]) - ], [always],[ax_is_release=yes], [never],[ax_is_release=no], [ - AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version, micro-version, dash-version, always, never.]) + AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version.]) ]) ]) diff -Nru gjs-1.48.3/m4/ax_pkg_check_modules.m4 gjs-1.48.5/m4/ax_pkg_check_modules.m4 --- gjs-1.48.3/m4/ax_pkg_check_modules.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_pkg_check_modules.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_pkg_check_modules.html +# http://www.gnu.org/software/autoconf-archive/ax_pkg_check_modules.html # =========================================================================== # # SYNOPSIS @@ -50,7 +50,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 3 +#serial 2 AC_DEFUN([AX_PKG_CHECK_MODULES],[ m4_define([ax_package_requires], diff -Nru gjs-1.48.3/m4/ax_require_defined.m4 gjs-1.48.5/m4/ax_require_defined.m4 --- gjs-1.48.3/m4/ax_require_defined.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/ax_require_defined.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,5 +1,5 @@ # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html +# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html # =========================================================================== # # SYNOPSIS @@ -30,7 +30,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 2 +#serial 1 AC_DEFUN([AX_REQUIRE_DEFINED], [dnl m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) diff -Nru gjs-1.48.3/m4/libtool.m4 gjs-1.48.5/m4/libtool.m4 --- gjs-1.48.3/m4/libtool.m4 2017-05-06 07:07:29.000000000 +0000 +++ gjs-1.48.5/m4/libtool.m4 2017-06-21 18:05:20.000000000 +0000 @@ -1312,7 +1312,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1324,9 +1324,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1355,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1688,7 +1701,8 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -2512,17 +2526,6 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -2639,7 +2642,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -2684,6 +2687,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3243,10 +3258,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3285,11 +3296,11 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4037,7 +4048,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4101,7 +4112,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4336,7 +4347,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4578,6 +4589,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4640,6 +4654,9 @@ openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4861,7 +4878,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5038,6 +5055,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then @@ -5342,7 +5360,7 @@ _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -6222,9 +6240,6 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -6386,7 +6401,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler diff -Nru gjs-1.48.3/m4/pkg.m4 gjs-1.48.5/m4/pkg.m4 --- gjs-1.48.3/m4/pkg.m4 2017-04-24 19:46:09.000000000 +0000 +++ gjs-1.48.5/m4/pkg.m4 2017-04-24 23:53:44.000000000 +0000 @@ -1,29 +1,60 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -45,18 +76,19 @@ PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -66,8 +98,10 @@ $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -79,10 +113,11 @@ else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -90,19 +125,17 @@ else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -156,16 +189,40 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])dnl PKG_CHECK_MODULES -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -176,16 +233,18 @@ AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR +])dnl PKG_INSTALLDIR -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -196,13 +255,15 @@ AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR +])dnl PKG_NOARCH_INSTALLDIR -# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------- -# Retrieves the value of the pkg-config variable for the given module. +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl @@ -211,4 +272,4 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl -])# PKG_CHECK_VAR +])dnl PKG_CHECK_VAR diff -Nru gjs-1.48.3/Makefile.in gjs-1.48.5/Makefile.in --- gjs-1.48.3/Makefile.in 2017-05-06 07:07:35.000000000 +0000 +++ gjs-1.48.5/Makefile.in 2017-06-21 18:05:28.000000000 +0000 @@ -683,8 +683,11 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CODE_COVERAGE_LIBS = @CODE_COVERAGE_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -705,6 +708,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GCOV = @GCOV@ GENHTML = @GENHTML@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GI_DATADIR = @GI_DATADIR@ diff -Nru gjs-1.48.3/modules/tweener/tweener.js gjs-1.48.5/modules/tweener/tweener.js --- gjs-1.48.3/modules/tweener/tweener.js 2017-04-24 19:46:06.000000000 +0000 +++ gjs-1.48.5/modules/tweener/tweener.js 2017-06-16 00:27:12.000000000 +0000 @@ -535,7 +535,7 @@ copyProperties[istr] = new PropertyInfo(properties[istr].valueStart, properties[istr].valueComplete, properties[istr].valueComplete, - properties[istr].arrayIndex, + properties[istr].arrayIndex || 0, {}, properties[istr].isSpecialProperty, properties[istr].modifierFunction, diff -Nru gjs-1.48.3/NEWS gjs-1.48.5/NEWS --- gjs-1.48.3/NEWS 2017-05-06 07:04:09.000000000 +0000 +++ gjs-1.48.5/NEWS 2017-06-21 18:33:37.000000000 +0000 @@ -1,3 +1,22 @@ +Version 1.48.5 +-------------- + +- Closed bugs: + + * GJS crash in needsPostBarrier, possible access from wrong thread [#783935, + Philip Chimento] + +- Fix format string, caught by static analysis [Claudio André] +- Fixes for regression in 1.48.4 [Philip Chimento] + +Version 1.48.4 +-------------- + +- Closed bugs: + + * gnome-shell 3.24.1 crash on wayland [#781799, Philip Chimento]; thanks to + everyone who contributed clues + Version 1.48.3 -------------- diff -Nru gjs-1.48.3/test/gjs-test-coverage.cpp gjs-1.48.5/test/gjs-test-coverage.cpp --- gjs-1.48.3/test/gjs-test-coverage.cpp 2017-04-24 19:46:06.000000000 +0000 +++ gjs-1.48.5/test/gjs-test-coverage.cpp 2017-06-21 18:03:50.000000000 +0000 @@ -902,7 +902,7 @@ max_buf_size = strcspn(line, "\n"); detected_function = g_new(char, max_buf_size + 1); - nmatches = sscanf(line, "%i,%s", &hit_count, detected_function); + nmatches = sscanf(line, "%u,%s", &hit_count, detected_function); if (nmatches != 2) { if (errno != 0) g_error("sscanf: %s", strerror(errno)); diff -Nru gjs-1.48.3/test/gjs-test-rooting.cpp gjs-1.48.5/test/gjs-test-rooting.cpp --- gjs-1.48.3/test/gjs-test-rooting.cpp 2017-05-06 06:28:29.000000000 +0000 +++ gjs-1.48.5/test/gjs-test-rooting.cpp 2017-06-16 00:30:32.000000000 +0000 @@ -13,6 +13,8 @@ bool finalized; bool notify_called; + + GjsMaybeOwned *obj; /* only used in callback test cases */ }; static void @@ -220,6 +222,7 @@ g_assert_false(fx->notify_called); g_assert_false(fx->finalized); fx->notify_called = true; + fx->obj->reset(); } static void @@ -233,24 +236,24 @@ test_maybe_owned_notify_callback_called_on_context_destroy(GjsRootingFixture *fx, gconstpointer unused) { - auto obj = new GjsMaybeOwned(); - obj->root(PARENT(fx)->cx, test_obj_new(fx), context_destroyed, fx); + fx->obj = new GjsMaybeOwned(); + fx->obj->root(PARENT(fx)->cx, test_obj_new(fx), context_destroyed, fx); gjs_unit_test_destroy_context(PARENT(fx)); g_assert_true(fx->notify_called); - delete obj; + delete fx->obj; } static void test_maybe_owned_object_destroyed_after_notify(GjsRootingFixture *fx, gconstpointer unused) { - auto obj = new GjsMaybeOwned(); - obj->root(PARENT(fx)->cx, test_obj_new(fx), context_destroyed, fx); + fx->obj = new GjsMaybeOwned(); + fx->obj->root(PARENT(fx)->cx, test_obj_new(fx), context_destroyed, fx); gjs_unit_test_destroy_context(PARENT(fx)); g_assert_true(fx->finalized); - delete obj; + delete fx->obj; } void diff -Nru gjs-1.48.3/win32/config.h.win32 gjs-1.48.5/win32/config.h.win32 --- gjs-1.48.3/win32/config.h.win32 2017-05-06 07:07:48.000000000 +0000 +++ gjs-1.48.5/win32/config.h.win32 2017-06-21 18:05:35.000000000 +0000 @@ -13,7 +13,7 @@ #define GETTEXT_PACKAGE "gjs" /* The gjs version as an integer */ -#define GJS_VERSION 14803 +#define GJS_VERSION 14805 /* define if the compiler supports basic C++11 syntax */ #define HAVE_CXX11 1 @@ -74,7 +74,7 @@ #define PACKAGE_NAME "gjs" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gjs 1.48.3" +#define PACKAGE_STRING "gjs 1.48.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gjs" @@ -83,10 +83,10 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.48.3" +#define PACKAGE_VERSION "1.48.5" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.48.3" +#define VERSION "1.48.5"