diff -Nru bamf-0.2.104/configure bamf-0.2.106/configure --- bamf-0.2.104/configure 2011-09-26 11:44:34.000000000 +0000 +++ bamf-0.2.106/configure 2012-01-12 15:14:54.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for bamf 0.2.104. +# Generated by GNU Autoconf 2.68 for bamf 0.2.106. # # Report bugs to . # @@ -570,8 +570,8 @@ # Identity of this package. PACKAGE_NAME='bamf' PACKAGE_TARNAME='bamf' -PACKAGE_VERSION='0.2.104' -PACKAGE_STRING='bamf 0.2.104' +PACKAGE_VERSION='0.2.106' +PACKAGE_STRING='bamf 0.2.106' PACKAGE_BUGREPORT='dx-team@canonical.com' PACKAGE_URL='' @@ -621,6 +621,10 @@ BAMFDAEMON_CFLAGS GTK_LIBS GTK_CFLAGS +DBUS_LAUNCH +XVFB +ENABLE_HEADLESS_TESTS_FALSE +ENABLE_HEADLESS_TESTS_TRUE GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE @@ -803,6 +807,7 @@ enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf +enable_headless_tests enable_gtktest ' ac_precious_vars='build_alias @@ -1373,7 +1378,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 bamf 0.2.104 to adapt to many kinds of systems. +\`configure' configures bamf 0.2.106 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1443,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bamf 0.2.104:";; + short | recursive ) echo "Configuration of bamf 0.2.106:";; esac cat <<\_ACEOF @@ -1468,12 +1473,15 @@ --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] + --enable-headless-tests=[no/yes] + enable headless test suite (requires Xvfb) + [default=no] --disable-gtktest do not try to compile and run a test GTK+ program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1580,7 +1588,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bamf configure 0.2.104 +bamf configure 0.2.106 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1858,7 +1866,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bamf $as_me 0.2.104, which was +It was created by bamf $as_me 0.2.106, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2679,7 +2687,7 @@ # Define the identity of the package. PACKAGE='bamf' - VERSION='0.2.104' + VERSION='0.2.106' cat >>confdefs.h <<_ACEOF @@ -3963,8 +3971,8 @@ -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -4809,6 +4817,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -4848,7 +4861,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -5277,7 +5290,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -5917,13 +5930,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -6070,6 +6083,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -6458,7 +6472,7 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -6469,7 +6483,20 @@ case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -7109,7 +7136,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7120,6 +7153,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -7152,6 +7186,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -7173,7 +7208,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -7548,7 +7585,22 @@ # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -7626,6 +7678,10 @@ + + + + test -z "$LN_S" && LN_S="ln -s" @@ -8085,7 +8141,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -8176,18 +8234,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -8549,7 +8622,6 @@ hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -8802,8 +8874,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -9183,6 +9254,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -9228,6 +9300,7 @@ hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -9256,10 +9329,6 @@ hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -9272,7 +9341,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9311,7 +9380,6 @@ fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -9935,11 +10003,6 @@ - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -10029,7 +10092,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -10038,7 +10101,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -10103,7 +10166,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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' @@ -10242,7 +10305,7 @@ ;; dgux*) - version_type=linux + 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' @@ -10250,10 +10313,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -10261,7 +10320,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10279,7 +10338,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -10299,7 +10358,7 @@ ;; gnu*) - version_type=linux + 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}' @@ -10310,7 +10369,7 @@ ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -10371,7 +10430,7 @@ ;; interix[3-9]*) - version_type=linux + 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}' @@ -10387,7 +10446,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -10424,9 +10483,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + 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}' @@ -10520,7 +10579,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -10589,7 +10648,7 @@ ;; solaris*) - version_type=linux + 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}' @@ -10614,7 +10673,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -10638,7 +10697,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -10669,7 +10728,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + 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}' @@ -10679,7 +10738,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -11461,6 +11520,8 @@ + + ac_config_commands="$ac_config_commands libtool" @@ -12683,12 +12744,12 @@ pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0" 2>/dev/null` + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12700,12 +12761,12 @@ pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0" 2>/dev/null` + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12726,14 +12787,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0" 2>&1` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0) were not met: $GLIB_PKG_ERRORS @@ -13948,6 +14009,108 @@ +########################### +# Headless tests +########################### +# Check whether --enable-headless-tests was given. +if test "${enable_headless_tests+set}" = set; then : + enableval=$enable_headless_tests; +else + enable_headless_tests=no +fi + + + if test "x$enable_headless_tests" != "xno"; then + ENABLE_HEADLESS_TESTS_TRUE= + ENABLE_HEADLESS_TESTS_FALSE='#' +else + ENABLE_HEADLESS_TESTS_TRUE='#' + ENABLE_HEADLESS_TESTS_FALSE= +fi + + +if test "x$enable_headless_tests" = "xyes"; then + # Extract the first word of "Xvfb", so it can be a program name with args. +set dummy Xvfb; 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_path_XVFB+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $XVFB in + [\\/]* | ?:[\\/]*) + ac_cv_path_XVFB="$XVFB" # Let the user override the test with a path. + ;; + *) + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XVFB="$as_dir/$ac_word$ac_exec_ext" + $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 + + ;; +esac +fi +XVFB=$ac_cv_path_XVFB +if test -n "$XVFB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XVFB" >&5 +$as_echo "$XVFB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "dbus-launch", so it can be a program name with args. +set dummy dbus-launch; 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_path_DBUS_LAUNCH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DBUS_LAUNCH in + [\\/]* | ?:[\\/]*) + ac_cv_path_DBUS_LAUNCH="$DBUS_LAUNCH" # Let the user override the test with a path. + ;; + *) + 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DBUS_LAUNCH="$as_dir/$ac_word$ac_exec_ext" + $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 + + ;; +esac +fi +DBUS_LAUNCH=$ac_cv_path_DBUS_LAUNCH +if test -n "$DBUS_LAUNCH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LAUNCH" >&5 +$as_echo "$DBUS_LAUNCH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi # # Gnome/GTK checks @@ -14647,6 +14810,10 @@ as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_HEADLESS_TESTS_TRUE}" && test -z "${ENABLE_HEADLESS_TESTS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_HEADLESS_TESTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -15056,7 +15223,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bamf $as_me 0.2.104, which was +This file was extended by bamf $as_me 0.2.106, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15122,7 +15289,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bamf config.status 0.2.104 +bamf config.status 0.2.106 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -15259,6 +15426,7 @@ enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -15341,7 +15509,6 @@ allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -15397,6 +15564,7 @@ # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -15447,7 +15615,6 @@ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -16254,8 +16421,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -16309,6 +16476,9 @@ # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -16610,10 +16780,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator @@ -16910,4 +17076,6 @@ Build Environment Install Prefix: ${prefix} GTK+ Version: ${with_gtk} + Headless tests: ${enable_headless_tests} + EOF diff -Nru bamf-0.2.104/configure.in bamf-0.2.106/configure.in --- bamf-0.2.104/configure.in 2011-09-26 11:44:18.000000000 +0000 +++ bamf-0.2.106/configure.in 2012-01-12 15:07:13.000000000 +0000 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) -AC_INIT(bamf, 0.2.104, dx-team@canonical.com) +AC_INIT(bamf, 0.2.106, dx-team@canonical.com) AC_PREREQ(2.62) AC_CONFIG_SRCDIR(src/main.c) @@ -56,7 +56,7 @@ # # glib # -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0 gio-2.0 gio-unix-2.0) +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28.0 gio-2.0 gio-unix-2.0) # # dbus @@ -114,6 +114,19 @@ ########################### GTK_DOC_CHECK(1.0) +########################### +# Headless tests +########################### +AC_ARG_ENABLE([headless-tests], + AS_HELP_STRING([--enable-headless-tests=@<:@no/yes@:>@],[enable headless test suite (requires Xvfb) @<:@default=no@:>@]),, + [enable_headless_tests=no]) + +AM_CONDITIONAL([ENABLE_HEADLESS_TESTS],[test "x$enable_headless_tests" != "xno"]) + +if test "x$enable_headless_tests" = "xyes"; then + AC_PATH_PROG([XVFB],[Xvfb]) + AC_PATH_PROG([DBUS_LAUNCH],[dbus-launch]) +fi # # Gnome/GTK checks @@ -157,4 +170,6 @@ Build Environment Install Prefix: ${prefix} GTK+ Version: ${with_gtk} + Headless tests: ${enable_headless_tests} + EOF diff -Nru bamf-0.2.104/data/Makefile.in bamf-0.2.106/data/Makefile.in --- bamf-0.2.104/data/Makefile.in 2011-09-26 11:44:35.000000000 +0000 +++ bamf-0.2.106/data/Makefile.in 2012-01-12 15:14:55.000000000 +0000 @@ -93,6 +93,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -173,6 +174,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/debian/changelog bamf-0.2.106/debian/changelog --- bamf-0.2.104/debian/changelog 2011-09-26 11:51:22.000000000 +0000 +++ bamf-0.2.106/debian/changelog 2012-01-31 17:46:40.000000000 +0000 @@ -1,3 +1,25 @@ +bamf (0.2.106-0ubuntu1linaro1) oneiric; urgency=low + + * Backport from Precise + + -- Ricardo Salveti de Araujo Tue, 31 Jan 2012 15:46:22 -0200 + +bamf (0.2.106-0ubuntu1) precise; urgency=low + + * New upstream release. + - Unity acts not as a dock for LibreOffice but as a launcher (LP: #741995) + - Libreoffice Calc icon does not appear when opened via Writer + (LP: #861355) + - Bamf Ignores some local .desktop files with OnlyShowIn flag + (LP: #863290) + - Libreoffice and unity integration broken. (LP: #842566) + * debian/control, debian/rules: + - enable headless tests build + * debian/control: + - bump libglib2.0-dev to 2.28 + + -- Didier Roche Thu, 12 Jan 2012 17:01:43 +0100 + bamf (0.2.104-0ubuntu1) oneiric; urgency=low * New upstream release. diff -Nru bamf-0.2.104/debian/control bamf-0.2.106/debian/control --- bamf-0.2.104/debian/control 2011-09-26 11:40:58.000000000 +0000 +++ bamf-0.2.106/debian/control 2012-01-12 15:59:18.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: Ubuntu Core Developers Build-Depends: debhelper (>= 8.1.2ubuntu2), cdbs (>= 0.4.90ubuntu9), - libglib2.0-dev (>= 2.23.0-1ubuntu3~), + libglib2.0-dev (>= 2.28.0~), libwnck-dev, libwnck-3-dev, libgtop2-dev, @@ -20,6 +20,8 @@ gir1.2-gtk-3.0 (>= 3.0.0), gir1.2-pango-1.0, gir1.2-wnck-1.0, + xvfb, + dbus-x11, Standards-Version: 3.9.2 Homepage: https://launchpad.net/bamf Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/bamf/ubuntu diff -Nru bamf-0.2.104/debian/rules bamf-0.2.106/debian/rules --- bamf-0.2.104/debian/rules 2011-08-04 07:16:11.000000000 +0000 +++ bamf-0.2.106/debian/rules 2011-11-28 10:47:44.000000000 +0000 @@ -13,6 +13,7 @@ DEB_CONFIGURE_EXTRA_FLAGS_gtk3 = --with-gtk=3 DEB_CONFIGURE_EXTRA_FLAGS += --enable-introspection=no --enable-gtk-doc \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ + --enable-headless-tests \ $(DEB_CONFIGURE_EXTRA_FLAGS_$(cdbs_make_curflavor)) # install flavors on top of each other (gtk3 wins because it is last) diff -Nru bamf-0.2.104/doc/Makefile.in bamf-0.2.106/doc/Makefile.in --- bamf-0.2.104/doc/Makefile.in 2011-09-26 11:44:35.000000000 +0000 +++ bamf-0.2.106/doc/Makefile.in 2012-01-12 15:14:55.000000000 +0000 @@ -109,6 +109,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -189,6 +190,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/doc/reference/libbamf/Makefile.in bamf-0.2.106/doc/reference/libbamf/Makefile.in --- bamf-0.2.104/doc/reference/libbamf/Makefile.in 2011-09-26 11:44:35.000000000 +0000 +++ bamf-0.2.106/doc/reference/libbamf/Makefile.in 2012-01-12 15:14:55.000000000 +0000 @@ -76,6 +76,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -156,6 +157,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/doc/reference/Makefile.in bamf-0.2.106/doc/reference/Makefile.in --- bamf-0.2.104/doc/reference/Makefile.in 2011-09-26 11:44:35.000000000 +0000 +++ bamf-0.2.106/doc/reference/Makefile.in 2012-01-12 15:14:55.000000000 +0000 @@ -109,6 +109,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -189,6 +190,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/lib/libbamf/bamf-matcher.c bamf-0.2.106/lib/libbamf/bamf-matcher.c --- bamf-0.2.104/lib/libbamf/bamf-matcher.c 2011-03-17 15:45:53.000000000 +0000 +++ bamf-0.2.106/lib/libbamf/bamf-matcher.c 2012-01-12 15:06:32.000000000 +0000 @@ -128,8 +128,7 @@ view = bamf_factory_view_for_path (bamf_factory_get_default (), path); g_object_ref (view); - if (!bamf_view_is_sticky (view)) - g_signal_emit (matcher, matcher_signals[VIEW_OPENED],0, view); + g_signal_emit (matcher, matcher_signals[VIEW_OPENED], 0, view); } static void @@ -145,8 +144,7 @@ if (!BAMF_IS_VIEW (view)) return; - if (!bamf_view_is_sticky (view)) - g_signal_emit (matcher, matcher_signals[VIEW_CLOSED],0, view); + g_signal_emit (matcher, matcher_signals[VIEW_CLOSED], 0, view); g_object_unref (view); } diff -Nru bamf-0.2.104/lib/libbamf/Makefile.in bamf-0.2.106/lib/libbamf/Makefile.in --- bamf-0.2.104/lib/libbamf/Makefile.in 2011-09-26 11:44:35.000000000 +0000 +++ bamf-0.2.106/lib/libbamf/Makefile.in 2012-01-12 15:14:56.000000000 +0000 @@ -163,6 +163,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -243,6 +244,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/ltmain.sh bamf-0.2.106/ltmain.sh --- bamf-0.2.104/ltmain.sh 2011-09-26 11:44:30.000000000 +0000 +++ bamf-0.2.106/ltmain.sh 2012-01-12 15:14:48.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 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. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru bamf-0.2.104/m4/libtool.m4 bamf-0.2.106/m4/libtool.m4 --- bamf-0.2.104/m4/libtool.m4 2011-09-26 11:44:30.000000000 +0000 +++ bamf-0.2.106/m4/libtool.m4 2012-01-12 15:14:48.000000000 +0000 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1330,14 +1374,27 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1471,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1657,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1639,7 +1701,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2247,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2256,7 @@ ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2321,7 @@ ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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' @@ -2398,7 +2460,7 @@ ;; dgux*) - version_type=linux + 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' @@ -2406,10 +2468,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2475,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2493,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2455,7 +2513,7 @@ ;; gnu*) - version_type=linux + 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}' @@ -2466,7 +2524,7 @@ ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2527,7 +2585,7 @@ ;; interix[[3-9]]*) - version_type=linux + 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}' @@ -2543,7 +2601,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2580,9 +2638,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + 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}' @@ -2657,7 +2715,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2726,7 +2784,7 @@ ;; solaris*) - version_type=linux + 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}' @@ -2751,7 +2809,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -2775,7 +2833,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2806,7 +2864,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + 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}' @@ -2816,7 +2874,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor 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 @@ -3238,7 +3296,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3658,6 +3716,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4242,7 +4301,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4334,18 +4395,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4505,7 +4581,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4533,7 +4611,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4787,8 +4864,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5084,6 +5160,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5130,10 +5207,6 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5146,7 +5219,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5185,7 +5258,6 @@ fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5627,9 +5699,6 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5787,7 +5856,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6157,7 +6225,7 @@ esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6918,12 +6986,18 @@ } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7120,7 +7194,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7253,7 +7326,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7440,6 +7512,77 @@ ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7509,6 +7652,13 @@ dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff -Nru bamf-0.2.104/m4/ltoptions.m4 bamf-0.2.106/m4/ltoptions.m4 --- bamf-0.2.104/m4/ltoptions.m4 2011-09-26 11:44:30.000000000 +0000 +++ bamf-0.2.106/m4/ltoptions.m4 2012-01-12 15:14:48.000000000 +0000 @@ -326,9 +326,24 @@ # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff -Nru bamf-0.2.104/m4/ltversion.m4 bamf-0.2.106/m4/ltversion.m4 --- bamf-0.2.104/m4/ltversion.m4 2011-09-26 11:44:30.000000000 +0000 +++ bamf-0.2.106/m4/ltversion.m4 2012-01-12 15:14:48.000000000 +0000 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru bamf-0.2.104/Makefile.in bamf-0.2.106/Makefile.in --- bamf-0.2.104/Makefile.in 2011-09-26 11:44:36.000000000 +0000 +++ bamf-0.2.106/Makefile.in 2012-01-12 15:14:56.000000000 +0000 @@ -125,6 +125,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -205,6 +206,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/src/bamf-application.c bamf-0.2.106/src/bamf-application.c --- bamf-0.2.104/src/bamf-application.c 2011-09-08 16:48:49.000000000 +0000 +++ bamf-0.2.106/src/bamf-application.c 2012-01-12 15:06:32.000000000 +0000 @@ -145,7 +145,9 @@ gicon = g_app_info_get_icon (G_APP_INFO (desktop)); name = g_strdup (g_app_info_get_display_name (G_APP_INFO (desktop))); - icon = g_icon_to_string (gicon); + + if (gicon) + icon = g_icon_to_string (gicon); if (g_key_file_has_key(keyfile, G_KEY_FILE_DESKTOP_GROUP, STUB_KEY, NULL)) { /* This will error to return false, which is okay as it seems @@ -227,7 +229,12 @@ } if (icon) - self->priv->icon = icon; + { + if (self->priv->icon) + g_free (self->priv->icon); + + self->priv->icon = icon; + } if (name) bamf_view_set_name (BAMF_VIEW (self), name); @@ -611,6 +618,12 @@ priv->app_type = NULL; } + if (priv->icon) + { + g_free (priv->icon); + priv->icon = NULL; + } + if (priv->wmclass) { g_free (priv->wmclass); diff -Nru bamf-0.2.104/src/bamf-application-glue.h bamf-0.2.106/src/bamf-application-glue.h --- bamf-0.2.104/src/bamf-application-glue.h 2011-09-26 11:44:42.000000000 +0000 +++ bamf-0.2.106/src/bamf-application-glue.h 2012-01-12 15:15:26.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-control-glue.h bamf-0.2.106/src/bamf-control-glue.h --- bamf-0.2.104/src/bamf-control-glue.h 2011-09-26 11:44:42.000000000 +0000 +++ bamf-0.2.106/src/bamf-control-glue.h 2012-01-12 15:15:26.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-indicator-glue.h bamf-0.2.106/src/bamf-indicator-glue.h --- bamf-0.2.104/src/bamf-indicator-glue.h 2011-09-26 11:44:43.000000000 +0000 +++ bamf-0.2.106/src/bamf-indicator-glue.h 2012-01-12 15:15:27.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-indicator-source-glue.h bamf-0.2.106/src/bamf-indicator-source-glue.h --- bamf-0.2.104/src/bamf-indicator-source-glue.h 2011-09-26 11:44:43.000000000 +0000 +++ bamf-0.2.106/src/bamf-indicator-source-glue.h 2012-01-12 15:15:27.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-legacy-screen.c bamf-0.2.106/src/bamf-legacy-screen.c --- bamf-0.2.104/src/bamf-legacy-screen.c 2011-08-04 06:57:25.000000000 +0000 +++ bamf-0.2.106/src/bamf-legacy-screen.c 2012-01-12 15:06:32.000000000 +0000 @@ -160,6 +160,7 @@ handle_window_opened (WnckScreen *screen, WnckWindow *window, BamfLegacyScreen *legacy) { BamfLegacyWindow *legacy_window; + g_return_if_fail (WNCK_IS_WINDOW (window)); legacy_window = bamf_legacy_window_new (window); @@ -171,6 +172,36 @@ g_signal_emit (legacy, legacy_screen_signals[WINDOW_OPENED], 0, legacy_window); } +/* This function allows to push into the screen a window by its xid. + * If the window is already known, it's just ignored, otherwise it gets added + * to the windows list. The BamfLegacyScreen should automatically update its + * windows list when they are added/removed from the screen, but if a child + * BamfLegacyWindow is closed, then it could be possible to re-add it. */ +void +bamf_legacy_screen_inject_window (BamfLegacyScreen *self, guint xid) +{ + g_return_if_fail (BAMF_IS_LEGACY_SCREEN (self)); + BamfLegacyWindow *window; + GList *l; + + for (l = self->priv->windows; l; l = l->next) + { + window = l->data; + + if (bamf_legacy_window_get_xid (window) == xid) + { + return; + } + } + + WnckWindow *legacy_window = wnck_window_get(xid); + + if (WNCK_IS_WINDOW (legacy_window)) + { + handle_window_opened(NULL, legacy_window, self); + } +} + void bamf_legacy_screen_set_state_file (BamfLegacyScreen *self, const char *file) diff -Nru bamf-0.2.104/src/bamf-legacy-screen.h bamf-0.2.106/src/bamf-legacy-screen.h --- bamf-0.2.104/src/bamf-legacy-screen.h 2010-11-05 13:31:31.000000000 +0000 +++ bamf-0.2.106/src/bamf-legacy-screen.h 2012-01-12 15:06:32.000000000 +0000 @@ -67,4 +67,6 @@ BamfLegacyScreen * bamf_legacy_screen_get_default (void); +void bamf_legacy_screen_inject_window (BamfLegacyScreen *screen, guint xid); + #endif diff -Nru bamf-0.2.104/src/bamf-legacy-window.c bamf-0.2.106/src/bamf-legacy-window.c --- bamf-0.2.104/src/bamf-legacy-window.c 2011-09-26 11:44:04.000000000 +0000 +++ bamf-0.2.106/src/bamf-legacy-window.c 2012-01-12 15:06:32.000000000 +0000 @@ -215,6 +215,9 @@ window = self->priv->legacy_window; + if (!window) + return NULL; + if (wnck_window_get_icon_is_fallback (window)) return NULL; @@ -325,16 +328,44 @@ { g_return_if_fail (BAMF_IS_LEGACY_WINDOW (self)); g_return_if_fail (WNCK_IS_WINDOW (window)); - - self->priv->is_closed = TRUE; - if (window == self->priv->legacy_window) + if (self->priv->legacy_window == window) { + self->priv->is_closed = TRUE; g_signal_emit (self, legacy_window_signals[CLOSED], 0); } } static void +handle_destroy_notify (gpointer *data, BamfLegacyWindow *self_was_here) +{ + BamfLegacyScreen *screen = bamf_legacy_screen_get_default (); + bamf_legacy_screen_inject_window (screen, GPOINTER_TO_UINT (data)); +} + +/* This utility function allows to set a BamfLegacyWindow as closed, notifying + * all its owners, and to reopen it once the current window has been destroyed. + * This allows to remap particular windows to different applications. */ +void +bamf_legacy_window_reopen (BamfLegacyWindow *self) +{ + g_return_if_fail (BAMF_IS_LEGACY_WINDOW (self)); + g_return_if_fail (WNCK_IS_WINDOW (self->priv->legacy_window)); + + guint xid = bamf_legacy_window_get_xid (self); + + /* Adding a weak ref to this object, causes to get notified after the object + * destruction, so once this BamfLegacyWindow has been closed and drestroyed + * the handle_destroy_notify() function will be called, and that will + * provide to iniject another window like this one to the BamfLegacyScreen */ + g_object_weak_ref (G_OBJECT (self), (GWeakNotify) handle_destroy_notify, + GUINT_TO_POINTER (xid)); + + self->priv->is_closed = TRUE; + g_signal_emit (self, legacy_window_signals[CLOSED], 0); +} + +static void bamf_legacy_window_dispose (GObject *object) { BamfLegacyWindow *self; @@ -378,7 +409,7 @@ screen = wnck_screen_get_default (); priv->closed_id = g_signal_connect (G_OBJECT (screen), "window-closed", - (GCallback) handle_window_closed, self); + (GCallback) handle_window_closed, self); } static void diff -Nru bamf-0.2.104/src/bamf-legacy-window.h bamf-0.2.106/src/bamf-legacy-window.h --- bamf-0.2.104/src/bamf-legacy-window.h 2011-09-26 11:43:34.000000000 +0000 +++ bamf-0.2.106/src/bamf-legacy-window.h 2012-01-12 15:06:32.000000000 +0000 @@ -112,6 +112,8 @@ BamfLegacyWindow * bamf_legacy_window_get_transient (BamfLegacyWindow *self); +void bamf_legacy_window_reopen (BamfLegacyWindow *self); + BamfLegacyWindow * bamf_legacy_window_new (WnckWindow *legacy_window); #endif diff -Nru bamf-0.2.104/src/bamf-matcher.c bamf-0.2.106/src/bamf-matcher.c --- bamf-0.2.104/src/bamf-matcher.c 2011-09-26 11:39:16.000000000 +0000 +++ bamf-0.2.106/src/bamf-matcher.c 2012-01-12 15:06:32.000000000 +0000 @@ -14,6 +14,7 @@ * along with this program. If not, see . * * Authored by: Jason Smith + * Marco Trevisan (TreviƱo) <3v1n0@ubuntu.com> * */ @@ -65,7 +66,6 @@ GHashTable * desktop_id_table; GHashTable * desktop_file_table; GHashTable * desktop_class_table; - GHashTable * exec_list; GHashTable * registered_pids; GList * views; GList * monitors; @@ -135,12 +135,12 @@ } } -static void bamf_matcher_unregister_view (BamfMatcher *self, BamfView *view); +static void bamf_matcher_unregister_view (BamfMatcher *self, BamfView *view, gboolean unref); static void on_view_closed (BamfView *view, BamfMatcher *self) { - bamf_matcher_unregister_view (self, view); + bamf_matcher_unregister_view (self, view, TRUE); } static void @@ -168,7 +168,7 @@ } static void -bamf_matcher_unregister_view (BamfMatcher *self, BamfView *view) +bamf_matcher_unregister_view (BamfMatcher *self, BamfView *view, gboolean unref) { const char * path; char * type; @@ -181,8 +181,11 @@ g_signal_handlers_disconnect_by_func (G_OBJECT (view), on_view_closed, self); g_signal_handlers_disconnect_by_func (G_OBJECT (view), on_view_active_changed, self); - self->priv->views = g_list_remove (self->priv->views, view); - g_object_unref (view); + if (unref) + { + self->priv->views = g_list_remove (self->priv->views, view); + g_object_unref (view); + } g_free (type); } @@ -191,7 +194,7 @@ get_open_office_window_hint (BamfMatcher * self, BamfLegacyWindow * window) { const gchar *name; - char *exec; + char *exec = NULL; GHashTable *desktopFileTable; GList *list; @@ -199,61 +202,109 @@ g_return_val_if_fail (BAMF_IS_LEGACY_WINDOW (window), NULL); name = bamf_legacy_window_get_name (window); + const gchar *class = bamf_legacy_window_get_class_name (window); + BamfWindowType type = bamf_legacy_window_get_window_type (window); - if (name == NULL) + if (name == NULL && class == NULL) return NULL; - if (g_str_has_suffix (name, "OpenOffice.org Writer")) + if (g_str_has_suffix (name, "LibreOffice Writer")) { - exec = "ooffice -writer %F"; + exec = "libreoffice -writer %U"; } - else if (g_str_has_suffix (name, "OpenOffice.org Math")) + else if (g_str_has_suffix (name, "LibreOffice Calc")) { - exec = "ooffice -math %F"; + exec = "libreoffice -calc %U"; } - else if (g_str_has_suffix (name, "OpenOffice.org Calc")) + else if (g_str_has_suffix (name, "LibreOffice Impress")) { - exec = "ooffice -calc %F"; + exec = "libreoffice -impress %U"; } - else if (g_str_has_suffix (name, "OpenOffice.org Impress")) + else if (g_str_has_suffix (name, "LibreOffice Math")) { - exec = "ooffice -impress %F"; + exec = "libreoffice -math %U"; } - else if (g_str_has_suffix (name, "OpenOffice.org Draw")) + else if (g_str_has_suffix (name, "LibreOffice Draw")) { - exec = "ooffice -draw %F"; + exec = "libreoffice -draw %U"; } - else if (g_str_has_suffix (name, "LibreOffice Writer")) + else if (g_strcmp0 (class, "libreoffice-startcenter") == 0) { - exec = "libreoffice -writer %U"; + exec = "libreoffice %U"; } - else if (g_str_has_suffix (name, "LibreOffice Math")) + else if (g_strcmp0 (name, "LibreOffice") == 0 && type == BAMF_WINDOW_NORMAL) { - exec = "libreoffice -math %U"; + exec = "libreoffice %U"; } - else if (g_str_has_suffix (name, "LibreOffice Calc")) + else if (g_str_has_suffix (name, "OpenOffice.org Writer")) { - exec = "libreoffice -calc %U"; + exec = "ooffice -writer %F"; } - else if (g_str_has_suffix (name, "LibreOffice Impress")) + else if (g_str_has_suffix (name, "OpenOffice.org Calc")) { - exec = "libreoffice -impress %U"; + exec = "ooffice -calc %F"; } - else if (g_str_has_suffix (name, "LibreOffice Draw")) + else if (g_str_has_suffix (name, "OpenOffice.org Impress")) { - exec = "libreoffice -draw %U"; + exec = "ooffice -impress %F"; + } + else if (g_str_has_suffix (name, "OpenOffice.org Math")) + { + exec = "ooffice -math %F"; + } + else if (g_str_has_suffix (name, "OpenOffice.org Draw")) + { + exec = "ooffice -draw %F"; + } + else if (g_strcmp0 (name, "OpenOffice.org") == 0 && type == BAMF_WINDOW_NORMAL) + { + exec = "ooffice %F"; } else { - return NULL; + if (type != BAMF_WINDOW_NORMAL || bamf_legacy_window_get_transient (window)) + { + /* Child windows can generally easily be recognized by their class */ + if (g_strcmp0 (class, "libreoffice-writer") == 0) + { + exec = "libreoffice -writer %U"; + } + else if (g_strcmp0 (class, "libreoffice-calc") == 0) + { + exec = "libreoffice -calc %U"; + } + else if (g_strcmp0 (class, "libreoffice-impress") == 0) + { + exec = "libreoffice -impress %U"; + } + else if (g_strcmp0 (class, "libreoffice-math") == 0) + { + exec = "libreoffice -math %U"; + } + else if (g_strcmp0 (class, "libreoffice-draw") == 0) + { + exec = "libreoffice -draw %U"; + } + } + + if (!exec) + { + /* By default fallback to the main launcher */ + if (g_str_has_prefix (class, "OpenOffice")) + { + exec = "ooffice %F"; + } + else + { + exec = "libreoffice %U"; + } + } } desktopFileTable = self->priv->desktop_file_table; list = g_hash_table_lookup (desktopFileTable, exec); - g_return_val_if_fail (list, NULL); - - return (char *) list->data; + return (list ? (char *) list->data : NULL); } /* Attempts to return the binary name for a particular execution string */ @@ -266,7 +317,7 @@ gboolean regexFail; GRegex *regex; - g_return_val_if_fail (execString && strlen (execString) > 0, g_strdup (execString)); + g_return_val_if_fail ((execString && execString[0] != '\0'), g_strdup (execString)); exec = g_utf8_casefold (execString, -1); parts = g_strsplit (exec, " ", 0); @@ -328,7 +379,7 @@ { GArray *arr = g_array_new (FALSE, TRUE, sizeof (char *)); - char *str = "^gsku$"; + char *str = "^gksu(do)?$"; g_array_append_val (arr, str); str = "^sudo$"; @@ -542,22 +593,22 @@ GHashTable *desktop_id_table, GHashTable *desktop_class_table) { - GAppInfo *desktop_file; + GDesktopAppInfo *desktop_file; char *exec; char *path; GString *desktop_id; /* is ok... really */ g_return_if_fail (BAMF_IS_MATCHER (self)); - desktop_file = G_APP_INFO (g_desktop_app_info_new_from_filename (file)); + desktop_file = g_desktop_app_info_new_from_filename (file); if (!G_IS_APP_INFO (desktop_file)) return; - - if (g_app_info_should_show (desktop_file) == FALSE) + + if (!g_desktop_app_info_get_show_in (desktop_file, g_getenv ("XDG_CURRENT_DESKTOP"))) return; - exec = g_strdup (g_app_info_get_commandline (desktop_file)); + exec = g_strdup (g_app_info_get_commandline (G_APP_INFO (desktop_file))); if (!exec) return; @@ -582,7 +633,7 @@ g_free (path); desktop_id = g_string_truncate (desktop_id, desktop_id->len - 8); /* remove last 8 characters for .desktop */ - + insert_data_into_tables (self, file, exec, desktop_id->str, desktop_file_table, desktop_id_table); insert_desktop_file_class_into_table (self, file, desktop_class_table); @@ -617,7 +668,6 @@ info = g_file_enumerator_next_file (enumerator, NULL, NULL); for (; info; info = g_file_enumerator_next_file (enumerator, NULL, NULL)) { - name = g_file_info_get_name (info); path = g_build_filename (directory, name, NULL); @@ -937,7 +987,10 @@ if (!g_str_has_suffix (path, ".desktop") && filetype != G_FILE_TYPE_DIRECTORY && type != G_FILE_MONITOR_EVENT_DELETED) - goto out; + { + g_free(path); + return; + } if (type == G_FILE_MONITOR_EVENT_DELETED || type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT) @@ -994,7 +1047,7 @@ self->priv->desktop_id_table, self->priv->desktop_class_table); - g_list_free_full (dirs, (GDestroyNotify) g_free); + g_list_free_full (dirs, g_free); } } else if (filetype != G_FILE_TYPE_UNKNOWN) @@ -1003,7 +1056,6 @@ } } -out: g_free (path); } @@ -1097,15 +1149,18 @@ fill_desktop_file_table (self, directories, *desktop_file_table, *desktop_id_table, *desktop_class_table); - g_list_free_full (directories, (GDestroyNotify) g_free); + g_list_free_full (directories, g_free); } static gboolean is_open_office_window (BamfMatcher * self, BamfLegacyWindow * window) { - return g_str_has_prefix (bamf_legacy_window_get_class_name (window), "OpenOffice") || - g_str_has_prefix (bamf_legacy_window_get_class_name (window), "LibreOffice") || - g_str_has_prefix (bamf_legacy_window_get_class_name (window), "libreoffice"); + const char *class_name = bamf_legacy_window_get_class_name (window); + + return (g_str_has_prefix (class_name, "LibreOffice") || + g_str_has_prefix (class_name, "libreoffice") || + g_str_has_prefix (class_name, "OpenOffice") || + g_str_has_prefix (class_name, "openoffice")); } static char * @@ -1297,7 +1352,7 @@ if (trimmed) { - if (strlen (trimmed) > 0) + if (trimmed[0] != '\0') { table_list = g_hash_table_lookup (priv->desktop_file_table, trimmed); @@ -1370,7 +1425,7 @@ hint = get_window_hint (self, window, _NET_WM_DESKTOP_FILE); const char *window_class = bamf_legacy_window_get_class_name (window); - if (hint && strlen (hint) > 0 && !is_web_app_window(self, window)) + if (hint && hint[0] != '\0' && !is_web_app_window(self, window)) { desktop_files = g_list_prepend (desktop_files, hint); /* whew, hard work, didn't even have to make a copy! */ @@ -1568,13 +1623,7 @@ g_object_unref (best); } - for (l = possible_apps; l; l = l->next) - { - char *str = l->data; - g_free (str); - } - - g_list_free (possible_apps); + g_list_free_full (possible_apps, g_free); bamf_view_add_child (BAMF_VIEW (best), BAMF_VIEW (bamf_window)); } @@ -1589,7 +1638,7 @@ GHashTable *registered_pids; char *window_hint = NULL; gint i, pid; - gint *key; + gpointer key; g_return_if_fail (BAMF_IS_MATCHER (self)); g_return_if_fail (BAMF_IS_LEGACY_WINDOW (window)); @@ -1603,9 +1652,7 @@ if (pid > 0) { - key = g_new (gint, 1); - *key = pid; - + gpointer key = GINT_TO_POINTER (pid); const char* result = g_hash_table_lookup (registered_pids, key); if (result && g_str_has_prefix (result, "/home/")) { @@ -1617,49 +1664,46 @@ } window_hint = get_window_hint (self, window, _NET_WM_DESKTOP_FILE); - if (window_hint && strlen (window_hint) > 0) + if (window_hint) { - /* already set, make sure we know about this - * fact for future windows of this applications */ - pid = bamf_legacy_window_get_pid (window); - - if (pid > 0) + if (window_hint[0] != '\0') { - key = g_new (gint, 1); - *key = pid; + /* already set, make sure we know about this + * fact for future windows of this applications */ + pid = bamf_legacy_window_get_pid (window); - if (!g_hash_table_lookup (registered_pids, key)) + if (pid > 0) { - g_hash_table_insert (registered_pids, key, g_strdup (window_hint)); + key = GINT_TO_POINTER (pid); + + if (!g_hash_table_lookup (registered_pids, key)) + { + g_hash_table_insert (registered_pids, key, g_strdup (window_hint)); + } } + + g_free (window_hint); + return; } g_free (window_hint); - return; - } - - if (is_open_office_window (self, window)) - { - window_hint = get_open_office_window_hint (self, window); + window_hint = NULL; } - else - { - pids = pid_parent_tree (self, bamf_legacy_window_get_pid (window)); - for (i = 0; i < pids->len; i++) - { - pid = g_array_index (pids, gint, i); + pids = pid_parent_tree (self, bamf_legacy_window_get_pid (window)); - key = g_new (gint, 1); - *key = pid; + for (i = 0; i < pids->len; i++) + { + pid = g_array_index (pids, gint, i); + key = GINT_TO_POINTER (pid); - window_hint = g_hash_table_lookup (registered_pids, key); - if (window_hint != NULL && strlen (window_hint) > 0) - break; - } - g_array_free (pids, TRUE); + window_hint = g_hash_table_lookup (registered_pids, key); + if (window_hint != NULL && window_hint[0] != '\0') + break; } + g_array_free (pids, TRUE); + if (window_hint) set_window_hint (self, window, _NET_WM_DESKTOP_FILE, window_hint); } @@ -1689,24 +1733,31 @@ bamf_matcher_setup_window_state (self, bamfwindow); } -static gboolean -open_office_window_setup_timer (OpenOfficeTimeoutArgs *args) +static void +on_open_office_window_name_changed (BamfLegacyWindow *window, BamfMatcher* self) { - if (bamf_legacy_window_is_closed (args->window)) - { - g_object_unref (args->window); - return FALSE; - } + g_return_if_fail (BAMF_IS_MATCHER (self)); + g_return_if_fail (BAMF_IS_LEGACY_WINDOW (window)); - args->count++; - if (args->count > 20 || get_open_office_window_hint (args->matcher, args->window)) + char *old_hint; + const char *new_hint; + + old_hint = get_window_hint (self, window, _NET_WM_DESKTOP_FILE); + new_hint = get_open_office_window_hint (self, window); + + if (new_hint && g_strcmp0 (new_hint, old_hint) != 0) { - g_object_unref (args->window); - handle_raw_window (args->matcher, args->window); - return FALSE; + bamf_legacy_window_reopen (window); } - - return TRUE; + + g_free (old_hint); +} + +static void +on_open_office_window_closed (BamfLegacyWindow *window, BamfMatcher* self) +{ + g_signal_handlers_disconnect_by_func (window, on_open_office_window_name_changed, self); + g_object_unref (window); } static void @@ -1723,24 +1774,35 @@ bamf_matcher_register_view (self, BAMF_VIEW (bamfwindow)); g_object_unref (bamfwindow); - return; + return; } - if (is_open_office_window (self, window) && get_open_office_window_hint (self, window) == NULL) + if (is_open_office_window (self, window)) { - OpenOfficeTimeoutArgs* args = (OpenOfficeTimeoutArgs*) g_malloc0 (sizeof (OpenOfficeTimeoutArgs)); - args->matcher = self; - args->window = window; - + BamfWindowType win_type = bamf_legacy_window_get_window_type (window); + + if (win_type == BAMF_WINDOW_SPLASHSCREEN || win_type == BAMF_WINDOW_TOOLBAR) + { + return; + } + + char *old_hint = get_window_hint (self, window, _NET_WM_DESKTOP_FILE); + const char *new_hint = get_open_office_window_hint (self, window); + + if (new_hint && g_strcmp0 (old_hint, new_hint) != 0) + { + set_window_hint (self, window, _NET_WM_DESKTOP_FILE, new_hint); + } + g_object_ref (window); - /* we have an open office window who is not ready to match yet */ - g_timeout_add (100, (GSourceFunc) open_office_window_setup_timer, args); - } - else - { - /* we have a window who is ready to be matched */ - handle_raw_window (self, window); + g_signal_connect (window, "name-changed", (GCallback) on_open_office_window_name_changed, self); + g_signal_connect (window, "closed", (GCallback) on_open_office_window_closed, self); + + g_free (old_hint); } + + /* we have a window who is ready to be matched */ + handle_raw_window (self, window); } static void @@ -1805,14 +1867,7 @@ } } - for (l = possible_apps; l; l = l->next) - { - char *str = l->data; - g_free (str); - } - - - g_list_free (possible_apps); + g_list_free_full (possible_apps, g_free); if (best) bamf_view_add_child (BAMF_VIEW (best), BAMF_VIEW (indicator)); @@ -1846,20 +1901,16 @@ const char * desktopFile, gint pid) { - gint *key; + gpointer key; BamfLegacyScreen *screen; GList *glist_item; GList *windows; - char *dup; g_return_if_fail (BAMF_IS_MATCHER (self)); g_return_if_fail (desktopFile); - key = g_new (gint, 1); - *key = pid; - - dup = g_strdup (desktopFile); - g_hash_table_insert (self->priv->registered_pids, key, dup); + key = GINT_TO_POINTER (pid); + g_hash_table_insert (self->priv->registered_pids, key, g_strdup (desktopFile)); /* fixme, this is a bit heavy */ @@ -2216,8 +2267,8 @@ priv->known_pids = g_array_new (FALSE, TRUE, sizeof (gint)); priv->bad_prefixes = g_array_new (FALSE, TRUE, sizeof (GRegex *)); - priv->registered_pids = - g_hash_table_new ((GHashFunc) g_int_hash, (GEqualFunc) g_int_equal); + priv->registered_pids = g_hash_table_new_full (g_direct_hash, g_direct_equal, + NULL, g_free); prefixstrings = prefix_strings (self); for (i = 0; i < prefixstrings->len; i++) @@ -2251,13 +2302,61 @@ } static void +bamf_matcher_finalize (GObject *object) +{ + BamfMatcher *self = (BamfMatcher *) object; + BamfMatcherPrivate *priv = self->priv; + GList *l; + int i; + + for (i = 0; i < priv->bad_prefixes->len; i++) + { + GRegex *regex = g_array_index (priv->bad_prefixes, GRegex *, i); + g_regex_unref (regex); + } + + g_array_free (priv->bad_prefixes, TRUE); + g_array_free (priv->known_pids, TRUE); + g_hash_table_destroy (priv->desktop_id_table); + g_hash_table_destroy (priv->desktop_file_table); + g_hash_table_destroy (priv->desktop_class_table); + g_hash_table_destroy (priv->registered_pids); + + for (l = priv->views; l; l = l->next) + { + bamf_matcher_unregister_view (self, (BamfView*)l->data, FALSE); + } + g_list_free_full (priv->views, g_object_unref); + priv->views = NULL; + + for (l = priv->monitors; l; l = l->next) + { + g_signal_handlers_disconnect_by_func (G_OBJECT (l->data), + (GCallback) on_monitor_changed, self); + } + g_list_free_full (priv->monitors, g_object_unref); + priv->monitors = NULL; + + g_list_free_full (priv->favorites, g_free); + priv->favorites = NULL; + + priv->active_app = NULL; + priv->active_win = NULL; + + G_OBJECT_CLASS (bamf_matcher_parent_class)->finalize (object); +} + +static void bamf_matcher_class_init (BamfMatcherClass * klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (klass, sizeof (BamfMatcherPrivate)); dbus_g_object_type_install_info (BAMF_TYPE_MATCHER, &dbus_glib_bamf_matcher_object_info); + object_class->finalize = bamf_matcher_finalize; + matcher_signals [VIEW_OPENED] = g_signal_new ("view-opened", G_OBJECT_CLASS_TYPE (klass), @@ -2293,7 +2392,7 @@ bamf_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); - + matcher_signals [FAVORITES_CHANGED] = g_signal_new ("favorites-changed", G_OBJECT_CLASS_TYPE (klass), diff -Nru bamf-0.2.104/src/bamf-matcher-glue.h bamf-0.2.106/src/bamf-matcher-glue.h --- bamf-0.2.104/src/bamf-matcher-glue.h 2011-09-26 11:44:42.000000000 +0000 +++ bamf-0.2.106/src/bamf-matcher-glue.h 2012-01-12 15:15:26.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-tab-glue.h bamf-0.2.106/src/bamf-tab-glue.h --- bamf-0.2.104/src/bamf-tab-glue.h 2011-09-26 11:44:42.000000000 +0000 +++ bamf-0.2.106/src/bamf-tab-glue.h 2012-01-12 15:15:26.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-view.c bamf-0.2.106/src/bamf-view.c --- bamf-0.2.104/src/bamf-view.c 2011-08-04 06:57:25.000000000 +0000 +++ bamf-0.2.106/src/bamf-view.c 2012-01-12 15:06:32.000000000 +0000 @@ -462,8 +462,6 @@ path = g_strdup_printf ("%s/%s", BAMF_DBUS_PATH, stable_name); g_free (stable_name); - g_print ("Export Path: %s\n", path); - BAMF_VIEW_GET_CLASS (view)->names = g_list_prepend (BAMF_VIEW_GET_CLASS (view)->names, path); view->priv->path = path; @@ -472,8 +470,14 @@ g_return_val_if_fail (bus, NULL); - dbus_g_connection_register_g_object (bus, path, G_OBJECT (view)); + GObject *old_object = dbus_g_connection_lookup_g_object (bus, path); + if (G_IS_OBJECT (old_object)) + { + g_critical ("BAMF has already registered an object on path \"%s`, this should never happen!", path); + dbus_g_connection_unregister_g_object (bus, old_object); + } + dbus_g_connection_register_g_object (bus, path, G_OBJECT (view)); g_signal_emit (view, view_signals[EXPORTED], 0); } diff -Nru bamf-0.2.104/src/bamf-view-glue.h bamf-0.2.106/src/bamf-view-glue.h --- bamf-0.2.104/src/bamf-view-glue.h 2011-09-26 11:44:42.000000000 +0000 +++ bamf-0.2.106/src/bamf-view-glue.h 2012-01-12 15:15:26.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/bamf-window-glue.h bamf-0.2.106/src/bamf-window-glue.h --- bamf-0.2.104/src/bamf-window-glue.h 2011-09-26 11:44:42.000000000 +0000 +++ bamf-0.2.106/src/bamf-window-glue.h 2012-01-12 15:15:26.000000000 +0000 @@ -10,7 +10,7 @@ #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_char (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) diff -Nru bamf-0.2.104/src/Makefile.in bamf-0.2.106/src/Makefile.in --- bamf-0.2.104/src/Makefile.in 2011-09-26 11:44:36.000000000 +0000 +++ bamf-0.2.106/src/Makefile.in 2012-01-12 15:14:56.000000000 +0000 @@ -129,6 +129,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -209,6 +210,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/tests/bamfdaemon/Makefile.am bamf-0.2.106/tests/bamfdaemon/Makefile.am --- bamf-0.2.104/tests/bamfdaemon/Makefile.am 2010-11-18 16:00:18.000000000 +0000 +++ bamf-0.2.106/tests/bamfdaemon/Makefile.am 2012-01-12 15:06:32.000000000 +0000 @@ -77,8 +77,13 @@ -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions \ $(NULL) -#run make test as part of make check +# Run tests as part of make check +if ENABLE_HEADLESS_TESTS +check-local: test-headless +else check-local: test +endif + test: @gtester -k -o=test-bamf-results.xml ./test-bamf @@ -98,3 +103,28 @@ clean-generic: rm -f test-bamf-results.xml test-bamf-results.html + +# START HEADLESS TESTS +if ENABLE_HEADLESS_TESTS +DISPLAY = :27 +LOG_PATH = headless-logs +test-headless: + set -e; \ + export DISPLAY=$(DISPLAY); \ + rm -rf $(LOG_PATH); \ + mkdir $(LOG_PATH); \ + $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \ + sleep 1; \ + \ + $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \ + source $(LOG_PATH)/sessionbus.sh; \ + sleep 1; \ + \ + make test; \ + sleep 1; \ + \ + kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \ + pkill Xvfb; + +endif +# END HEADLESS TESTS diff -Nru bamf-0.2.104/tests/bamfdaemon/Makefile.in bamf-0.2.106/tests/bamfdaemon/Makefile.in --- bamf-0.2.104/tests/bamfdaemon/Makefile.in 2011-09-26 11:44:36.000000000 +0000 +++ bamf-0.2.106/tests/bamfdaemon/Makefile.in 2012-01-12 15:14:56.000000000 +0000 @@ -112,6 +112,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -192,6 +193,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ @@ -326,6 +328,10 @@ -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions \ $(NULL) + +# START HEADLESS TESTS +@ENABLE_HEADLESS_TESTS_TRUE@DISPLAY = :27 +@ENABLE_HEADLESS_TESTS_TRUE@LOG_PATH = headless-logs all: all-am .SUFFIXES: @@ -875,8 +881,10 @@ tags uninstall uninstall-am -#run make test as part of make check -check-local: test +# Run tests as part of make check +@ENABLE_HEADLESS_TESTS_TRUE@check-local: test-headless +@ENABLE_HEADLESS_TESTS_FALSE@check-local: test + test: @gtester -k -o=test-bamf-results.xml ./test-bamf @@ -896,6 +904,25 @@ clean-generic: rm -f test-bamf-results.xml test-bamf-results.html +@ENABLE_HEADLESS_TESTS_TRUE@test-headless: +@ENABLE_HEADLESS_TESTS_TRUE@ set -e; \ +@ENABLE_HEADLESS_TESTS_TRUE@ export DISPLAY=$(DISPLAY); \ +@ENABLE_HEADLESS_TESTS_TRUE@ rm -rf $(LOG_PATH); \ +@ENABLE_HEADLESS_TESTS_TRUE@ mkdir $(LOG_PATH); \ +@ENABLE_HEADLESS_TESTS_TRUE@ $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \ +@ENABLE_HEADLESS_TESTS_TRUE@ sleep 1; \ +@ENABLE_HEADLESS_TESTS_TRUE@ \ +@ENABLE_HEADLESS_TESTS_TRUE@ $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \ +@ENABLE_HEADLESS_TESTS_TRUE@ source $(LOG_PATH)/sessionbus.sh; \ +@ENABLE_HEADLESS_TESTS_TRUE@ sleep 1; \ +@ENABLE_HEADLESS_TESTS_TRUE@ \ +@ENABLE_HEADLESS_TESTS_TRUE@ make test; \ +@ENABLE_HEADLESS_TESTS_TRUE@ sleep 1; \ +@ENABLE_HEADLESS_TESTS_TRUE@ \ +@ENABLE_HEADLESS_TESTS_TRUE@ kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \ +@ENABLE_HEADLESS_TESTS_TRUE@ pkill Xvfb; + +# END HEADLESS TESTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru bamf-0.2.104/tests/bamfdaemon/test-application.c bamf-0.2.106/tests/bamfdaemon/test-application.c --- bamf-0.2.104/tests/bamfdaemon/test-application.c 2010-11-05 13:31:31.000000000 +0000 +++ bamf-0.2.106/tests/bamfdaemon/test-application.c 2012-01-12 15:06:32.000000000 +0000 @@ -401,24 +401,12 @@ bamf_view_add_child (BAMF_VIEW (application), BAMF_VIEW (window)); g_assert (signal_seen); - g_assert (g_strcmp0 (signal_window, path) == 0); + g_assert_cmpstr (signal_window, ==, path); signal_seen = FALSE; g_object_unref (window); g_object_unref (test); - - test = bamf_legacy_window_test_new (20, "Window X", "class", "exec"); - window = bamf_window_new (BAMF_LEGACY_WINDOW (test)); - - bamf_view_add_child (BAMF_VIEW (application), BAMF_VIEW (window)); - - g_assert (!signal_seen); - - path = bamf_view_export_on_bus (BAMF_VIEW (window)); - - g_assert (signal_seen); - g_assert (g_strcmp0 (signal_window, path) == 0); } static void diff -Nru bamf-0.2.104/tests/functional/Makefile.in bamf-0.2.106/tests/functional/Makefile.in --- bamf-0.2.104/tests/functional/Makefile.in 2011-09-26 11:44:36.000000000 +0000 +++ bamf-0.2.106/tests/functional/Makefile.in 2012-01-12 15:14:56.000000000 +0000 @@ -115,6 +115,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -195,6 +196,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ diff -Nru bamf-0.2.104/tests/libbamf/Makefile.am bamf-0.2.106/tests/libbamf/Makefile.am --- bamf-0.2.104/tests/libbamf/Makefile.am 2011-08-04 06:57:25.000000000 +0000 +++ bamf-0.2.106/tests/libbamf/Makefile.am 2012-01-12 15:06:32.000000000 +0000 @@ -33,8 +33,13 @@ $(GTK_LIBS) \ $(DBUS_LIBS) -#run make test as part of make check +# Run tests as part of make check +if ENABLE_HEADLESS_TESTS +check-local: test-headless +else check-local: test +endif + test: @gtester -k -o=test-libbamf-results.xml ./test-libbamf @@ -54,3 +59,28 @@ clean-generic: rm -f test-libbamf-results.xml test-libbamf-results.html + +# START HEADLESS TESTS +if ENABLE_HEADLESS_TESTS +DISPLAY = :27 +LOG_PATH = headless-logs +test-headless: + set -e; \ + export DISPLAY=$(DISPLAY); \ + rm -rf $(LOG_PATH); \ + mkdir $(LOG_PATH); \ + $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \ + sleep 1; \ + \ + $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \ + source $(LOG_PATH)/sessionbus.sh; \ + sleep 1; \ + \ + make test; \ + sleep 1; \ + \ + kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \ + pkill Xvfb; + +endif +# END HEADLESS TESTS diff -Nru bamf-0.2.104/tests/libbamf/Makefile.in bamf-0.2.106/tests/libbamf/Makefile.in --- bamf-0.2.104/tests/libbamf/Makefile.in 2011-09-26 11:44:36.000000000 +0000 +++ bamf-0.2.106/tests/libbamf/Makefile.in 2012-01-12 15:14:56.000000000 +0000 @@ -96,6 +96,7 @@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_GLIB_BIN = @DBUS_GLIB_BIN@ +DBUS_LAUNCH = @DBUS_LAUNCH@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -176,6 +177,7 @@ WARN_CFLAGS = @WARN_CFLAGS@ WNCK_CFLAGS = @WNCK_CFLAGS@ WNCK_LIBS = @WNCK_LIBS@ +XVFB = @XVFB@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ @@ -262,6 +264,10 @@ $(GTK_LIBS) \ $(DBUS_LIBS) + +# START HEADLESS TESTS +@ENABLE_HEADLESS_TESTS_TRUE@DISPLAY = :27 +@ENABLE_HEADLESS_TESTS_TRUE@LOG_PATH = headless-logs all: all-am .SUFFIXES: @@ -571,8 +577,10 @@ tags uninstall uninstall-am -#run make test as part of make check -check-local: test +# Run tests as part of make check +@ENABLE_HEADLESS_TESTS_TRUE@check-local: test-headless +@ENABLE_HEADLESS_TESTS_FALSE@check-local: test + test: @gtester -k -o=test-libbamf-results.xml ./test-libbamf @@ -592,6 +600,25 @@ clean-generic: rm -f test-libbamf-results.xml test-libbamf-results.html +@ENABLE_HEADLESS_TESTS_TRUE@test-headless: +@ENABLE_HEADLESS_TESTS_TRUE@ set -e; \ +@ENABLE_HEADLESS_TESTS_TRUE@ export DISPLAY=$(DISPLAY); \ +@ENABLE_HEADLESS_TESTS_TRUE@ rm -rf $(LOG_PATH); \ +@ENABLE_HEADLESS_TESTS_TRUE@ mkdir $(LOG_PATH); \ +@ENABLE_HEADLESS_TESTS_TRUE@ $(XVFB) $(DISPLAY) -screen 0 1024x768x8 > $(LOG_PATH)/Xvfb.out 2>&1 & \ +@ENABLE_HEADLESS_TESTS_TRUE@ sleep 1; \ +@ENABLE_HEADLESS_TESTS_TRUE@ \ +@ENABLE_HEADLESS_TESTS_TRUE@ $(DBUS_LAUNCH) > $(LOG_PATH)/sessionbus.sh; \ +@ENABLE_HEADLESS_TESTS_TRUE@ source $(LOG_PATH)/sessionbus.sh; \ +@ENABLE_HEADLESS_TESTS_TRUE@ sleep 1; \ +@ENABLE_HEADLESS_TESTS_TRUE@ \ +@ENABLE_HEADLESS_TESTS_TRUE@ make test; \ +@ENABLE_HEADLESS_TESTS_TRUE@ sleep 1; \ +@ENABLE_HEADLESS_TESTS_TRUE@ \ +@ENABLE_HEADLESS_TESTS_TRUE@ kill `grep DBUS_SESSION_BUS_PID $(LOG_PATH)/sessionbus.sh | grep -oE '[0-9]+'`; \ +@ENABLE_HEADLESS_TESTS_TRUE@ pkill Xvfb; + +# END HEADLESS TESTS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded.