diff -Nru libr-0.5.0~lucid/aclocal.m4 libr-0.6.0~lucid/aclocal.m4 --- libr-0.5.0~lucid/aclocal.m4 2010-05-01 19:57:34.000000000 +0000 +++ libr-0.6.0~lucid/aclocal.m4 2011-03-05 20:21:08.000000000 +0000 @@ -13,14 +13,14 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# intlmacosx.m4 serial 1 (gettext-0.17) -dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. +# intlmacosx.m4 serial 3 (gettext-0.18) +dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -40,7 +40,7 @@ [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - gt_cv_func_CFPreferencesCopyAppValue, + [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], @@ -49,11 +49,11 @@ [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], @@ -61,7 +61,7 @@ [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= @@ -72,6 +72,7 @@ ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -99,7 +100,10 @@ AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -112,7 +116,6 @@ AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -121,34 +124,31 @@ # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -190,16 +190,17 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -207,25 +208,24 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES diff -Nru libr-0.5.0~lucid/ChangeLog libr-0.6.0~lucid/ChangeLog --- libr-0.5.0~lucid/ChangeLog 2010-05-01 19:20:59.000000000 +0000 +++ libr-0.6.0~lucid/ChangeLog 2011-03-05 20:20:45.000000000 +0000 @@ -1,3 +1,8 @@ +0.6.0: + * Fixed some bugs with libbfd on Ubuntu 10.10. + * Added some additional error checking for libbfd. + * Deprecated "GUID naming" in favor of "UUID naming". + * Added support for extracting special 'one canvas' SVG icons. 0.5.0: * Added read-only backend. * Added documentation for the icon management API. diff -Nru libr-0.5.0~lucid/ChangeLog.debian libr-0.6.0~lucid/ChangeLog.debian --- libr-0.5.0~lucid/ChangeLog.debian 2009-12-01 17:14:49.000000000 +0000 +++ libr-0.6.0~lucid/ChangeLog.debian 2011-03-05 21:11:19.000000000 +0000 @@ -1,4 +1,5 @@ -libr (0.4.2) karmic; urgency=low +libr (0.6.0~lucid) lucid; urgency=low * libr Debian maintainer and upstream author are identical. Therefore see also normal changelog file for Debian changes. - -- Erich E. Hoover Thu, 10 Sep 2009 13:47:00 -0600 + -- Erich E. Hoover Sat, 05 Mar 2011 14:11:19 -0700 + diff -Nru libr-0.5.0~lucid/configure libr-0.6.0~lucid/configure --- libr-0.5.0~lucid/configure 2010-05-01 19:57:35.000000000 +0000 +++ libr-0.6.0~lucid/configure 2011-03-05 20:21:12.000000000 +0000 @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65. +# Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -316,7 +316,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -356,19 +356,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -679,7 +679,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -756,6 +756,8 @@ EXTRA_CFLAGS LIBGLADE_LIBS LIBGLADE_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH PKG_CONFIG LIBTOOL_DEPS OTOOL64 @@ -908,6 +910,8 @@ CPPFLAGS CPP PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR LIBGLADE_CFLAGS LIBGLADE_LIBS BACKEND_CFLAGS @@ -974,8 +978,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1020,7 +1025,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1046,7 +1051,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1250,7 +1255,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1266,7 +1271,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1296,8 +1301,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1305,7 +1310,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1323,13 +1328,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1352,7 +1357,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1366,8 +1371,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1382,9 +1387,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1423,11 +1428,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1467,7 +1472,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1564,6 +1569,10 @@ you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path LIBGLADE_CFLAGS C compiler flags for LIBGLADE, overriding pkg-config LIBGLADE_LIBS @@ -1640,9 +1649,9 @@ if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1712,7 +1721,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1825,7 +1834,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1855,7 +1864,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1922,10 +1931,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1961,7 +1970,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1988,7 +1997,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2005,7 +2014,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2115,11 +2124,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2153,11 +2160,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2170,11 +2175,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2188,11 +2191,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2247,7 +2248,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2262,7 +2268,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done @@ -2339,7 +2349,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2356,16 +2366,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2481,11 +2497,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2507,7 +2523,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2517,7 +2533,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2755,7 +2771,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2763,7 +2779,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2797,7 +2813,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2813,7 +2829,7 @@ # Define the identity of the package. PACKAGE=libr - VERSION=0.5.0 + VERSION=0.6.0 cat >>confdefs.h <<_ACEOF @@ -3155,8 +3171,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3270,9 +3286,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3314,8 +3329,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3372,9 +3387,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi @@ -3425,8 +3440,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4171,7 +4186,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4187,11 +4202,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4230,7 +4245,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4246,18 +4261,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -4318,7 +4333,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4384,7 +4399,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4828,7 +4843,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -4839,16 +4854,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4873,7 +4888,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4881,7 +4896,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4991,7 +5006,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then : @@ -5638,7 +5653,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6309,7 +6324,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -6635,7 +6650,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -6714,7 +6729,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -6830,7 +6845,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -7032,13 +7047,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:7035: $ac_compile\"" >&5) + (eval echo "\"\$as_me:7050: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:7038: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:7053: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:7041: output\"" >&5) + (eval echo "\"\$as_me:7056: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -8243,7 +8258,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 8246 "configure"' > conftest.$ac_ext + echo '#line 8261 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8997,8 +9012,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -9463,11 +9477,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9466: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9480: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9470: \$? = $ac_status" >&5 + echo "$as_me:9484: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9802,11 +9816,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9805: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9819: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9809: \$? = $ac_status" >&5 + echo "$as_me:9823: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9907,11 +9921,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9910: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9924: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9914: \$? = $ac_status" >&5 + echo "$as_me:9928: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9962,11 +9976,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9965: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9979: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9969: \$? = $ac_status" >&5 + echo "$as_me:9983: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12345,7 +12359,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12348 "configure" +#line 12362 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12441,7 +12455,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12444 "configure" +#line 12458 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12673,6 +12687,10 @@ ## Handle optional libraries (only header files are used) + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -12785,18 +12803,16 @@ $as_echo "no" >&6; } PKG_CONFIG="" fi - fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGLADE" >&5 $as_echo_n "checking for LIBGLADE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$LIBGLADE_CFLAGS"; then - pkg_cv_LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$LIBGLADE_CFLAGS"; then + pkg_cv_LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.0.0") 2>&5 ac_status=$? @@ -12806,15 +12822,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$LIBGLADE_LIBS"; then - pkg_cv_LIBGLADE_LIBS="$LIBGLADE_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$LIBGLADE_LIBS"; then + pkg_cv_LIBGLADE_LIBS="$LIBGLADE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.0.0") 2>&5 ac_status=$? @@ -12824,14 +12838,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -12839,14 +12854,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBGLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0 >= 2.0.0"` + LIBGLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libglade-2.0 >= 2.0.0" 2>&1` else - LIBGLADE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0 >= 2.0.0"` + LIBGLADE_PKG_ERRORS=`$PKG_CONFIG --print-errors "libglade-2.0 >= 2.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGLADE_PKG_ERRORS" >&5 - as_fn_error "Package requirements (libglade-2.0 >= 2.0.0) were not met: + as_fn_error $? "Package requirements (libglade-2.0 >= 2.0.0) were not met: $LIBGLADE_PKG_ERRORS @@ -12855,12 +12870,13 @@ Alternatively, you may set the environment variables LIBGLADE_CFLAGS and LIBGLADE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -12869,13 +12885,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else LIBGLADE_CFLAGS=$pkg_cv_LIBGLADE_CFLAGS LIBGLADE_LIBS=$pkg_cv_LIBGLADE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi ## Handle required components @@ -12884,8 +12900,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12939,7 +12954,7 @@ else - as_fn_error "Could not find libbfd header file (bfd.h)! This file is usually included in the package binutils-dev." "$LINENO" 5 + as_fn_error $? "Could not find libbfd header file (bfd.h)! This file is usually included in the package binutils-dev." "$LINENO" 5 fi @@ -12958,11 +12973,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BACKEND" >&5 $as_echo_n "checking for BACKEND... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$BACKEND_CFLAGS"; then - pkg_cv_BACKEND_CFLAGS="$BACKEND_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$BACKEND_CFLAGS"; then + pkg_cv_BACKEND_CFLAGS="$BACKEND_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? @@ -12972,15 +12986,13 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$BACKEND_LIBS"; then - pkg_cv_BACKEND_LIBS="$BACKEND_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$BACKEND_LIBS"; then + pkg_cv_BACKEND_LIBS="$BACKEND_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? @@ -12990,14 +13002,15 @@ else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -13005,14 +13018,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - BACKEND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$pkg_modules"` + BACKEND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$pkg_modules" 2>&1` else - BACKEND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` + BACKEND_PKG_ERRORS=`$PKG_CONFIG --print-errors "$pkg_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$BACKEND_PKG_ERRORS" >&5 - as_fn_error "Package requirements ($pkg_modules) were not met: + as_fn_error $? "Package requirements ($pkg_modules) were not met: $BACKEND_PKG_ERRORS @@ -13021,12 +13034,13 @@ Alternatively, you may set the environment variables BACKEND_CFLAGS and BACKEND_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -13035,13 +13049,13 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else BACKEND_CFLAGS=$pkg_cv_BACKEND_CFLAGS BACKEND_LIBS=$pkg_cv_BACKEND_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi fi @@ -13070,7 +13084,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Ready for 64-bit compilation." >&5 $as_echo "$as_me: Ready for 64-bit compilation." >&6;}; else - as_fn_error "Target architecture ${ARCH} is invalid!" "$LINENO" 5; + as_fn_error $? "Target architecture ${ARCH} is invalid!" "$LINENO" 5 ; fi ## END Handle target architecture configuration @@ -13162,6 +13176,7 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -13185,11 +13200,11 @@ fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -13339,19 +13354,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -13547,7 +13562,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -13601,7 +13616,7 @@ # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13667,10 +13682,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -13688,11 +13703,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -13714,6 +13734,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -13726,7 +13747,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -13735,7 +13756,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -14060,7 +14081,7 @@ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -14098,7 +14119,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -14115,7 +14136,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -14129,18 +14150,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -14229,20 +14250,28 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -14270,7 +14299,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -14355,7 +14384,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -14368,7 +14397,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -14396,7 +14425,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -14423,7 +14452,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -14560,22 +14589,22 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -14586,19 +14615,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -15496,7 +15525,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -15517,7 +15546,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru libr-0.5.0~lucid/configure.ac libr-0.6.0~lucid/configure.ac --- libr-0.5.0~lucid/configure.ac 2010-05-01 19:57:27.000000000 +0000 +++ libr-0.6.0~lucid/configure.ac 2011-03-05 20:20:50.000000000 +0000 @@ -1,5 +1,5 @@ AC_INIT(libr.c) -AM_INIT_AUTOMAKE(libr,0.5.0) +AM_INIT_AUTOMAKE(libr,0.6.0) AC_CONFIG_SRCDIR([src/libr.c]) AC_PROG_CC diff -Nru libr-0.5.0~lucid/debian/changelog libr-0.6.0~lucid/debian/changelog --- libr-0.5.0~lucid/debian/changelog 2010-05-01 21:08:02.000000000 +0000 +++ libr-0.6.0~lucid/debian/changelog 2011-03-05 21:11:19.000000000 +0000 @@ -1,4 +1,5 @@ -libr (0.5.0~lucid) lucid; urgency=low +libr (0.6.0~lucid) lucid; urgency=low * libr Debian maintainer and upstream author are identical. Therefore see also normal changelog file for Debian changes. - -- Erich E. Hoover Sat, 01 May 2010 15:08:02 -0600 + -- Erich E. Hoover Sat, 05 Mar 2011 14:11:19 -0700 + diff -Nru libr-0.5.0~lucid/Makefile.in libr-0.6.0~lucid/Makefile.in --- libr-0.5.0~lucid/Makefile.in 2010-05-01 20:00:03.000000000 +0000 +++ libr-0.6.0~lucid/Makefile.in 2011-03-05 20:21:13.000000000 +0000 @@ -210,6 +210,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ diff -Nru libr-0.5.0~lucid/man/Makefile.in libr-0.6.0~lucid/man/Makefile.in --- libr-0.5.0~lucid/man/Makefile.in 2010-05-01 20:00:03.000000000 +0000 +++ libr-0.6.0~lucid/man/Makefile.in 2011-03-05 20:21:13.000000000 +0000 @@ -155,6 +155,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ diff -Nru libr-0.5.0~lucid/src/libr-bfd.c libr-0.6.0~lucid/src/libr-bfd.c --- libr-0.5.0~lucid/src/libr-bfd.c 2009-12-01 23:11:22.000000000 +0000 +++ libr-0.6.0~lucid/src/libr-bfd.c 2011-03-02 22:06:52.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2008-2009 Erich Hoover + * Copyright (c) 2008-2011 Erich Hoover * * libr libbfd Backend - Add resources into ELF binaries using libbfd * @@ -54,7 +54,10 @@ if(!handle) RETURN(LIBR_ERROR_OPENFAILED, "Failed to open input file"); if(!bfd_check_format(handle, bfd_object)) - RETURN(LIBR_ERROR_WRONGFORMAT, "Invalid input file format"); + RETURN(LIBR_ERROR_WRONGFORMAT, "Invalid input file format: not a libbfd object"); + if(bfd_get_flavour(handle) != bfd_target_elf_flavour) + RETURN(LIBR_ERROR_WRONGFORMAT, "Invalid input file format: not an ELF file"); + bfd_set_error(bfd_error_no_error); file_handle->filename = filename; file_handle->bfd_read = handle; file_handle->access = access; @@ -129,7 +132,8 @@ libr_section *chkscn = NULL; asymbol *symbol = symtab[i]; - chkscn = bfd_get_section(symbol); + if(symbol != NULL) + chkscn = bfd_get_section(symbol); if(chkscn != NULL && !keep_symbol(sections, chkscn)) { /* remove the symbol from the table */ @@ -154,7 +158,8 @@ { continue; /* Section has been marked for deletion */ } - oscn = bfd_make_section_anyway_with_flags(ohandle, iscn->name, iscn->flags); + /* Use SEC_LINKER_CREATED to ask the libbfd backend to take care of configuring the section */ + oscn = bfd_make_section_anyway_with_flags(ohandle, iscn->name, iscn->flags | SEC_LINKER_CREATED); if(oscn == NULL) { printf("failed to create out section: %s\n", bfd_errmsg(bfd_get_error())); @@ -220,15 +225,20 @@ return false; /* failed to create section */ } /* Get the old symbol table */ + if((bfd_get_file_flags(ihandle) & HAS_SYMS) == 0) + { + printf("file has no symbol table: %s\n", bfd_errmsg(bfd_get_error())); + return false; + } symtab_size = bfd_get_symtab_upper_bound(ihandle); - if(symtab_size < 0) + if((signed)symtab_size < 0) { printf("failed to get symbol table size: %s\n", bfd_errmsg(bfd_get_error())); return false; } symtab_buffer = malloc(symtab_size); symtab_count = bfd_canonicalize_symtab(ihandle, symtab_buffer); - if(symtab_size < 0) + if(symtab_count < 0) { printf("failed to get symbol table number of entries: %s\n", bfd_errmsg(bfd_get_error())); return false; diff -Nru libr-0.5.0~lucid/src/libr.h libr-0.6.0~lucid/src/libr.h --- libr-0.5.0~lucid/src/libr.h 2010-05-01 19:09:33.000000000 +0000 +++ libr-0.6.0~lucid/src/libr.h 2011-03-02 22:25:01.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2008-2010 Erich Hoover + * Copyright (c) 2008-2011 Erich Hoover * * libr - Add resources into ELF binaries * @@ -31,8 +31,6 @@ #define DEPRECATED_FN __attribute__ ((deprecated)) #define ALIAS_FN(fn) __attribute__ ((weak, alias (#fn))) -#define GUIDSTR_LENGTH 37 - /** * @addtogroup libr_status libr_status * @brief Enumeration of possible libr status values. @@ -93,11 +91,6 @@ LIBR_OVERWRITE = 1 } libr_overwrite_t; -typedef enum { - LIBR_SVG = 0, - LIBR_PNG = 1 -} libr_icontype_t; - #ifdef __LIBR_BUILD__ #include "libr-internal.h" #if __LIBR_BACKEND_libbfd__ diff -Nru libr-0.5.0~lucid/src/libr-icons.c libr-0.6.0~lucid/src/libr-icons.c --- libr-0.5.0~lucid/src/libr-icons.c 2010-05-01 19:12:22.000000000 +0000 +++ libr-0.6.0~lucid/src/libr-icons.c 2011-03-02 22:22:33.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2008-2009 Erich Hoover + * Copyright (c) 2008-2011 Erich Hoover * * libr icons - Add icon resources into ELF binaries * @@ -28,6 +28,9 @@ #include "libr-icons.h" +/* For "one canvas" SVG documents */ +#include "onecanvas.h" + /* For string manipulation */ #include #include @@ -318,7 +321,7 @@ i++; } } - /* Otherwise use the SVG (provided that there is one */ + /* Otherwise use the SVG (provided that there is one) */ if(found_svg) { entry = NULL; @@ -327,9 +330,19 @@ if(entry->type == LIBR_SVG) { libr_icon *icon = libr_icon_geticon_byname(handle, entry->name); + libr_icon *icon_onecanvas; + char *buffer; /* should we report the requested size for SVG? */ icon->icon_size = iconsize; + + /* if the SVG is a "one canvas" document then extract the correctly sized icon */ + if((buffer = onecanvas_geticon_bysize(icon->buffer, iconsize)) != NULL) + { + libr_icon_close(icon); + icon_onecanvas = new_icon_handle(LIBR_SVG, iconsize, buffer, strlen(buffer)); + return icon_onecanvas; + } return icon; } } @@ -497,7 +510,7 @@ /* * Sets the icon GUID for the ELF file */ -EXPORT_FN int libr_icon_setguid(libr_file *handle, char *guid) +EXPORT_FN int libr_icon_setuuid(libr_file *handle, char *guid) { int ret = false; iconlist icons; @@ -538,6 +551,7 @@ free(icons.buffer); return ret; } +EXPORT_FN int libr_icon_setguid(libr_file *handle, char *uuid) ALIAS_FN(libr_icon_setuuid); /* * Add an icon resource to an ELF file diff -Nru libr-0.5.0~lucid/src/libr-icons.h libr-0.6.0~lucid/src/libr-icons.h --- libr-0.5.0~lucid/src/libr-icons.h 2010-05-01 19:11:42.000000000 +0000 +++ libr-0.6.0~lucid/src/libr-icons.h 2011-03-02 22:25:10.000000000 +0000 @@ -1,8 +1,41 @@ +/* + * + * Copyright (c) 2008-2010 Erich Hoover + * + * libr-icons - Handle icon resources in ELF binaries + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * To provide feedback, report bugs, or otherwise contact me: + * ehoover at mines dot edu + * + */ + #ifndef __LIBR_ICONS_H #define __LIBR_ICONS_H #include "libr.h" +typedef enum { + LIBR_SVG = 0, + LIBR_PNG = 1 +} libr_icontype_t; + +#define UUIDSTR_LENGTH 37 +#define GUIDSTR_LENGTH UUIDSTR_LENGTH + #ifdef __LIBR_BUILD__ typedef struct { char *buffer; @@ -112,12 +145,12 @@ * buffer (36 data characters and a NULL terminator). * * @param handle A handle returned by libr_open(3). - * @param uuid The size of the resource to return, use 0 - * to request an SVG icon. + * @param uuid A buffer to store the UUID of the application. * @return Returns 1 on success, 0 on failure. * * @section SA SEE ALSO - * libr_open(3), libr_icon_close(3) + * libr_open(3), libr_icon_close(3), + * libr_icon_setuuid(3) * * @section AUTHOR * Erich Hoover @@ -136,7 +169,33 @@ int libr_icon_read(libr_icon *icon, char *buffer); int libr_icon_size(libr_icon *icon, size_t *size); int libr_icon_save(libr_icon *icon, char *filename); -int libr_icon_setguid(libr_file *handle, char *guid); + +/** + * @page libr_icon_setuuid Write a UUID into an application binary. + * @section SYNOPSIS + * \#include + * + * int libr_icon_setuuid(libr_file *handle, char *uuid); + * + * @section DESCRIPTION + * Sets the icon UUID corresponding to the ELF binary in hex notation + * (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX), which requires a 37 character + * buffer (36 data characters and a NULL terminator). + * + * @param handle A handle returned by libr_open(3). + * @param uuid A UUID to set for the application, can be generated by + * the terminal program "uuid". + * @return Returns 1 on success, 0 on failure. + * + * @section SA SEE ALSO + * libr_open(3), libr_icon_close(3), + * libr_icon_getuuid(3) + * + * @section AUTHOR + * Erich Hoover + */ +int libr_icon_setuuid(libr_file *handle, char *uuid); +DEPRECATED_FN int libr_icon_setguid(libr_file *handle, char *guid); int libr_icon_write(libr_file *handle, libr_icon *icon, char *iconname, libr_overwrite_t overwrite); #endif /* __LIBR_ICONS_H */ diff -Nru libr-0.5.0~lucid/src/Makefile.am libr-0.6.0~lucid/src/Makefile.am --- libr-0.5.0~lucid/src/Makefile.am 2009-12-01 20:37:21.000000000 +0000 +++ libr-0.6.0~lucid/src/Makefile.am 2010-05-06 14:22:01.000000000 +0000 @@ -14,6 +14,7 @@ libr_la_SOURCES = \ libr-@LIBR_BACKEND@.c \ tempfiles.c \ + onecanvas.c \ libr-icons.c \ libr-i18n.c \ libr-gtk.c \ diff -Nru libr-0.5.0~lucid/src/Makefile.in libr-0.6.0~lucid/src/Makefile.in --- libr-0.5.0~lucid/src/Makefile.in 2010-05-01 20:00:03.000000000 +0000 +++ libr-0.6.0~lucid/src/Makefile.in 2011-03-05 20:21:13.000000000 +0000 @@ -78,8 +78,8 @@ "$(DESTDIR)$(libr_la_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libr_la_DEPENDENCIES = -am_libr_la_OBJECTS = libr-@LIBR_BACKEND@.lo tempfiles.lo libr-icons.lo \ - libr-i18n.lo libr-gtk.lo libr.lo +am_libr_la_OBJECTS = libr-@LIBR_BACKEND@.lo tempfiles.lo onecanvas.lo \ + libr-icons.lo libr-i18n.lo libr-gtk.lo libr.lo libr_la_OBJECTS = $(am_libr_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -177,6 +177,8 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ SED = @SED@ @@ -254,6 +256,7 @@ libr_la_SOURCES = \ libr-@LIBR_BACKEND@.c \ tempfiles.c \ + onecanvas.c \ libr-icons.c \ libr-i18n.c \ libr-gtk.c \ @@ -349,6 +352,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libr-i18n.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libr-icons.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onecanvas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempfiles.Plo@am__quote@ .c.o: diff -Nru libr-0.5.0~lucid/src/onecanvas.c libr-0.6.0~lucid/src/onecanvas.c --- libr-0.5.0~lucid/src/onecanvas.c 1970-01-01 00:00:00.000000000 +0000 +++ libr-0.6.0~lucid/src/onecanvas.c 2010-05-06 17:04:06.000000000 +0000 @@ -0,0 +1,446 @@ +/* + * + * Copyright (c) 2010 Erich Hoover + * + * libr "one canvas" - Handle multiple icons stored in a single "one canvas" + * SVG document. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * To provide feedback, report bugs, or otherwise contact me: + * ehoover at mines dot edu + * + */ + +#include +#include +#include +#include +#include + +#define FALSE 0 +#define TRUE 1 + +typedef struct { + double x; + double y; + double width; + double height; + int icon_width; + int icon_height; +} IconSVG; + +typedef enum { + STATUS_FINDSVG, + STATUS_FINDMETADATA, + STATUS_FINDPUBLISHER_START, + STATUS_FINDPUBLISHER_STOP, + STATUS_FINDHIDDEN, + STATUS_FINDBOUNDS, + STATUS_FAILED, + STATUS_DONE, +} eStatus; + +typedef struct { + IconSVG **iconlist; + int iconlist_num; + eStatus status; + + char *hidden_stop; + char *hidden_start; + char *publisher_stop; + char *publisher_start; + char *coordinate_stop; + char *coordinate_start; +} OneCanvasIconInfo; + +/* + * Find the start of the next XML tag (search for '<') + */ +static inline char *xml_nextTag(char *c) +{ + c++; + if(c == NULL) + return NULL; + return strchr(c, '<'); +} + +/* + * Pull out the name/type of a tag. + */ +static inline char *xml_getTagName(char *c) +{ + char *tag_end = NULL, *tag_space, *tag_close, *tag_feed, *tag_line; + static char tagname[20]; + int tag_len; + + if(++c == NULL) + return NULL; + tag_space = strchr(c, ' '); + tag_close = strchr(c, '>'); + tag_feed = strchr(c, '\r'); + tag_line = strchr(c, '\n'); + if(tag_space) + tag_end = tag_space; + if(tag_close && tag_end > tag_close) + tag_end = tag_close; + if(tag_feed && tag_end > tag_feed) + tag_end = tag_feed; + if(tag_line && tag_end > tag_line) + tag_end = tag_line; + if(!tag_end) + return NULL; + tag_len = tag_end - c; + tag_len = tag_len > 19 ? 19 : tag_len; + strncpy(tagname, c, tag_len); + tagname[tag_len] = '\0'; + return tagname; +} + +/* + * Find the position in the string corresponding to a particular named attribute. + */ +static inline char *xml_getTagAttributePtr(char *c, char *attrname) +{ + char *end, *name; + int found; + + if(++c == NULL) + return NULL; + end = strchr(c, '>'); + while(c < end) + { + int name_len; + char *equal; + + equal = c = strchr(c, '='); + if(c == NULL) + break; + c++; + name = equal; + while(name[0] != ' ' && name[0] != '\t' && name[0] != '\n') + name--; + name++; /* don't include the space */ + name_len = equal-name; + if(name_len != strlen(attrname)) + continue; + if(strncasecmp(attrname, name, name_len) == 0) + { + found = TRUE; + break; + } + } + if(!found) + return NULL; + return c-strlen(attrname)-1; +} + +/* + * Return the value of an XML tag's named attribute. + */ +static inline char *xml_getTagAttribute(char *c, char *attrname) +{ + char *data_end; + int data_len; + char *attr; + + c = xml_getTagAttributePtr(c, attrname); + if(c == NULL) + return NULL; + c+=strlen(attrname); /* skip the name */ + c+=2; /* skip the equals sign and the quote */ + data_end = strchr(c, '"'); + data_len = data_end - c; + attr = (char *) malloc(data_len+1); + strncpy(attr, c, data_len); + attr[data_len] = '\0'; + return attr; +} + +/* + * Find the value of an XML tag attribute and convert it to a number. + */ +static inline double xml_getTagAttributeFloat(char *c, char *attrname) +{ + char *value = xml_getTagAttribute(c, attrname); + double ret; + + if(!value) + return nan("nan"); + sscanf(value, "%lf", &ret); + free(value); + return ret; +} + +/* + * Match the beginning an XML tag by "id" (preferred) or Inkscape's + * label (undesireable but acceptable). + */ +static inline char *xml_idMatchStart(char *stream_pos, char *layer_name) +{ + char *id_acceptable = xml_getTagAttribute(stream_pos, "inkscape:label"); + char *id_preferred = xml_getTagAttribute(stream_pos, "id"); + + if(id_preferred && strncasecmp(id_preferred, layer_name, strlen(layer_name)) == 0) + { + free(id_acceptable); + return id_preferred; + } + if(id_acceptable && strncasecmp(id_acceptable, layer_name, strlen(layer_name)) == 0) + { + free(id_preferred); + return id_acceptable; + } + free(id_acceptable); + free(id_preferred); + return NULL; +} + +/* + * Match the entirety of an XML tag by "id" (preferred) or Inkscape's + * label (undesireable but acceptable). + */ +static inline int xml_idMatch(char *stream_pos, char *layer_name) +{ + char *id_acceptable = xml_getTagAttribute(stream_pos, "inkscape:label"); + char *id_preferred = xml_getTagAttribute(stream_pos, "id"); + int ret = FALSE; + + if((id_preferred && strcasecmp(id_preferred, layer_name) == 0) + || (id_acceptable && strcasecmp(id_acceptable, layer_name) == 0)) + ret = TRUE; + free(id_acceptable); + free(id_preferred); + return ret; +} + +/* + * Strip all the XML tags from a string and return only the data not + * contained within any tags. + */ +static inline char *xml_stripTags(char *data, int len) +{ + char *ret = (char *) malloc(len+1); + char *tag_left, *tag_right; + + memcpy(ret, data, len+1); + ret[len] = '\0'; + while((tag_left = strchr(ret, '<')) != NULL) + { + tag_right = strchr(ret, '>'); + memmove(tag_left, tag_right+1, strlen(ret)-(tag_right-ret)); + } + return ret; +} + +/* + * Return the information for all of the icons within a "one-canvas" + * data stream. + */ +OneCanvasIconInfo onecanvas_geticons(char *stream) +{ + eStatus status = STATUS_FINDSVG; + unsigned int stream_size = 0; + OneCanvasIconInfo info; + char *publisher = NULL; + char *stream_pos; + int i; + + memset(&info, 0, sizeof(info)); + stream_pos = stream; + while(stream_pos) + { + char *name = xml_getTagName(stream_pos); + + if(!name) + { + stream_pos = xml_nextTag(stream_pos); + continue; + } + switch(status) + { + case STATUS_FINDSVG: + { + if(strcasecmp(name, "svg") == 0) + { + info.coordinate_start = xml_getTagAttributePtr(stream_pos, "x"); + info.coordinate_stop = xml_getTagAttributePtr(stream_pos, "viewBox"); + if(info.coordinate_start == NULL || info.coordinate_stop == NULL) + { + status = STATUS_FAILED; + break; + } + info.coordinate_stop = strchr(info.coordinate_stop, '"')+1; + info.coordinate_stop = strchr(info.coordinate_stop, '"')+1; + status = STATUS_FINDMETADATA; + } + } break; + case STATUS_FINDMETADATA: + { + if(strcasecmp(name, "metadata") == 0) + { + status = STATUS_FINDPUBLISHER_START; + } + else if(strcasecmp(name, "/svg") == 0) + { + status = STATUS_FAILED; + } + } break; + case STATUS_FINDPUBLISHER_START: + { + if(strcasecmp(name, "dc:publisher") == 0) + { + status = STATUS_FINDPUBLISHER_STOP; + info.publisher_start = stream_pos + strlen(""); + } + else if(strcasecmp(name, "/metadata") == 0) + { + status = STATUS_FAILED; + } + } break; + case STATUS_FINDPUBLISHER_STOP: + { + if(strcasecmp(name, "/dc:publisher") == 0) + { + info.publisher_stop = stream_pos; + publisher = xml_stripTags(info.publisher_start, info.publisher_stop-info.publisher_start); + if(strcasecmp(publisher, "one-canvas") == 0) + status = STATUS_FINDHIDDEN; + else + status = STATUS_FAILED; + } + else if(strcasecmp(name, "/metadata") == 0) + { + status = STATUS_FAILED; + } + } break; + case STATUS_FINDHIDDEN: + { + if(strcasecmp(name, "g") == 0) + { + if(xml_idMatch(stream_pos, "hidden")) + { + char *style_start; + + info.hidden_start = stream_pos; + info.hidden_stop = info.hidden_start; + style_start = xml_getTagAttributePtr(stream_pos, "style"); + if(style_start) + { + info.hidden_start = style_start; + info.hidden_stop = strchr(style_start, '"')+1; + info.hidden_stop = strchr(info.hidden_stop, '"')+1; + } + else + { + info.hidden_start += strlen("x = xml_getTagAttributeFloat(stream_pos, "x"); + icon->y = xml_getTagAttributeFloat(stream_pos, "y"); + icon->width = xml_getTagAttributeFloat(stream_pos, "width"); + icon->height = xml_getTagAttributeFloat(stream_pos, "height"); + sscanf(layer_name, "iconlayer-%dx%d", &(icon->icon_width), &(icon->icon_height)); + free(layer_name); + status = STATUS_FINDBOUNDS; + info.iconlist = (IconSVG **) realloc(info.iconlist, (info.iconlist_num+1)*sizeof(IconSVG *)); + info.iconlist[info.iconlist_num] = icon; + info.iconlist_num++; + } + } + else if(strcasecmp(name, "/g") == 0) + { + status = STATUS_DONE; + } + } break; + default: + break; + } + if(status == STATUS_DONE || status == STATUS_FAILED) + break; + stream_pos = xml_nextTag(stream_pos); + } + free(publisher); + info.status = status; + return info; +} + +/* + * Obtain a single icon from the "one-canvas" stream corresponding + * to a particular icon size. + */ +char *onecanvas_geticon_bysize(char *icon_data, int requested_size) +{ + OneCanvasIconInfo info = onecanvas_geticons(icon_data); + char *ret = NULL; + int i; + + if(info.status == STATUS_DONE && info.iconlist_num > 0) + { + int closest_diff = abs(info.iconlist[0]->icon_width - requested_size); + int tocoord_length, topubl_length, tohidden_length; + int icon_id = 0; + IconSVG *icon; + int ret_max; + + for(i=0;iicon_width - requested_size); + + if(size_diff < closest_diff) + { + closest_diff = size_diff; + icon_id = i; + } + } + icon = info.iconlist[icon_id]; + /* Note: 200 characters is a very generous over estimate for the data we add in */ + ret_max = strlen(icon_data)+1+200; + ret = (char *) malloc(ret_max); + tocoord_length = info.coordinate_start-icon_data; + snprintf(ret, ret_max, "%.*s", tocoord_length, icon_data); + /* Output the coordinates of the icon */ + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "\nx=\"0px\"\ny=\"0px\"\n"); + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "width=\"%d\"\n", icon->icon_width); + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "height=\"%d\"\n", icon->icon_height); + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "viewBox=\"%lf %lf %lf %lf\"\n", icon->x, icon->y, icon->width, icon->height); + topubl_length = info.publisher_start-info.coordinate_stop; + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "%.*s", topubl_length, info.coordinate_stop); + /* Hide the "hidden" layer */ + tohidden_length = info.hidden_start-info.publisher_stop; + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "%.*s", tohidden_length, info.publisher_stop); + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "\ndisplay=\"none\"\n"); + /* Output the rest of the document */ + snprintf(&ret[strlen(ret)], ret_max-strlen(ret), "%s", info.hidden_stop); + } + for(i=0;i