pyrenamer-0.6.0/0000777000175000017500000000000011064200213010511 500000000000000pyrenamer-0.6.0/aclocal.m40000644000175000017500000021204111063757375012316 00000000000000# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.61],, [m4_warning([this file was generated for autoconf 2.61. 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'.])]) dnl AM_GCONF_SOURCE_2 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas dnl (i.e. pass to gconftool-2 dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where dnl you should install foo.schemas files dnl AC_DEFUN([AM_GCONF_SOURCE_2], [ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` else GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi AC_ARG_WITH(gconf-source, [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi AC_ARG_WITH(gconf-schema-file-dir, [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) AC_SUBST(GCONF_SCHEMA_FILE_DIR) AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) AC_ARG_ENABLE(schemas-install, [ --disable-schemas-install Disable the schemas installation], [case ${enableval} in yes|no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;; esac]) AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) ]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 36 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [AC_PREREQ([2.50])dnl case "$am__api_version" in 1.[01234]) AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) ;; *) ;; esac if test -n "$1"; then AC_MSG_CHECKING([for intltool >= $1]) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' AC_SUBST(INTLTOOL_DESKTOP_RULE) AC_SUBST(INTLTOOL_DIRECTORY_RULE) AC_SUBST(INTLTOOL_KEYS_RULE) AC_SUBST(INTLTOOL_PROP_RULE) AC_SUBST(INTLTOOL_OAF_RULE) AC_SUBST(INTLTOOL_PONG_RULE) AC_SUBST(INTLTOOL_SERVER_RULE) AC_SUBST(INTLTOOL_SHEET_RULE) AC_SUBST(INTLTOOL_SOUNDLIST_RULE) AC_SUBST(INTLTOOL_UI_RULE) AC_SUBST(INTLTOOL_XAM_RULE) AC_SUBST(INTLTOOL_KBD_RULE) AC_SUBST(INTLTOOL_XML_RULE) AC_SUBST(INTLTOOL_XML_NOMERGE_RULE) AC_SUBST(INTLTOOL_CAVES_RULE) AC_SUBST(INTLTOOL_SCHEMAS_RULE) AC_SUBST(INTLTOOL_THEME_RULE) AC_SUBST(INTLTOOL_SERVICE_RULE) AC_SUBST(INTLTOOL_POLICY_RULE) # Check the gettext tools to make sure they are GNU AC_PATH_PROG(XGETTEXT, xgettext) AC_PATH_PROG(MSGMERGE, msgmerge) AC_PATH_PROG(MSGFMT, msgfmt) if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi # Use the tools built into the package, not the ones that are installed. AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge') AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update') AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found; required for intltool]) fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then AC_MSG_ERROR([perl 5.x required for intltool]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr]])], [DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share dnl in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [DATADIRNAME=share], [DATADIRNAME=lib]) ;; *) [DATADIRNAME=lib] ;; esac]) fi AC_SUBST(DATADIRNAME) IT_PO_SUBDIR([po]) dnl The following is very similar to dnl dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update]) dnl dnl with the following slight differences: dnl - the *.in files are in ac_aux_dir, dnl - if the file haven't changed upon reconfigure, it's not touched, dnl - the evaluation of the third parameter enables a hack which computes dnl the actual value of $libdir, dnl - the user sees "executing intltool commands", instead of dnl "creating intltool-extract" and such. dnl dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were dnl a reason for it. AC_CONFIG_COMMANDS([intltool], [ for file in intltool-extract intltool-merge intltool-update; do sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ < ${ac_aux_dir}/${file}.in > ${file}.out if cmp -s ${file} ${file}.out 2>/dev/null; then rm -f ${file}.out else mv -f ${file}.out ${file} fi chmod ugo+x ${file} chmod u+w ${file} done ], [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}']) ]) # IT_PO_SUBDIR(DIRNAME) # --------------------- # All po subdirs have to be declared with this macro; the subdir "po" is # declared by IT_PROG_INTLTOOL. # AC_DEFUN([IT_PO_SUBDIR], [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. dnl dnl The following CONFIG_COMMANDS should be exetuted at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" >"$1/stamp-it.tmp" [sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" ] if test ! -f "$1/Makefile"; then AC_MSG_ERROR([$1/Makefile is not ready.]) fi mv "$1/Makefile" "$1/Makefile.tmp" [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } ' "$1/Makefile.tmp" >"$1/Makefile"] rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ]) ])dnl ]) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # A hint is needed for aclocal from Automake <= 1.9.4: # AC_DEFUN([AC_PROG_INTLTOOL], ...) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- 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 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # 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 # -------------------------------------------------------------- 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_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 fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _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"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 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 [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # hexversion has been introduced in Python 1.5.2; it's probably not # worth to support older versions (1.5.1 was released on October 31, 1998). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR pyrenamer-0.6.0/intltool-extract.in0000644000175000017500000005565411064200174014316 00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Extractor # # Copyright (C) 2000-2001, 2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Darin Adler # ## Release information my $PROGRAM = "intltool-extract"; my $PACKAGE = "intltool"; my $VERSION = "0.37.1"; ## Loaded modules use strict; use File::Basename; use Getopt::Long; ## Scalars used by the option stuff my $TYPE_ARG = "0"; my $LOCAL_ARG = "0"; my $HELP_ARG = "0"; my $VERSION_ARG = "0"; my $UPDATE_ARG = "0"; my $QUIET_ARG = "0"; my $SRCDIR_ARG = "."; my $FILE; my $OUTFILE; my $gettext_type = ""; my $input; my %messages = (); my %loc = (); my %count = (); my %comments = (); my $strcount = 0; my $XMLCOMMENT = ""; ## Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; ## Always print first $| = 1; ## Handle options GetOptions ( "type=s" => \$TYPE_ARG, "local|l" => \$LOCAL_ARG, "help|h" => \$HELP_ARG, "version|v" => \$VERSION_ARG, "update" => \$UPDATE_ARG, "quiet|q" => \$QUIET_ARG, "srcdir=s" => \$SRCDIR_ARG, ) or &error; &split_on_argument; ## Check for options. ## This section will check for the different options. sub split_on_argument { if ($VERSION_ARG) { &version; } elsif ($HELP_ARG) { &help; } elsif ($LOCAL_ARG) { &place_local; &extract; } elsif ($UPDATE_ARG) { &place_normal; &extract; } elsif (@ARGV > 0) { &place_normal; &message; &extract; } else { &help; } } sub place_normal { $FILE = $ARGV[0]; $OUTFILE = "$FILE.h"; my $dirname = dirname ($OUTFILE); if (! -d "$dirname" && $dirname ne "") { system ("mkdir -p $dirname"); } } sub place_local { $FILE = $ARGV[0]; $OUTFILE = fileparse($FILE, ()); if (!-e "tmp/") { system("mkdir tmp/"); } $OUTFILE = "./tmp/$OUTFILE.h" } sub determine_type { if ($TYPE_ARG =~ /^gettext\/(.*)/) { $gettext_type=$1 } } ## Sub for printing release information sub version{ print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Copyright (C) 2000, 2003 Free Software Foundation, Inc. Written by Kenneth Christiansen, 2000. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... [FILENAME] Generates a header file from an XML source file. It grabs all strings between <_translatable_node> and its end tag in XML files. Read manpage (man ${PROGRAM}) for more info. --type=TYPE Specify the file type of FILENAME. Currently supports: "gettext/glade", "gettext/ini", "gettext/keys" "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml", "gettext/quoted", "gettext/quotedxml" -l, --local Writes output into current working directory (conflicts with --update) --update Writes output into the same directory the source file reside (conflicts with --local) --srcdir Root of the source tree -v, --version Output version information and exit -h, --help Display this help and exit -q, --quiet Quiet mode Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub error{ print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub message { print "Generating C format header file for translation.\n" unless $QUIET_ARG; } sub extract { &determine_type; &convert; open OUT, ">$OUTFILE"; binmode (OUT) if $^O eq 'MSWin32'; &msg_write; close OUT; print "Wrote $OUTFILE\n" unless $QUIET_ARG; } sub convert { ## Reading the file { local (*IN); local $/; #slurp mode open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; $input = ; } &type_ini if $gettext_type eq "ini"; &type_keys if $gettext_type eq "keys"; &type_xml if $gettext_type eq "xml"; &type_glade if $gettext_type eq "glade"; &type_scheme if $gettext_type eq "scheme"; &type_schemas if $gettext_type eq "schemas"; &type_rfc822deb if $gettext_type eq "rfc822deb"; &type_quoted if $gettext_type eq "quoted"; &type_quotedxml if $gettext_type eq "quotedxml"; } sub entity_decode_minimal { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; return $_; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/<//g; s/&/&/g; return $_; } sub escape_char { return '\"' if $_ eq '"'; return '\n' if $_ eq "\n"; return '\\\\' if $_ eq '\\'; return $_; } sub escape { my ($string) = @_; return join "", map &escape_char, split //, $string; } sub type_ini { ### For generic translatable desktop files ### while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) { if (defined($2)) { $comments{$3} = $2; } $messages{$3} = []; } } sub type_keys { ### For generic translatable mime/keys files ### while ($input =~ /^\s*_\w+=(.*)$/mg) { $messages{$1} = []; } } sub type_xml { ### For generic translatable XML files ### my $tree = readXml($input); parseTree(0, $tree); } sub print_var { my $var = shift; my $vartype = ref $var; if ($vartype =~ /ARRAY/) { my @arr = @{$var}; print "[ "; foreach my $el (@arr) { print_var($el); print ", "; } print "] "; } elsif ($vartype =~ /HASH/) { my %hash = %{$var}; print "{ "; foreach my $key (keys %hash) { print "$key => "; print_var($hash{$key}); print ", "; } print "} "; } else { print $var; } } # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) sub getAttributeString { my $sub = shift; my $do_translate = shift || 1; my $language = shift || ""; my $translate = shift; my $result = ""; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; ## differences from intltool-merge.in.in if ($key =~ /^_/) { $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; $messages{entity_decode($string)} = []; $$translate = 2; } ## differences end here from intltool-merge.in.in $result .= " $key=$quote$string$quote"; } return $result; } # Verbatim copy from intltool-merge.in.in sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } # Based on traverse() in intltool-merge.in.in sub traverse { my $fh = shift; # unused, to allow us to sync code between -merge and -extract my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if ($nodename && "$nodename" eq "1") { $XMLCOMMENT = $content; } elsif ($nodename) { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup && $translate != 2) { $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; $messages{$lookup} = []; } elsif ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } } else { $XMLCOMMENT = ""; my $count = scalar(@all); if ($count > 0) { my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } } $XMLCOMMENT = ""; } } # Verbatim copy from intltool-merge.in.in, $fh for compatibility sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_comment { my $expat = shift; my $data = $expat->original_string(); my $clist = $expat->{Curlist}; my $pos = $#$clist; $data =~ s/^$//s; push @$clist, 1 => $data; } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } # Verbatim copy from intltool-merge.in.in sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } # Copied from intltool-merge.in.in and added comment handler. sub readXml { my $xmldoc = shift || return; my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); ## differences from intltool-merge.in.in $xp->setHandlers(Comment => \&intltool_tree_comment); ## differences end here from intltool-merge.in.in my $tree = $xp->parse($xmldoc); #print_var($tree); # Hello thereHowdydo # would be: # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub type_schemas { ### For schemas XML files ### # FIXME: We should handle escaped < (less than) while ($input =~ / \s* (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? <\/locale> /sgx) { my @totranslate = ($3,$6,$9); my @eachcomment = ($2,$5,$8); foreach (@totranslate) { my $currentcomment = shift @eachcomment; next if !$_; s/\s+/ /g; $messages{entity_decode_minimal($_)} = []; $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); } } } sub type_rfc822deb { ### For rfc822-style Debian configuration files ### my $lineno = 1; my $type = ''; while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) { my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); while ($pre =~ m/\n/g) { $lineno ++; } $lineno += length($newline); my @str_list = rfc822deb_split(length($underscore), $text); for my $str (@str_list) { $strcount++; $messages{$str} = []; $loc{$str} = $lineno; $count{$str} = $strcount; my $usercomment = ''; while($pre =~ s/(^|\n)#([^\n]*)$//s) { $usercomment = "\n" . $2 . $usercomment; } $comments{$str} = $tag . $usercomment; } $lineno += ($text =~ s/\n//g); } } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub type_quoted { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_quotedxml { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $message = entity_decode($message); $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_glade { ### For translatable Glade XML files ### my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { # Glade sometimes uses tags that normally mark translatable things for # little bits of non-translatable content. We work around this by not # translating strings that only includes something like label4 or window1. $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; } while ($input =~ /(..[^<]*)<\/items>/sg) { for my $item (split (/\n/, $1)) { $messages{entity_decode($item)} = []; } } ## handle new glade files while ($input =~ /<(property|atkproperty|col)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { $comments{entity_decode($3)} = entity_decode($2) ; } } while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { $messages{entity_decode_minimal($2)} = []; } } sub type_scheme { my ($line, $i, $state, $str, $trcomment, $char); for $line (split(/\n/, $input)) { $i = 0; $state = 0; # 0 - nothing, 1 - string, 2 - translatable string while ($i < length($line)) { if (substr($line,$i,1) eq "\"") { if ($state == 2) { $comments{$str} = $trcomment if ($trcomment); $messages{$str} = []; $str = ''; $state = 0; $trcomment = ""; } elsif ($state == 1) { $str = ''; $state = 0; $trcomment = ""; } else { $state = 1; $str = ''; if ($i>0 && substr($line,$i-1,1) eq '_') { $state = 2; } } } elsif (!$state) { if (substr($line,$i,1) eq ";") { $trcomment = substr($line,$i+1); $trcomment =~ s/^;*\s*//; $i = length($line); } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { $trcomment = ""; } } else { if (substr($line,$i,1) eq "\\") { $char = substr($line,$i+1,1); if ($char ne "\"" && $char ne "\\") { $str = $str . "\\"; } $i++; } $str = $str . substr($line,$i,1); } $i++; } } } sub msg_write { my @msgids; if (%count) { @msgids = sort { $count{$a} <=> $count{$b} } keys %count; } else { @msgids = sort keys %messages; } for my $message (@msgids) { my $offsetlines = 1; $offsetlines++ if $message =~ /%/; if (defined ($comments{$message})) { while ($comments{$message} =~ m/\n/g) { $offsetlines++; } } print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" if defined $loc{$message}; print OUT "/* ".$comments{$message}." */\n" if defined $comments{$message}; print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; my @lines = split (/\n/, $message, -1); for (my $n = 0; $n < @lines; $n++) { if ($n == 0) { print OUT "char *s = N_(\""; } else { print OUT " \""; } print OUT escape($lines[$n]); if ($n < @lines - 1) { print OUT "\\n\"\n"; } else { print OUT "\");\n"; } } } } pyrenamer-0.6.0/ChangeLog0000644000175000017500000005552611064173057012233 000000000000002008-09-17 Adolfo González Blázquez * Version 0.6.0 Released 2008-09-17 Adolfo González Blázquez * src/pyrenamer_pattern_editor.py: (get_patterns): Added better default patterns for music and images. 2008-09-17 Adolfo González Blázquez * src/pyrenamer.py: (__init)), (enable_rename_and_clean), (on_manual_key_press_event): Fix enabling/disabling rename button. 2008-09-17 Adolfo González Blázquez * src/pyrenamer.py: (on_manual_key_press_event): Another fix for manual renaming using keys: set correct single selection mode. 2008-09-17 Adolfo González Blázquez * src/pyrenamer.py: (on_rename_button_clicked): Disable redo menu option when you've just renamed. 2008-09-17 Adolfo González Blázquez * src/pyrenamer.py: (on_manual_key_press_event), (on_clean_button_clicked): Fix problems on manual rename: cleaning and changing file with keys. 2008-09-17 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows): Fix another stupid bug introduced by me, that prevented substitutions to work when fix duplicated was not selected. 2008-09-17 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (replace_duplicated): Remove stupid print statement. 2008-09-17 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows): Revert change that prevented to use several substitutions (tab 2) at the same time. 2008-09-16 Adolfo González Blázquez * data/pyrenamer.schemas.in: Change 'filedir' schema to 'options_filedir'. 2008-09-16 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows), * src/pyrenamer_filefuncs.py: (replace_music_hachoir), (replace_music_eyed3), (clean_metadata): Revert previous commit. Instead, clean each tag while is read. Don't use this for image metadata. 2008-09-16 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows), * src/pyrenamer_filefuncs.py: (replace_music_eyed3): Do music/images patterns rename before applying general patterns, so cleaning metadata bad characters doesn't remove things like dir/{1}. 2008-09-16 Adolfo González Blázquez * src/pyrenamer.py: (rename_rows), * src/pyrenamer_filefuncs.py: (rename_file): Display more information on error dialog. 2008-09-15 Adolfo González Blázquez * src/pyrenamer_pattern_editor.py: (create_window): Set the pattern editor window title translatable. 2008-09-15 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows): In subs tab, if nothing is selected, don't enable rename. 2008-09-15 Adolfo González Blázquez * src/pyrenamer.py: (on_preview_button_clicked): If nothing needs to be renamed, disable the Rename button. 2008-09-15 Adolfo González Blázquez * src/pyrenamer.py: (__init__), (on_main_window_configure_event): Fix error placing the main window and setting it to correct width. 2008-09-15 Adolfo González Blázquez * src/treefilebrowser.py: (check_active_dir): Check if a directory is suitable for setting the active dir. 2008-09-15 Adolfo González Blázquez * src/pyrenamer.py: (__init__), (rename_rows), (on_rename_button_clicked), (display_error_dialog): Add option to ignore next errors while renaming. 2008-09-15 Adolfo González Blázquez * src/pyrenamer.py: (__init__), (dir_selected): Fix bug that makes the treeview populate twice, for example, when changing from "Show Directories" to "Show Files" very fast. 2008-09-15 Adolfo González Blázquez * src/pyrenamer.py: (get_icon): Add mime type for video files, so they display a correct icon. 2008-09-15 Adolfo González Blázquez * data/pyrenamer.glade: Updated tooltip for music renaming patterns. 2008-09-12 Adolfo González Blázquez * src/pyrenamer.py: (__init__): * src/pyrenamer_filefuncs.py: (replace_music_hachoir), (replace_music_eyed3): * src/pyrenamer_globals.py.in: For music rename first try to use hachoir, then eyed3. 2008-09-12 Adolfo González Blázquez * configure.ac: Don't check for python-eyed3 or python-hachoir-metadata, because we do it on runtime. 2008-09-11 Adolfo González Blázquez * data/pyrenamer.glade: Changed some strings. 2008-09-11 Adolfo González Blázquez * src/pyrenamer_prefs.py: (preferences_save): Get pane position from main variable, not from the pane itself. 2008-09-11 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (get_file_listing_recursive): Forgot to add root directory contents to the list on previous commit. 2008-09-11 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (get_file_listing_recursive): Reverse elements on recursive listing, so we rename deeper files and directories first. 2008-09-10 Adolfo González Blázquez * src/pyrenamer_prefs.py: (on_prefs_close_clicked), (on_prefs_destroy): Fixed bug when trying to display error dialog on bad preferences. 2008-09-10 Adolfo González Blázquez * data/pyrenamer.glade: * src/pyrenamer.py: (__init__), (preview_rename_rows): * src/pyrenamer_filefuncs.py: (replace_duplicated): Fix duplicted symbols (change ... to . or ' ' to ' '). 2008-09-10 Adolfo González Blázquez * src/pyrenamer.py: (on_notebook_switch_page): When changing to manual rename put the selected filename on the text field to rename. 2008-09-10 Adolfo González Blázquez * data/pyrenamer.glade: * data/pyrenamer.schemas.in: * src/pyrenamer.py: (__init__), (on_original_pattern_changed), (on_renamed_pattern_changed), (on_subs_spaces_combo_changed), (on_subs_capitalization_combo_changed), (on_subs_replace_orig_changed), (on_subs_replace_new_changed), (on_insert_entry_changed), (on_insert_pos_changed), (on_delete_from_changed), (on_delete_to_changed), (on_manual_changed), (on_images_original_pattern_changed), (on_images_renamed_pattern_changed), (on_music_original_pattern_changed), (on_music_renamed_pattern_changed), (on_original_pattern_combo_changed), (on_renamed_pattern_combo_changed), (on_images_original_pattern_combo_changed), (on_images_renamed_pattern_combo_changed), (on_music_original_pattern_combo_changed), (on_music_renamed_pattern_combo_changed): * src/pyrenamer_prefs.py: (__init__), (on_autopreview_check_toggled), (preferences_save), (preferences_read): Add autopreview option. 2008-09-10 Adolfo González Blázquez * data/pyrenamer.glade: * src/pyrenamer.py: (__init__): * src/pyrenamer_menu_cb.py: (on_menu_refresh_activate): Add refresh option to view menu (F5) to reload files and directories. 2008-09-10 Adolfo González Blázquez * src/treefilebrowser.py: (set_active_dir): Don't expand last row while activating. 2008-09-10 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (replace_capitalization): Fix file capitalization. 2008-09-10 Adolfo González Blázquez * src/pyrenamer.py: (__init__): Fixed bug: If root or active dir is hidden pyrenamer fails. * src/treefilebrowser.py: (set_show_hidden), (button_pressed), (create_popup): Fix some bugs with hidden dirs/files. Right-click doesn't select file anymore. 2008-09-10 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (replace_with), (rename_using_patterns), (insert_at), (delete_from): Reverted clean filename. Only do it for music and images, so we can use patterns like "dir/{1}" to move files to another directory. 2008-09-10 Adolfo González Blázquez * data/pyrenamer.glade: * src/Makefile.am: * src/pyrenamer.py: (__init__), i(rename_rows), (on_rename_button_clicked): * src/pyrenamer_menu_cb.py: (PyrenamerMenuCB): * src/pyrenamer_undo.py: Added support for undo/redo last rename operation. 2008-09-10 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (replace_with), (rename_using_patterns), (replace_images), (replace_music), (insert_at), (add_extension), (clean_filename): Clean filename of special characters. 2008-09-10 Adolfo González Blázquez * data/pyrenamer.glade: * src/pyrenamer_filefuncs.py: (replace_music): Use 'myear' for getting an album year in music renaming, instead of year, which is used for getting current year. 2008-09-10 Adolfo González Blázquez * configure.ac: * src/pyrenamer.py: * src/pyrenamer_filefuncs.py: (replace_music), (replace_music_old): * src/pyrenamer_globals.py.in: Use hachoir_metadata instead of eyed3 for music renaming. 2008-09-09 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows): Remove uneeded print statement. 2008-09-09 Adolfo González Blázquez * src/pyrenamer_pattern_editor.py: (get_patterns): Fixed typo which set bad initial pattern. 2008-09-09 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (replace_music): Fix crash when a id3 tag is not available or wrong. 2008-09-09 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (get_exif_data): Fix crash while proccesing some bad exif tags (Closes launchpad #261832). 2008-09-09 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (add_extension): Fix crashing when extension or name are empty. 2008-09-09 Adolfo González Blázquez * data/pyrenamer.svg: * data/pyrenamer.png: New icon. 2008-09-09 Adolfo González Blázquez * src/pyrenamer.py: (__init__), (populate_pattern_combos), (on_original_pattern_combo_changed), (on_renamed_pattern_combo_changed), (on_images_original_pattern_combo_changed), (on_images_renamed_pattern_combo_changed), (on_music_original_pattern_combo_changed), (on_music_renamed_pattern_combo_changed): * src/pyrenamer_pattern_editor.py: (get_patterns): Remember default selected pattern after launch editor. On start, we select the first option. 2008-09-09 Adolfo González Blázquez * src/pyrenamer.py: (__init__), (populate_pattern_combos), (on_pattern_ori_save_clicked), (on_pattern_dest_save_clicked), (on_images_ori_save_clicked), (on_images_dest_save_clicked), (on_music_ori_save_clicked), (on_music_dest_save_clicked): * src/pyrenamer_pattern_editor.py: (populate_treeview): Changed main patterns variable from list to dictionary 2008-09-09 Adolfo González Blázquez * src/pyrenamer.py: (on_pattern_ori_save_clicked), (on_pattern_dest_save_clicked), (on_images_ori_save_clicked), (on_images_dest_save_clicked), (on_music_ori_save_clicked), (on_music_dest_save_clicked): * src/pyrenamer_pattern_editor.py: (add_pattern): Save pattern from main UI using the little button 2008-09-09 Adolfo González Blázquez * src/pyrenamer_globals.py.in: Updated copyright date 2008-09-08 Adolfo González Blázquez * data/pyrenamer.glade: * src/Makefile.am: * src/pyrenamer.py: * src/pyrenamer_globals.py.in: Preliminary support for remebering patterns 2008-09-08 Adolfo González Blázquez * src/pyrenamer.py: (__init__): * src/pyrenamer_globals.py: New global variables: home_dir and config_dir * src/pyrenamer.glade: Added UI support for saving patterns 2008-06-17 Adolfo González Blázquez * src/pyrenamer_filefuncs.py: (rename_file): Allow renamimg files and moving them to another directory 2008-04-18 Adolfo González Blázquez * doc/treefilebrowser_example.py: * src/pyrenamer.py: * src/pyrenamer_filefuncs.py: * src/pyrenamer_menu_cb.py: * src/pyrenamer_metadata.py: * src/pyrenamer_prefs.py: * src/pyrenamer_tooltips.py: * src/treefilebrowser.py: Updated date on copyright header * src/pyrenamer_metadata.py: (get_artist): "Artist" and "Author" are both correct tags for Artist 2008-04-17 Adolfo González Blázquez * src/pyrenamer.py: (preview_rename_rows): Fix extension keeping for music and images * src/pyrenamer_filefuncs.py: (replace_music): Added zero fill to tracks (1 -> 01) * src/pyrenamer.py: (preview_rename_rows): Fix extension keeping for music and images * src/pyrenamer_filefuncs.py: (replace_music), (replace_music_old), (add_extension): Initial support for hachoir music metadata extraction * src/pyrenamer.py: (preview_rename_rows): * src/pyrenamer_filefuncs.py: (add_extension): Keep extension not valid on manual rename 2008-04-16 Adolfo González Blázquez * data/pyrenamer.glade: * data/pyrenamer.schemas.in: * src/pyrenamer.py: (__init__), (preview_rename_rows), (options_panel_state), (populate_get_listing): * src/pyrenamer_filefuncs.py: (replace_music), (delete_from), (cut_extension), (add_extension): * src/pyrenamer_prefs.py: (__init__), (on_add_recursive_toggled), (on_filedir_combo_changed), (on_extensions_check_toggled), (preferences_save), (preferences_read): Added option to ignore files extensions * data/pyrenamer.glade: * src/pyrenamer_filefuncs.py: (rename_using_patterns): Added random number pattern {rand} * src/pyrenamer.py: (create_model), (populate_add_to_view), (populate_from_file), (get_icon): Added mime icon to files * src/pyrenamer.py: (populate_get_listing): * src/pyrenamer_filefuncs.py: (get_file_listing), (get_file_listing_recursive): * src/pyrenamer_prefs.py: (on_filedir_combo_changed): Added option to rename directories 2008-04-09 Adolfo González Blázquez * data/pyrenamer.glade: * data/pyrenamer.schemas.in: GUI improved with options panel * src/pyrenamer.py: (__init__), (enable_rename_and_clean), (on_main_hpaned_notify), (on_options_button_clicked), (options_panel_state), (on_preferences_activate), (on_main_quit): Massive code refactorings 2008-04-09 Adolfo González Blázquez * data/pyrenamer.desktop.in.in.in: "Encoding" field is deprecated from desktop files, so removed 2008-04-09 Adolfo González Blázquez * Version 0.5.0 Released 2007-11-26 Adolfo González Blázquez * pyrenamer.py: (__init__), (on_menu_load_names_from_file_activate), (populate_from_file): * data/pyrenamer.glade: Added option to read new file names from a text file 2007-10-19 Adolfo González Blázquez * images/Makefile.am: * images/stop.png: * pyrenamer.py: (__init__): Smaller progress bar and new stop icon 2007-10-18 Adolfo González Blázquez * data/pyrenamer.glade: * src/pyrenamerfilefuncs.py: Added option to replace spaces to dashes and viceversa * src/pyrenamerfilefuncs.py: Czech language accents replacement (thanks to Jan Virt) * doc/treefilebrowser_example.py: * src/pyrenamer: * src/pyrenamer.py: * src/treefilebrowser.py: Fixed pygtk imports (add pygtk.require()) 2007-08-13 Adolfo González Blázquez * Version 0.4.1 Released * src/pyrenamer.py: Check if directories set on preferences are correct * src/pyrenamer.py: (preferences_read): Be more careful when reading directories from GConf * src/treefilebrowser.py: Remove printing of debug information * src/pyrenamer.py: (on_manual_key_press_event): Activate Rename button on selection using keys 2007-08-11 Adolfo González Blázquez * Version 0.4 Released * data/pyrenamer.schemas.in: Set default dirs to None * src/pyrenamer.py: Set sort help command to -h instead of -? * doc/pyrenamer.1: Updated man page * src/pyrenamer.py: (on_manual_key_press_event): Press Return to move to next file on Manual Rename * src/pyrenamer.py: Set window icon on Preferences and About dialogs * src/pyrenamer_globals.py.in: License little patch by Piotr Ożarowski 2007-08-10 Adolfo González Blázquez * src/pyrenamer.py: * data/pyrenamer.glade: Added preferences menu item and panel to select default directories * src/pyrenamer.py: (__init__), (read_preferences), (save_preferences): Add rootdir and activedir to gconf preferences * src/pyrenamer: * src/pyrenamer.py: (__init__): Added support for command line options * src/treefilebrowser.py: (__init__), (set_active_dir): Print some errors if needed * src/treefilebrowser.py: (set_active_dir): If rootdir == activedir: set active the rootdir * src/pyrenamer: * src/pyrenamer.py: Added support for command line options * src/treefilebrowser.py: (set_active_dir), (create_root): Fixed a couple of bugs in tree creation 2007-08-09 Adolfo González Blázquez * src/treefilebrowser.py: (set_active_dir): If we can't read a dir, just ignore it (thanks to Piotr Ożarowski) * src/pyrenamer.py: Fix selection on Manual Rename tab * src/pyrenamer.py: Use user.home instead of os.environ['HOME'] * data/pyrenamer.glade: Adjusted buttons a bit 2007-08-08 Adolfo González Blázquez * Updated .desktop file category * Autoconf scripts updated * src/pyrenamer.py: * src/pyrenamer_globals.py.in: Changes in About dialog * src/pyrenamer.py: * data/pyrenamer.glade: Disable Clear button when needed * pyrenamerfilefuncs.py: Better unicode support * src/pyrenamer.py: Fix clean preview * data/pyrenamer.glade: Update button layout * src/treefilebrowser.py: (cursor_changed), (make_view): Fix find-as-you-type selection * src/pyrenamer.py: * data/pyrenamer.glade: Better file selection filter * src/pyrenamer.py: * data/pyrenamer.glade: Added "Clear Preview" button and menu item 2007-08-07 Adolfo González Blázquez * src/pyrenamer.py: (on_clean_button_clicked): Don't activate Rename button and menu item when clicking on Clean * src/pyrenamer.py: (__init__), (preview_clean), (on_clean_button_clicked): * data/pyrenamer.glade: Add button to clean previewed filenames * src/pyrenamer.py: (preview_selected_row), (on_selected_files_cursor_changed), (on_manual_key_press_event): Preview new filename when clicking PAGE_UP or PAGE_DOWN on manual rename 2007-08-02 Adolfo González Blázquez * data/pyrenamer.glade: * pyrenamerfilefuncs.py: (rename_using_patterns): Fixed bug on {num} pattern, and changed syntax from {num-5} to {num+5} to start counting at 5 2007-07-30 Adolfo González Blázquez * Version 0.3 Released * src/pyrenamer.py: (on_manual_key_press_event): * data/pyrenamer.glade: In "Manual Rename" mode, you can select the next and prev file using PAGE_UP and PAGE_DOWN keys * src/pyrenamer.py: (preview_rename_rows): Disable filter by selection on manual rename * src/pyrenamerfilefuncs.py: (rename_file): Fixed typo (_ instead of -) 2007-07-25 Adolfo González Blázquez * configure.ac: * data/Makefile.am: * data/pyrenamer.desktop.in.in: * data/pyrenamer.glade: * Makefile.am: * po/*: * src/pyrenamer_globals.py.in: * src/pyrenamer.py: * src/pyrenamerfilefuncs.py: * src/tooltips.py: * src/treefilebrowser.py: Added internationalization support (English and Spanish by now) * data/pyrenamer.schemas.in: Set good default values for window pos/size * src/pyrenamer.py: (preview_rename_rows), (on_rename_button_clicked), (on_preview_button_clicked): Better handling of file selection (update all list when preview is clicked, not just selected) * src/treefilebrowser.py: (get_folder_closed_icon), (get_folder_opened_icon): Don't display errors on console if icons are not available * src/pyrenamerfilefuncs.py: (rename_file): Don't show error if we're trying to rename a file with the same name 2007-07-23 Adolfo González Blázquez * Version 0.2 Released * src/treefilebrowser.py: (get_folder_closed_icon), (get_folder_opened_icon): Show default gtk-directory icon if theme default fails * src/pyrenamer.py: (__init__), (on_preview_button_clicked), (populate_add_to_view): Count correctly the items displayed (self.count = 0) * src/treefilebrowser.py: (__init__), (set_show_hidden), (button_pressed), (show_hidden_toggled), (create_popup), (make_view): Add right-click context menu, with "Show hidden files" option * data/pyrenamer.glade: Added Edit menu (Cut, Copy, Paste, Clear, Select All, Select Nothing) * src/pyrenamer.py: Added Edit menu (Cut, Copy, Paste, Clear, Select All, Select Nothing) * src/pyrenamer.py: Preview and rename just selected items (nothing selected = all selected) * src/pyrenamerfilefuncs.py: (rename_file): Avoid overwritting files when renaming (don't rename if a file with the same name already exists) * data/pyrenamer.glade: * src/pyrenamer.py: Remove "Show hidden dirs" check box, as we have a context menu now on tree widget * data/pyrenamer.glade: Add tooltip information for "File selection pattern" entry 2007-07-20 Adolfo González Blázquez * configure.ac: Check if eyeD3 is installed, and enable music rename if it is * data/pyrenamer.glade: Add support for music renaming using MP3 id3 tags * src/pyrenamer.py: (__init__), (preview_rename_rows): Add support for renaming MP3 using its id3 tags * src/pyrenamer.py: Some refactorings * src/pyrenamer_globals.py.in: Added variable "have_eyed3" to control if we have support for reading mp3'd id3 tags * src/pyrenamerfilefuncs.py: (replace_images): Add support for renaming using EXIF date tags * src/pyrenamerfilefuncs.py: (replace_music): Add support for renaming MP3 using its id3 tags 2007-06-27 Adolfo González Blázquez * data/pyrenamer.glade: Add support for extracting EXIF info from images, in a new tab called Images * src/pyrenamerfilefuncs.py: (rename_using_patterns), (replace_images), (get_exif_data): Add support for extracting EXIF info from images, in a new tab called Images * src/pyrenamer.py: Add support for extracting EXIF info from images, in a new tab called Images 2007-06-15 Adolfo González Blázquez * src/pyrenamerfilefuncs.py: (escape_pattern), (get_file_listing): Add function to scape special chars on patterns, so glob doesn't get confused. * src/EXIF.py: Added EXIF parser from Gene Cash. * src/pyrenamerfilefuncs.py: (rename_using_patterns), (get_exif_data): Add support for extracting EXIF date info from images, to be used in the pattern view. 2007-06-14 Adolfo González Blázquez * Initial release pyrenamer-0.6.0/NEWS0000644000175000017500000000702411064172742011146 000000000000002008-09-17 Adolfo González Blázquez * Version 0.6 released: * New features: - You can save your favorite patterns to reuse them - Undo/redo feature - Now you can rename more music formats (ogg, real... those supported by hachoir) - You can keep file extensions untouched while renaming - Now you can rename directories - Allow renaming files and moving them to another directory - Added some icons to identify file types - Added random number pattern {rand} - Added refresh option, to reload files and directories - Added autopreview option - Add option to fix duplicated symbols on filename - Add option to ignore next errors while renaming - Better explanations on error dialogs - New icon * Bug fixes: - Files don't appear duplicated anymore - The position of the window is now placed correctly when pyRenamer starts - Fixed bug when trying to display error dialog on bad preferences - Reverse elements on recursive listing, so we rename deeper files and directories first - Fix file capitalization - If root or active dir is hidden, pyrenamer fails no more - Use {myear} for getting an album year in music renaming, instead of {year} - Fix crash when a id3 tag is not available or wrong, returning an empty filename (LP: #235161) - Fix crash while processing some bad exif tags, catching possible exceptions (LP: #261832) - Fix crash while starting, fixing src/treefilebrowser.py (LP: #237482) - Fix crashing when extension or name are empty - Fixes on manual renaming: cleaning correctly and changing file with keyboard. 2008-04-09 Adolfo González Blázquez * Version 0.5.0 Released * Added option to read new file names from a text file * Smaller progress bar and new stop icon * Added option to replace spaces to dashes and viceversa * Czech language accents replacement (thanks to Jan Virt) * Fixed pygtk imports (add pygtk.require()) 2007-08-13 Adolfo González Blázquez * Version 0.4.1 Released * Check if directories set on Preferences are correct * Remove debug info from console * Fix bug reading preferences from gconf * Activate Rename button on selection using keys 2007-08-08 Adolfo González Blázquez * Version 0.4 Released * Now you can start pyRenamer in the directory that you want * Preferences added to set default directories * Added command line options to set directories * Fixed bug on {num} pattern and syntax change from {num-2} to {num+2} * Preview new filename when clicking PAGE_UP, PAGE_DOWN or RETURN on manual rename * Add button to clear previewed filenames * Better file selection filter * Better unicode support * Some GUI changes * Bug fixes 2007-07-30 Adolfo González Blázquez * Version 0.3 Released * Added internationalization support (english and spanish by now) * Better handling of file selection filter * Better manual renaming (you can use page_up and page_down to select next/prev file) * Set good default values for window pos/size (bugfix) * Bugfixes 2007-07-23 Adolfo González Blázquez * Version 0.2 Released * Added support for renaming images using their EXIF tags * Added support for renaming MP3 files using their ID3 tags (using eyeD3) * Added support for renaming only the selected files on list * Added context menu to tree widget, to show hidden directories * Some UI changes * Fixed several bugs 2007-06-14 Adolfo González Blázquez * Version 0.1 Released pyrenamer-0.6.0/configure0000755000175000017500000070536711064130365012370 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for pyrenamer 0.6.0. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='pyrenamer' PACKAGE_TARNAME='pyrenamer' PACKAGE_VERSION='0.6.0' PACKAGE_STRING='pyrenamer 0.6.0' PACKAGE_BUGREPORT='' ac_unique_file="src/pyrenamer" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PKG_CONFIG PYGTK_CFLAGS PYGTK_LIBS gconf_CFLAGS gconf_LIBS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE GCONFTOOL GETTEXT_PACKAGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP USE_NLS MSGFMT MSGFMT_OPTS GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_SERVICE_RULE INTLTOOL_POLICY_RULE MSGMERGE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL ALL_LINGUAS LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias PKG_CONFIG PYGTK_CFLAGS PYGTK_LIBS gconf_CFLAGS gconf_LIBS CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe 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 fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 pyrenamer 0.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --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 --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 --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/pyrenamer] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of pyrenamer 0.6.0:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-schemas-install Disable the schemas installation --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gconf-source=sourceaddress Config database for installing schema files. --with-gconf-schema-file-dir=dir Directory for installing schema files. Some influential environment variables: PKG_CONFIG path to pkg-config utility PYGTK_CFLAGS C compiler flags for PYGTK, overriding pkg-config PYGTK_LIBS linker flags for PYGTK, overriding pkg-config gconf_CFLAGS C compiler flags for gconf, overriding pkg-config gconf_LIBS linker flags for gconf, overriding pkg-config CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF pyrenamer configure 0.6.0 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by pyrenamer $as_me 0.6.0, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.10' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # 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". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`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 echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # 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;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='pyrenamer' VERSION='0.6.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ################################### ### Python modules ################################### # Find any Python interpreter. if test -z "$PYTHON"; then for ac_prog in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # 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_PYTHON="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { echo "$as_me:$LINENO: result: $PYTHON" >&5 echo "${ECHO_T}$PYTHON" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON=":" fi am_display_PYTHON=python if test "$PYTHON" = :; then { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 echo "$as_me: error: no suitable Python interpreter found" >&2;} { (exit 1); exit 1; }; } else { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; } if test "${am_cv_python_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi { echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 echo "${ECHO_T}$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; } if test "${am_cv_python_platform+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi { echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 echo "${ECHO_T}$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; } if test "${am_cv_python_pythondir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi { echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 echo "${ECHO_T}$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; } if test "${am_cv_python_pyexecdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi { echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi 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. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for PYGTK" >&5 echo $ECHO_N "checking for PYGTK... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$PYGTK_CFLAGS"; then pkg_cv_PYGTK_CFLAGS="$PYGTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "pygtk-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PYGTK_CFLAGS=`$PKG_CONFIG --cflags "pygtk-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PYGTK_LIBS"; then pkg_cv_PYGTK_LIBS="$PYGTK_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "pygtk-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PYGTK_LIBS=`$PKG_CONFIG --libs "pygtk-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PYGTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pygtk-2.0"` else PYGTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pygtk-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$PYGTK_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements (pygtk-2.0) were not met: $PYGTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PYGTK_CFLAGS and PYGTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements (pygtk-2.0) were not met: $PYGTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PYGTK_CFLAGS and PYGTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: 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. Alternatively, you may set the environment variables PYGTK_CFLAGS and PYGTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: 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. Alternatively, you may set the environment variables PYGTK_CFLAGS and PYGTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else PYGTK_CFLAGS=$pkg_cv_PYGTK_CFLAGS PYGTK_LIBS=$pkg_cv_PYGTK_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi ################################### ### GConf ################################### pkg_failed=no { echo "$as_me:$LINENO: checking for gconf" >&5 echo $ECHO_N "checking for gconf... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$gconf_CFLAGS"; then pkg_cv_gconf_CFLAGS="$gconf_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_gconf_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$gconf_LIBS"; then pkg_cv_gconf_LIBS="$gconf_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_gconf_LIBS=`$PKG_CONFIG --libs "gconf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then gconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0"` else gconf_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$gconf_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements (gconf-2.0) were not met: $gconf_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables gconf_CFLAGS and gconf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements (gconf-2.0) were not met: $gconf_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables gconf_CFLAGS and gconf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: 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. Alternatively, you may set the environment variables gconf_CFLAGS and gconf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: 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. Alternatively, you may set the environment variables gconf_CFLAGS and gconf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else gconf_CFLAGS=$pkg_cv_gconf_CFLAGS gconf_LIBS=$pkg_cv_gconf_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` else GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi # Check whether --with-gconf-source was given. if test "${with_gconf_source+set}" = set; then withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval" fi { echo "$as_me:$LINENO: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 echo "${ECHO_T}Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; } if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi # Check whether --with-gconf-schema-file-dir was given. if test "${with_gconf_schema_file_dir+set}" = set; then withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval" fi { echo "$as_me:$LINENO: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 echo "${ECHO_T}Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; } # Check whether --enable-schemas-install was given. if test "${enable_schemas_install+set}" = set; then enableval=$enable_schemas_install; case ${enableval} in yes|no) ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5 echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;} { (exit 1); exit 1; }; } ;; esac fi if test "$enable_schemas_install" != no; then GCONF_SCHEMAS_INSTALL_TRUE= GCONF_SCHEMAS_INSTALL_FALSE='#' else GCONF_SCHEMAS_INSTALL_TRUE='#' GCONF_SCHEMAS_INSTALL_FALSE= fi # Extract the first word of "gconftool-2", so it can be a program name with args. set dummy gconftool-2; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GCONFTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GCONFTOOL in [\\/]* | ?:[\\/]*) ac_cv_path_GCONFTOOL="$GCONFTOOL" # 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_GCONFTOOL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GCONFTOOL" && ac_cv_path_GCONFTOOL="no" ;; esac fi GCONFTOOL=$ac_cv_path_GCONFTOOL if test -n "$GCONFTOOL"; then { echo "$as_me:$LINENO: result: $GCONFTOOL" >&5 echo "${ECHO_T}$GCONFTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$GCONFTOOL" = "no"; then { { echo "$as_me:$LINENO: error: gconftool-2 not found" >&5 echo "$as_me: error: gconftool-2 not found" >&2;} { (exit 1); exit 1; }; } fi ################################### ### Internationalization ################################### GETTEXT_PACKAGE=pyrenamer cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then { echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking libintl.h usability" >&5 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking libintl.h presence" >&5 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } fi if test $ac_cv_header_libintl_h = yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { echo "$as_me:$LINENO: checking for ngettext in libc" >&5 echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_ngettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { echo "$as_me:$LINENO: checking for dgettext in libc" >&5 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_dgettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; } if test $ac_cv_lib_intl_bindtextdomain = yes; then { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } if test $ac_cv_lib_intl_ngettext = yes; then { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; } if test $ac_cv_lib_intl_dgettext = yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6; } { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } if test $ac_cv_lib_intl_ngettext = yes; then { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_dcgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; } if test $ac_cv_lib_intl_dcgettext = yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done MSGFMT_OPTS= { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5 echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # 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_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then CATOBJEXT=.gmo DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bind_textdomain_codeset (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset choke me #endif int main () { return bind_textdomain_codeset (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; } if test $ac_cv_func_bind_textdomain_codeset = yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { echo "$as_me:$LINENO: result: $LINGUAS" >&5 echo "${ECHO_T}$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES case "$am__api_version" in 1.01234) { { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5 echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;} { (exit 1); exit 1; }; } ;; *) ;; esac if test -n "0.35.0"; then { echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5 echo $ECHO_N "checking for intltool >= 0.35.0... $ECHO_C" >&6; } INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.35.0 or later." >&5 echo "$as_me: error: Your intltool is too old. You need intltool 0.35.0 or later." >&2;} { (exit 1); exit 1; }; } fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Check the gettext tools to make sure they are GNU # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # 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_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$XGETTEXT"; then { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # 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_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # 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_MSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then { echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi # Use the tools built into the package, not the ones that are installed. INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' INTLTOOL_MERGE='$(top_builddir)/intltool-merge' INTLTOOL_UPDATE='$(top_builddir)/intltool-update' # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # 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_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 echo "${ECHO_T}$INTLTOOL_PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$INTLTOOL_PERL"; then { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 echo "$as_me: error: perl not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 echo "$as_me: error: perl 5.x required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test "x" != "xno-xml"; then { echo "$as_me:$LINENO: checking for XML::Parser" >&5 echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; } if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } else { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;} { (exit 1); exit 1; }; } fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bind_textdomain_codeset (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset choke me #endif int main () { return bind_textdomain_codeset (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; } if test $ac_cv_func_bind_textdomain_codeset = yes; then DATADIRNAME=share else DATADIRNAME=lib fi ;; *) DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_config_commands="$ac_config_commands intltool" ################################### ### Config and output ################################### ac_config_files="$ac_config_files Makefile data/Makefile data/pyrenamer.desktop.in.in doc/Makefile images/Makefile po/Makefile.in src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= 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$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi ac_config_commands="$ac_config_commands po/stamp-it" : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by pyrenamer $as_me 0.6.0, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ pyrenamer config.status 0.6.0 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/pyrenamer.desktop.in.in") CONFIG_FILES="$CONFIG_FILES data/pyrenamer.desktop.in.in" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "images/Makefile") CONFIG_FILES="$CONFIG_FILES images/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim PYTHON!$PYTHON$ac_delim PYTHON_VERSION!$PYTHON_VERSION$ac_delim PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim pythondir!$pythondir$ac_delim pkgpythondir!$pkgpythondir$ac_delim pyexecdir!$pyexecdir$ac_delim pkgpyexecdir!$pkgpyexecdir$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim PYGTK_CFLAGS!$PYGTK_CFLAGS$ac_delim PYGTK_LIBS!$PYGTK_LIBS$ac_delim gconf_CFLAGS!$gconf_CFLAGS$ac_delim gconf_LIBS!$gconf_LIBS$ac_delim GCONF_SCHEMA_CONFIG_SOURCE!$GCONF_SCHEMA_CONFIG_SOURCE$ac_delim GCONF_SCHEMA_FILE_DIR!$GCONF_SCHEMA_FILE_DIR$ac_delim GCONF_SCHEMAS_INSTALL_TRUE!$GCONF_SCHEMAS_INSTALL_TRUE$ac_delim GCONF_SCHEMAS_INSTALL_FALSE!$GCONF_SCHEMAS_INSTALL_FALSE$ac_delim GCONFTOOL!$GCONFTOOL$ac_delim GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim USE_NLS!$USE_NLS$ac_delim MSGFMT!$MSGFMT$ac_delim MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim GMSGFMT!$GMSGFMT$ac_delim XGETTEXT!$XGETTEXT$ac_delim CATALOGS!$CATALOGS$ac_delim CATOBJEXT!$CATOBJEXT$ac_delim DATADIRNAME!$DATADIRNAME$ac_delim GMOFILES!$GMOFILES$ac_delim INSTOBJEXT!$INSTOBJEXT$ac_delim INTLLIBS!$INTLLIBS$ac_delim PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim POFILES!$POFILES$ac_delim POSUB!$POSUB$ac_delim MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim MSGMERGE!$MSGMERGE$ac_delim INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim ALL_LINGUAS!$ALL_LINGUAS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 47; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out 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"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 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;} 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 ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "intltool":C) for file in intltool-extract intltool-merge intltool-update; do sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ < ${ac_aux_dir}/${file}.in > ${file}.out if cmp -s ${file} ${file}.out 2>/dev/null; then rm -f ${file}.out else mv -f ${file}.out ${file} fi chmod ugo+x ${file} chmod u+w ${file} done ;; "po/stamp-it":C) rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" if test ! -f "po/Makefile"; then { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5 echo "$as_me: error: po/Makefile is not ready." >&2;} { (exit 1); exit 1; }; } fi mv "po/Makefile" "po/Makefile.tmp" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } ' "po/Makefile.tmp" >"po/Makefile" rm -f "po/Makefile.tmp" mv "po/stamp-it.tmp" "po/stamp-it" ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 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 || { (exit 1); exit 1; } fi pyrenamer-0.6.0/configure.ac0000644000175000017500000000221511063750340012725 00000000000000################################### ### Initialization ################################### AC_INIT([pyrenamer], [0.6.0]) AC_CONFIG_SRCDIR(src/pyrenamer) AM_INIT_AUTOMAKE([1.7]) AM_MAINTAINER_MODE ################################### ### Python modules ################################### AM_PATH_PYTHON PKG_CHECK_MODULES(PYGTK, pygtk-2.0) AC_SUBST(PYGTK_CFLAGS) AC_SUBST(PYGTK_LIBS) ################################### ### GConf ################################### PKG_CHECK_MODULES(gconf, gconf-2.0) AM_GCONF_SOURCE_2 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no]) if test "$GCONFTOOL" = "no"; then AC_MSG_ERROR([gconftool-2 not found]) fi ################################### ### Internationalization ################################### GETTEXT_PACKAGE=pyrenamer AC_SUBST([GETTEXT_PACKAGE]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Gettext package]) AM_GLIB_GNU_GETTEXT IT_PROG_INTLTOOL([0.35.0]) ################################### ### Config and output ################################### AC_CONFIG_FILES([ Makefile data/Makefile data/pyrenamer.desktop.in.in doc/Makefile images/Makefile po/Makefile.in src/Makefile ]) AC_OUTPUT pyrenamer-0.6.0/install-sh0000755000175000017500000003246411064200175012451 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pyrenamer-0.6.0/Makefile.am0000644000175000017500000000030010656575226012503 00000000000000SUBDIRS = data doc images po src DISTCLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update EXTRA_DIST = \ intltool-extract.in \ intltool-merge.in \ intltool-update.inpyrenamer-0.6.0/po/0000777000175000017500000000000011064200213011127 500000000000000pyrenamer-0.6.0/po/ChangeLog0000644000175000017500000000242411064027105012626 000000000000002008-09-17 Adolfo González Blázquez * Updated german translation (thanks to Christian Kirbach) 2008-09-15 Adolfo González Blázquez * Updated translations (fr, de) 2008-09-11 Adolfo González Blázquez * Updated translations (en, es) 2008-09-02 Adolfo González Blázquez * Added german translation (thanks to Vinzenz Vietzke) * Updated translations (en, es, fr) 2007-26-11 Adolfo González Blázquez * Updated translations (en, es, fr) 2007-18-10 Adolfo González Blázquez * Updated translations (en, es, fr) 2007-09-06 Adolfo González Blázquez * Added french translation (thanks to Christophe Perez) 2007-08-13 Adolfo González Blázquez * Updated translations (es, en) 2007-08-10 Adolfo González Blázquez * Updated translations (es, en) 2007-08-08 Adolfo González Blázquez * Updated translations (es, en) 2007-07-30 Adolfo González Blázquez * Updated translations (es, en) 2007-07-25 Adolfo González Blázquez * Added Spanish (es.po) translation * Created po/ structure pyrenamer-0.6.0/po/Makefile.in.in0000644000175000017500000001532311064200174013527 00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # Copyright (C) 2004-2008 Rodney Dawes # # This file may be copied and used freely without restrictions. It may # be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ DATADIRNAME = @DATADIRNAME@ itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(itlocaledir) linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info tags TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pyrenamer-0.6.0/po/POTFILES.skip0000644000175000017500000000012010656575511013177 00000000000000data/pyrenamer.desktop.in data/pyrenamer.desktop.in.in src/pyrenamer_globals.py pyrenamer-0.6.0/po/en.po0000644000175000017500000004503611064171712012030 00000000000000# English translations for pyrenamer package. # Copyright (C) 2007 THE pyrenamer'S COPYRIGHT HOLDER # This file is distributed under the same license as the pyrenamer package. # Adolfo González Blázquez , 2007. # # msgid "" msgstr "" "Project-Id-Version: pyrenamer 0.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-09-17 14:10+0200\n" "PO-Revision-Date: 2008-09-16 12:38+0100\n" "Last-Translator: Adolfo González Blázquez \n" "Language-Team: English\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../data/pyrenamer.desktop.in.in.in.h:1 msgid "Mass rename files" msgstr "Mass rename files" #: ../data/pyrenamer.desktop.in.in.in.h:2 ../data/pyrenamer.glade.h:177 msgid "pyRenamer" msgstr "pyRenamer" #: ../data/pyrenamer.glade.h:1 msgid "*" msgstr "*" #: ../data/pyrenamer.glade.h:2 msgid "" "*\t\tSelect every visible file\n" "*.jpg\tSelect just files that end with the \"jpg\" extension\n" "\t\tSelect every file (including hidden ones)\n" ".*\t\tSelect files starting by \".\"" msgstr "" "*\t\tSelect every visible file\n" "*.jpg\tSelect just files that end with the \"jpg\" extension\n" "\t\tSelect every file (including hidden ones)\n" ".*\t\tSelect files starting by \".\"" #: ../data/pyrenamer.glade.h:6 msgid "Common substitutions" msgstr "Common substitutions" #: ../data/pyrenamer.glade.h:7 msgid "Default directories" msgstr "Default directories" #: ../data/pyrenamer.glade.h:8 msgid "Insert or delete characters from filenames" msgstr "Insert or delete characters from filenames" #: ../data/pyrenamer.glade.h:9 msgid "Options" msgstr "Options" #: ../data/pyrenamer.glade.h:10 msgid "Rename files manually" msgstr "Rename files manually" #: ../data/pyrenamer.glade.h:11 msgid "Rename files using patterns" msgstr "Rename files using patterns" #: ../data/pyrenamer.glade.h:12 msgid "Rename images using their metadata" msgstr "Rename images using their metadata" #: ../data/pyrenamer.glade.h:13 msgid "Rename music using its metadata" msgstr "Rename music using its metadata" #: ../data/pyrenamer.glade.h:14 msgid "" "Put the mouse over the text fields to get help on which patterns you can " "use" msgstr "" "Put the mouse over the text fields to get help on which patterns you can " "use" #: ../data/pyrenamer.glade.h:15 msgid "Select the file to rename, change its name and click Preview" msgstr "Select the file to rename, change its name and click Preview" #: ../data/pyrenamer.glade.h:16 msgid "The default selected directory" msgstr "The default selected directory" #: ../data/pyrenamer.glade.h:17 msgid "The parent of the directories tree" msgstr "The parent of the directories tree" #: ../data/pyrenamer.glade.h:18 msgid "Active" msgstr "Active" #: ../data/pyrenamer.glade.h:19 msgid "Add files recursively" msgstr "Add files recursively" #: ../data/pyrenamer.glade.h:20 msgid "Add pattern" msgstr "Add pattern" #: ../data/pyrenamer.glade.h:21 msgid "" "All uppercase\n" "All downcase\n" "First letter uppercase\n" "First letter uppercase of each word" msgstr "" "All uppercase\n" "All downcase\n" "First letter uppercase\n" "First letter uppercase of each word" #: ../data/pyrenamer.glade.h:25 msgid "Browse..." msgstr "Browse..." #: ../data/pyrenamer.glade.h:26 msgid "C_lear" msgstr "C_lear" #: ../data/pyrenamer.glade.h:27 msgid "C_lear Preview" msgstr "C_lear Preview" #: ../data/pyrenamer.glade.h:28 msgid "Capitalization" msgstr "Capitalization" #: ../data/pyrenamer.glade.h:29 msgid "" "Changes:\n" "..... to .\n" "---- to -\n" "____ to _\n" "' ' to ' '" msgstr "" "Changes:\n" "..... to .\n" "---- to -\n" "____ to _\n" "' ' to ' '" #: ../data/pyrenamer.glade.h:34 msgid "Delete from" msgstr "Delete from" #: ../data/pyrenamer.glade.h:35 msgid "" "Files\n" "Directories\n" "Files and directories" msgstr "" "Files\n" "Directories\n" "Files and directories" #: ../data/pyrenamer.glade.h:38 msgid "Fix duplicated symbols" msgstr "Fix duplicated symbols" #: ../data/pyrenamer.glade.h:39 msgid "" "Image metadata replacements:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebruary\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tfriday\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Image metadata replacements:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebruary\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tfriday\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" #: ../data/pyrenamer.glade.h:82 msgid "Images" msgstr "Images" #: ../data/pyrenamer.glade.h:83 msgid "Insert" msgstr "Insert" #: ../data/pyrenamer.glade.h:84 msgid "Insert / Delete" msgstr "Insert / Delete" #: ../data/pyrenamer.glade.h:85 msgid "Keep extensions" msgstr "Keep extensions" #: ../data/pyrenamer.glade.h:86 msgid "Manual rename" msgstr "Manual rename" #: ../data/pyrenamer.glade.h:87 msgid "Music" msgstr "Music" #: ../data/pyrenamer.glade.h:88 msgid "" "Music metadata replacements:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{myear}\t2006\n" "{genre}\tHardcore\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Music metadata replacements:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{myear}\t2006\n" "{genre}\tHardcore\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" #: ../data/pyrenamer.glade.h:122 msgid "New file name" msgstr "New file name" #: ../data/pyrenamer.glade.h:123 msgid "Original file name pattern" msgstr "Original file name pattern" #: ../data/pyrenamer.glade.h:124 msgid "Pattern editor" msgstr "Pattern editor" #: ../data/pyrenamer.glade.h:125 msgid "Pattern:" msgstr "Pattern:" #: ../data/pyrenamer.glade.h:126 msgid "Patterns" msgstr "Patterns" #: ../data/pyrenamer.glade.h:127 msgid "Preview automatically" msgstr "Preview automatically" #: ../data/pyrenamer.glade.h:128 msgid "Remove accents" msgstr "Remove accents" #: ../data/pyrenamer.glade.h:129 msgid "Renamed file name pattern" msgstr "Renamed file name pattern" #: ../data/pyrenamer.glade.h:130 msgid "Replace" msgstr "Replace" #: ../data/pyrenamer.glade.h:131 msgid "Root" msgstr "Root" #: ../data/pyrenamer.glade.h:132 msgid "Select _nothing" msgstr "Select _nothing" #: ../data/pyrenamer.glade.h:133 msgid "Select _all" msgstr "Select _all" #: ../data/pyrenamer.glade.h:134 msgid "Selection pattern" msgstr "Selection pattern" #: ../data/pyrenamer.glade.h:135 msgid "Show options" msgstr "Show options" #: ../data/pyrenamer.glade.h:136 msgid "Spaces" msgstr "Spaces" #: ../data/pyrenamer.glade.h:137 msgid "" "Spaces to Underscores\n" "Underscores to Spaces\n" "Spaces to Dots\n" "Dots to Spaces\n" "Spaces to Dashes\n" "Dashes to Spaces" msgstr "" "Spaces to Underscores\n" "Underscores to Spaces\n" "Spaces to Dots\n" "Dots to Spaces\n" "Spaces to Dashes\n" "Dashes to Spaces" #: ../data/pyrenamer.glade.h:143 msgid "Substitutions" msgstr "Substitutions" #: ../data/pyrenamer.glade.h:144 msgid "" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" #: ../data/pyrenamer.glade.h:168 msgid "_Edit" msgstr "_Edit" #: ../data/pyrenamer.glade.h:169 msgid "_File" msgstr "_File" #: ../data/pyrenamer.glade.h:170 msgid "_Help" msgstr "_Help" #: ../data/pyrenamer.glade.h:171 msgid "_Load names from file..." msgstr "_Load names from file..." #: ../data/pyrenamer.glade.h:172 msgid "_Preview" msgstr "_Preview" #: ../data/pyrenamer.glade.h:173 msgid "_Rename" msgstr "_Rename" #: ../data/pyrenamer.glade.h:174 msgid "_View" msgstr "_View" #: ../data/pyrenamer.glade.h:175 msgid "at" msgstr "at" #: ../data/pyrenamer.glade.h:176 msgid "or at the end" msgstr "or at the end" #: ../data/pyrenamer.glade.h:178 msgid "pyRenamer preferences" msgstr "pyRenamer preferences" #: ../data/pyrenamer.glade.h:179 msgid "to" msgstr "to" #: ../data/pyrenamer.glade.h:180 msgid "with" msgstr "with" #: ../data/pyrenamer.glade.h:181 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash" msgstr "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash" #: ../data/pyrenamer.glade.h:186 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash " msgstr "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash " #: ../data/pyrenamer.schemas.in.h:1 msgid "" "0: Rename files / 1: Rename directories / 2: Rename files and directories" msgstr "" "0: Rename files / 1: Rename directories / 2: Rename files and directories" #: ../data/pyrenamer.schemas.in.h:2 msgid "Auto preview changes" msgstr "Auto preview changes" #: ../data/pyrenamer.schemas.in.h:3 msgid "Default active dir" msgstr "Default active dir" #: ../data/pyrenamer.schemas.in.h:4 msgid "Default root dir" msgstr "Default root dir" #: ../data/pyrenamer.schemas.in.h:5 msgid "Display the options pane" msgstr "Display the options pane" #: ../data/pyrenamer.schemas.in.h:6 msgid "Is the window maximized?" msgstr "Is the window maximized?" #: ../data/pyrenamer.schemas.in.h:7 msgid "Keep files extensions" msgstr "Keep files extensions" #: ../data/pyrenamer.schemas.in.h:8 msgid "Position of the pane separator" msgstr "Position of the pane separator" #: ../data/pyrenamer.schemas.in.h:9 msgid "Rename files or directories" msgstr "Rename files or directories" #: ../data/pyrenamer.schemas.in.h:10 msgid "Window height" msgstr "Window height" #: ../data/pyrenamer.schemas.in.h:11 msgid "Window width" msgstr "Window width" #: ../data/pyrenamer.schemas.in.h:12 msgid "X position of the window" msgstr "X position of the window" #: ../data/pyrenamer.schemas.in.h:13 msgid "Y position of the window" msgstr "Y position of the window" #: ../src/pyrenamer.py:430 msgid "Original file name" msgstr "Original file name" #: ../src/pyrenamer.py:435 msgid "Renamed file name" msgstr "Renamed file name" #: ../src/pyrenamer.py:452 #, python-format msgid "" "Could not rename file %s to %s\n" "%s" msgstr "" "Could not rename file %s to %s\n" "%s" #: ../src/pyrenamer.py:1325 msgid "Select file" msgstr "Select file" #: ../src/pyrenamer.py:1376 #, python-format msgid "Reading contents of dir %s" msgstr "Reading contents of dir %s" #: ../src/pyrenamer.py:1395 ../src/pyrenamer.py:1454 #, python-format msgid "Directory: %s - Files: %s" msgstr "Directory: %s - Files: %s" #: ../src/pyrenamer.py:1448 #, python-format msgid "Adding file %s" msgstr "Adding file %s" #: ../src/pyrenamer.py:1545 msgid "Ignore errors" msgstr "Ignore errors" #. about.set_artists(pyrenamerglob.artists) #: ../src/pyrenamer.py:1559 msgid "translator-credits" msgstr "Adolfo González Blázquez " #: ../src/pyrenamer_globals.py.in:73 msgid "Mass file renamer for GNOME" msgstr "Mass file renamer for GNOME" #: ../src/pyrenamer_filefuncs.py:661 #, python-format msgid "Error while renaming %s to %s! -> %s already exists!" msgstr "Error while renaming %s to %s! -> %s already exists!" #: ../src/pyrenamer_filefuncs.py:670 #, python-format msgid "Error while renaming %s to %s!" msgstr "Error while renaming %s to %s!" #: ../src/pyrenamer_pattern_editor.py:152 msgid "Patterns editor" msgstr "Patterns editor" #: ../src/pyrenamer_pattern_editor.py:154 msgid "Image patterns editor" msgstr "Image patterns editor" #: ../src/pyrenamer_pattern_editor.py:156 msgid "Music patterns editor" msgstr "Music patterns editor" #: ../src/pyrenamer_prefs.py:108 msgid "Select root directory" msgstr "Select root directory" #: ../src/pyrenamer_prefs.py:125 msgid "Select active directory" msgstr "Select active directory" #: ../src/pyrenamer_prefs.py:147 ../src/pyrenamer_prefs.py:170 msgid "" "\n" "The root directory is not valid!\n" "Please select another directory." msgstr "" "\n" "The root directory is not valid!\n" "Please select another directory." #: ../src/pyrenamer_prefs.py:150 ../src/pyrenamer_prefs.py:174 msgid "" "\n" "The active directory is not valid!\n" "Please select another directory." msgstr "" "\n" "The active directory is not valid!\n" "Please select another directory." #: ../src/pyrenamer_prefs.py:158 ../src/pyrenamer_prefs.py:183 msgid "" "\n" "Please set both directories!" msgstr "" "\n" "Please set both directories!" #: ../src/pyrenamer_tooltips.py:39 #, python-format msgid "" "Original: %s\n" "Renamed: %s" msgstr "" "Original: %s\n" "Renamed: %s" #: ../src/pyrenamer_tooltips.py:41 #, python-format msgid "Original: %s" msgstr "Original: %s" #: ../src/treefilebrowser.py:389 msgid "Show hidden files" msgstr "Show hidden files" #~ msgid "gtk-cancel" #~ msgstr "gtk-cancel" #~ msgid "gtk-ok" #~ msgstr "gtk-ok" #~ msgid "Rename MP3s using their ID3 tags" #~ msgstr "Rename MP3s using their ID3 tags" #~ msgid "{1}" #~ msgstr "{1}" #~ msgid "{X}" #~ msgstr "{X}" #~ msgid "Last selected dir" #~ msgstr "Last selected dir" pyrenamer-0.6.0/po/de.po0000644000175000017500000004672011064171712012017 00000000000000# German translations for pyrenamer package. # Copyright (C) 2007 THE pyrenamer'S COPYRIGHT HOLDER # This file is distributed under the same license as the pyrenamer package. # Vinzenz Vietzke , 2008. # Christian Kirbach , 2008. # msgid "" msgstr "" "Project-Id-Version: pyrenamer 0.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-09-17 14:10+0200\n" "PO-Revision-Date: 2008-09-16 22:35+0200\n" "Last-Translator: Christian Kirbach \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../data/pyrenamer.desktop.in.in.in.h:1 msgid "Mass rename files" msgstr "Dateien massenweise umbenennen" #: ../data/pyrenamer.desktop.in.in.in.h:2 ../data/pyrenamer.glade.h:177 msgid "pyRenamer" msgstr "pyRenamer" #: ../data/pyrenamer.glade.h:1 msgid "*" msgstr "*" #: ../data/pyrenamer.glade.h:2 msgid "" "*\t\tSelect every visible file\n" "*.jpg\tSelect just files that end with the \"jpg\" extension\n" "\t\tSelect every file (including hidden ones)\n" ".*\t\tSelect files starting by \".\"" msgstr "" "*\t\tJede sichtbare Datei wählen\n" "*.jpg\tNur Dateien mit \"jpg\"-Erweiterung wählen\n" "\t\tAlle Dateien wählen (inklusive der Versteckten)\n" ".*\t\tDateien wählen, die mit \".\" beginnen" #: ../data/pyrenamer.glade.h:6 msgid "Common substitutions" msgstr "Gewöhnliche Ersetzungen" #: ../data/pyrenamer.glade.h:7 msgid "Default directories" msgstr "Standardordner" #: ../data/pyrenamer.glade.h:8 msgid "Insert or delete characters from filenames" msgstr "Zeichen in Dateinamen einfügen oder löschen" #: ../data/pyrenamer.glade.h:9 msgid "Options" msgstr "Optionen" #: ../data/pyrenamer.glade.h:10 msgid "Rename files manually" msgstr "Dateien manuell umbenennen" #: ../data/pyrenamer.glade.h:11 msgid "Rename files using patterns" msgstr "Dateien anhand von Mustern umbenennen" #: ../data/pyrenamer.glade.h:12 msgid "Rename images using their metadata" msgstr "Bilder anhand ihrer Meta-Daten umbennen" #: ../data/pyrenamer.glade.h:13 msgid "Rename music using its metadata" msgstr "Musik anhand ihrer Meta-Daten umbennen" #: ../data/pyrenamer.glade.h:14 msgid "" "Put the mouse over the text fields to get help on which patterns you can " "use" msgstr "" "Bewegen Sie den Mauszeiger über die Textfelder, um Hilfe bezüglich der \n" "nutzbaren Muster zu bekommen" #: ../data/pyrenamer.glade.h:15 msgid "Select the file to rename, change its name and click Preview" msgstr "" "Wählen Sie die umzubenennende Datei, ändern Sie den Namen und\n" "klicken Sie auf Vorschau" #: ../data/pyrenamer.glade.h:16 msgid "The default selected directory" msgstr "Der Vorgabeordner" #: ../data/pyrenamer.glade.h:17 msgid "The parent of the directories tree" msgstr "Der Elternordner des Ordnerbaums" #: ../data/pyrenamer.glade.h:18 msgid "Active" msgstr "Aktiv" #: ../data/pyrenamer.glade.h:19 msgid "Add files recursively" msgstr "Dateien rekursiv hinzufügen" #: ../data/pyrenamer.glade.h:20 msgid "Add pattern" msgstr "Muster hinzufügen" #: ../data/pyrenamer.glade.h:21 msgid "" "All uppercase\n" "All downcase\n" "First letter uppercase\n" "First letter uppercase of each word" msgstr "" "Alle in Großbuchstaben\n" "Alle in Kleinbuchstaben\n" "Erster Buchstabe groß\n" "Erster Buchstabe jedes Wortes groß" #: ../data/pyrenamer.glade.h:25 msgid "Browse..." msgstr "Durchsuchen..." #: ../data/pyrenamer.glade.h:26 msgid "C_lear" msgstr "_Leeren" #: ../data/pyrenamer.glade.h:27 msgid "C_lear Preview" msgstr "Vorschau _leeren" #: ../data/pyrenamer.glade.h:28 msgid "Capitalization" msgstr "Großschreibung" #: ../data/pyrenamer.glade.h:29 msgid "" "Changes:\n" "..... to .\n" "---- to -\n" "____ to _\n" "' ' to ' '" msgstr "" "Änderungen:\n" "..... nach .\n" "---- nach -\n" "____ nach _\n" "' ' nach ' '" #: ../data/pyrenamer.glade.h:34 msgid "Delete from" msgstr "Löschen von" #: ../data/pyrenamer.glade.h:35 msgid "" "Files\n" "Directories\n" "Files and directories" msgstr "" "Dateien\n" "Ordner\n" "Dateien und Ordner" #: ../data/pyrenamer.glade.h:38 msgid "Fix duplicated symbols" msgstr "Doppelte Symbole reparieren" #: ../data/pyrenamer.glade.h:39 msgid "" "Image metadata replacements:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebruary\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tfriday\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Ersetzung von EXIF-Bilddaten:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebruar\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tfreitag\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Allgemeine Ersetzungen:\n" "Verwende {1} für das erste gefundene Objekt. {2} für das Zweite, etc...\n" "Verwende {num} um 1, 2, 3... an die Dateinamen anzuhängen\n" "Verwende {num2} für 01, 02, 03.....\n" "Verwende {num3} für 001, 002, 003...\n" "Verwende {num+10} für 10, 11, 12...\n" "Verwende {num2+10} für 010, 011, 012...\n" "Verwende {dir} um den aktuellen Ordner zu bekommen\n" "\n" "Einige Ersetzungen für das aktuelle Datum:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruar\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfreitag\n" "{daysimp}\t\tfri\n" "\n" "Ersetzungen mit Zufallszahlen:\n" "{rand} ist eine Zufallszahl zwischen 0 und 100.\n" "{rand,3} ist eine Zufallszahl zwischen 0 und 100 von 3 Ziffern (012)\n" "{rand500} ist eine Zufallszahl zwischen 0 und 500\n" "{rand10-20} ist eine Zufallszahl zwischen 10 und 20\n" "{rand20,5} ist eine Zufallszahl zwischen 0 und 20 von 5 Ziffern (00012)" #: ../data/pyrenamer.glade.h:82 msgid "Images" msgstr "Bilder" #: ../data/pyrenamer.glade.h:83 msgid "Insert" msgstr "Einfügen" #: ../data/pyrenamer.glade.h:84 msgid "Insert / Delete" msgstr "Einfügen / Löschen" #: ../data/pyrenamer.glade.h:85 msgid "Keep extensions" msgstr "Erweiterungen behalten" #: ../data/pyrenamer.glade.h:86 msgid "Manual rename" msgstr "Manuelles Umbenennen" #: ../data/pyrenamer.glade.h:87 msgid "Music" msgstr "Musik" #: ../data/pyrenamer.glade.h:88 msgid "" "Music metadata replacements:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{myear}\t2006\n" "{genre}\tHardcore\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "MP3 Musik ID3-Ersetzungen:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{year}\t\t2006\n" "{genre}\tHardcore\n" "\n" "Allgemeine Ersetzungen:\n" "Verwende {1} für das erste gefundene Objekt. {2} für das Zweite, etc...\n" "Verwende {num} um 1, 2, 3... an die Dateinamen anzuhängen\n" "Verwende {num2} für 01, 02, 03.....\n" "Verwende {num3} für 001, 002, 003...\n" "Verwende {num+10} für 10, 11, 12...\n" "Verwende {num2+10} für 010, 011, 012...\n" "Verwende {dir} um den aktuellen Ordner zu bekommen\n" "\n" "Einige Ersetzungen für das aktuelle Datum:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruar\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfreitag\n" "{daysimp}\t\tfri\n" "\n" "Ersetzungen mit Zufallszahlen:\n" "{rand} ist eine Zufallszahl zwischen 0 und 100.\n" "{rand,3} ist eine Zufallszahl zwischen 0 und 100 von 3 Ziffern (012)\n" "{rand500} ist eine Zufallszahl zwischen 0 und 500\n" "{rand10-20} ist eine Zufallszahl zwischen 10 und 20\n" "{rand20,5} ist eine Zufallszahl zwischen 0 und 20 von 5 Ziffern (00012)" #: ../data/pyrenamer.glade.h:122 msgid "New file name" msgstr "Neuer Dateiname" #: ../data/pyrenamer.glade.h:123 msgid "Original file name pattern" msgstr "Muster für den ursprünglichen Dateinamen" #: ../data/pyrenamer.glade.h:124 msgid "Pattern editor" msgstr "Muster bearbeiten" #: ../data/pyrenamer.glade.h:125 msgid "Pattern:" msgstr "Muster:" #: ../data/pyrenamer.glade.h:126 msgid "Patterns" msgstr "Muster" #: ../data/pyrenamer.glade.h:127 msgid "Preview automatically" msgstr "Vorschau automatisch zeigen" #: ../data/pyrenamer.glade.h:128 msgid "Remove accents" msgstr "Akzente entfernen" #: ../data/pyrenamer.glade.h:129 msgid "Renamed file name pattern" msgstr "Muster für den umbenannten Dateinamen" #: ../data/pyrenamer.glade.h:130 msgid "Replace" msgstr "Ersetzen" #: ../data/pyrenamer.glade.h:131 msgid "Root" msgstr "Ursprung" #: ../data/pyrenamer.glade.h:132 msgid "Select _nothing" msgstr "_Nichts wählen" #: ../data/pyrenamer.glade.h:133 msgid "Select _all" msgstr "_Alles wählen" #: ../data/pyrenamer.glade.h:134 msgid "Selection pattern" msgstr "Auswahlmuster" #: ../data/pyrenamer.glade.h:135 msgid "Show options" msgstr "Optionen zeigen" #: ../data/pyrenamer.glade.h:136 msgid "Spaces" msgstr "Leerzeichen" #: ../data/pyrenamer.glade.h:137 msgid "" "Spaces to Underscores\n" "Underscores to Spaces\n" "Spaces to Dots\n" "Dots to Spaces\n" "Spaces to Dashes\n" "Dashes to Spaces" msgstr "" "Leerzeichen in Unterstriche\n" "Unterstriche in Leerzeichen\n" "Leerzeichen in Punkte\n" "Punkte in Leerzeichen\n" "Leerzeichen in Bindestriche\n" "Bindestriche in Leerzeichen" #: ../data/pyrenamer.glade.h:143 msgid "Substitutions" msgstr "Ersetzungen" #: ../data/pyrenamer.glade.h:144 msgid "" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Verwende {1} für das erste gefundene Objekt. {2} für das Zweite, etc...\n" "Verwende {num} um 1, 2, 3... an die Dateinamen anzuhängen\n" "Verwende {num2} für 01, 02, 03.....\n" "Verwende {num3} für 001, 002, 003...\n" "Verwende {num+10} für 10, 11, 12...\n" "Verwende {num2+10} für 010, 011, 012...\n" "Verwende {dir} um den aktuellen Ordner zu bekommen\n" "\n" "Einige Ersetzungen für das aktuelle Datum:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruar\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfreitag\n" "{daysimp}\t\tfri\n" "\n" "Ersetzungen mit Zufallszahlen:\n" "{rand} ist eine Zufallszahl zwischen 0 und 100.\n" "{rand,3} ist eine Zufallszahl zwischen 0 und 100 von 3 Ziffern (012)\n" "{rand500} ist eine Zufallszahl zwischen 0 und 500\n" "{rand10-20} ist eine Zufallszahl zwischen 10 und 20\n" "{rand20,5} ist eine Zufallszahl zwischen 0 und 20 von 5 Ziffern (00012)" #: ../data/pyrenamer.glade.h:168 msgid "_Edit" msgstr "B_earbeiten" #: ../data/pyrenamer.glade.h:169 msgid "_File" msgstr "_Datei" #: ../data/pyrenamer.glade.h:170 msgid "_Help" msgstr "_Hilfe" #: ../data/pyrenamer.glade.h:171 msgid "_Load names from file..." msgstr "Namen aus Datei _laden..." #: ../data/pyrenamer.glade.h:172 msgid "_Preview" msgstr "_Vorschau" #: ../data/pyrenamer.glade.h:173 msgid "_Rename" msgstr "_Umbenennen" #: ../data/pyrenamer.glade.h:174 msgid "_View" msgstr "_Anzeigen" #: ../data/pyrenamer.glade.h:175 msgid "at" msgstr "bei" #: ../data/pyrenamer.glade.h:176 msgid "or at the end" msgstr "oder am Ende" #: ../data/pyrenamer.glade.h:178 msgid "pyRenamer preferences" msgstr "pyRenamer Voreinstellungen" #: ../data/pyrenamer.glade.h:179 msgid "to" msgstr "bis" #: ../data/pyrenamer.glade.h:180 msgid "with" msgstr "durch" #: ../data/pyrenamer.glade.h:181 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash" msgstr "" "{#}\tZahlen\n" "{L}\t\tBuchstaben\n" "{C}\t\tZeichen (Zahlen und Buchstaben, keine Leerzeichen)\n" "{X}\t\tZahlen, Buchstaben, und Leerzeichen\n" "{@}\tMüll" #: ../data/pyrenamer.glade.h:186 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash " msgstr "" "{#}\tZahlen\n" "{L}\t\tBuchstaben\n" "{C}\t\tZeichen (Zahlen und Buchstaben, keine Leerzeichen)\n" "{X}\t\tZahlen, Buchstaben, und Leerzeichen\n" "{@}\tMüll " #: ../data/pyrenamer.schemas.in.h:1 msgid "" "0: Rename files / 1: Rename directories / 2: Rename files and directories" msgstr "" "0: Dateien umbenennen / 1: Ordner umbenennen / 2: Dateien und Ordner " "umbenennen" #: ../data/pyrenamer.schemas.in.h:2 msgid "Auto preview changes" msgstr "Auto-Vorschau der Änderungen" #: ../data/pyrenamer.schemas.in.h:3 msgid "Default active dir" msgstr "Aktive Vorgabeordner" #: ../data/pyrenamer.schemas.in.h:4 msgid "Default root dir" msgstr "Vorgegebener Ursprungs-Ordner" #: ../data/pyrenamer.schemas.in.h:5 msgid "Display the options pane" msgstr "Optionsbereich anzeigen" #: ../data/pyrenamer.schemas.in.h:6 msgid "Is the window maximized?" msgstr "Ist das Fenster maximiert?" #: ../data/pyrenamer.schemas.in.h:7 msgid "Keep files extensions" msgstr "Dateierweiterungen behalten" #: ../data/pyrenamer.schemas.in.h:8 msgid "Position of the pane separator" msgstr "Position des Ausschnitts-Trenners" #: ../data/pyrenamer.schemas.in.h:9 msgid "Rename files or directories" msgstr "Dateien oder Ordner umbenennen" #: ../data/pyrenamer.schemas.in.h:10 msgid "Window height" msgstr "Fensterhöhe" #: ../data/pyrenamer.schemas.in.h:11 msgid "Window width" msgstr "Fensterbreite" #: ../data/pyrenamer.schemas.in.h:12 msgid "X position of the window" msgstr "X-Position des Fensters" #: ../data/pyrenamer.schemas.in.h:13 msgid "Y position of the window" msgstr "Y-Position des Fensters" #: ../src/pyrenamer.py:430 msgid "Original file name" msgstr "Ursprünglicher Dateiname" #: ../src/pyrenamer.py:435 msgid "Renamed file name" msgstr "Umbenannter Dateiname" #: ../src/pyrenamer.py:452 #, python-format msgid "" "Could not rename file %s to %s\n" "%s" msgstr "" "Konnte Datei »%s« nicht nach »%s« umbenennen\n" "%s" #: ../src/pyrenamer.py:1325 msgid "Select file" msgstr "Wähle Datei" #: ../src/pyrenamer.py:1376 #, python-format msgid "Reading contents of dir %s" msgstr "Lese Inhalt des Ordners »%s«" #: ../src/pyrenamer.py:1395 ../src/pyrenamer.py:1454 #, python-format msgid "Directory: %s - Files: %s" msgstr "Ordner: »%s« - Dateien: %s" #: ../src/pyrenamer.py:1448 #, python-format msgid "Adding file %s" msgstr "Füge Datei »%s« hinzu" #: ../src/pyrenamer.py:1545 msgid "Ignore errors" msgstr "Ignorieren Fehler" #. about.set_artists(pyrenamerglob.artists) #: ../src/pyrenamer.py:1559 msgid "translator-credits" msgstr "" "Vinzenz Vietzke \n" "Christian Kirbach " #: ../src/pyrenamer_globals.py.in:73 msgid "Mass file renamer for GNOME" msgstr "Massen-Dateien-Umbenenner für GNOME" #: ../src/pyrenamer_filefuncs.py:661 #, python-format msgid "Error while renaming %s to %s! -> %s already exists!" msgstr "Fehler beim Umbenennen von »%s« nach »%s«! -> »%s« existiert bereits!" #: ../src/pyrenamer_filefuncs.py:670 #, python-format msgid "Error while renaming %s to %s!" msgstr "Fehler beim Umbenennen von »%s« nach »%s«!" #: ../src/pyrenamer_pattern_editor.py:152 msgid "Patterns editor" msgstr "Muster bearbeiten" #: ../src/pyrenamer_pattern_editor.py:154 msgid "Image patterns editor" msgstr "Muster für Bilder bearbeiten" #: ../src/pyrenamer_pattern_editor.py:156 msgid "Music patterns editor" msgstr "Muster für Musik bearbeiten" #: ../src/pyrenamer_prefs.py:108 msgid "Select root directory" msgstr "Wählen Sie den Ursprungs-Ordner" #: ../src/pyrenamer_prefs.py:125 msgid "Select active directory" msgstr "Wählen Sie den aktiven Ordner" #: ../src/pyrenamer_prefs.py:147 ../src/pyrenamer_prefs.py:170 msgid "" "\n" "The root directory is not valid!\n" "Please select another directory." msgstr "" "\n" "Der Ursprungs-Ordner ist ungültig!\n" "Bitte wählen Sie einen anderen Ordner." #: ../src/pyrenamer_prefs.py:150 ../src/pyrenamer_prefs.py:174 msgid "" "\n" "The active directory is not valid!\n" "Please select another directory." msgstr "" "\n" "Der aktive Ordner ist ungültig!\n" "Bitte wählen Sie einen anderen Ordner." #: ../src/pyrenamer_prefs.py:158 ../src/pyrenamer_prefs.py:183 msgid "" "\n" "Please set both directories!" msgstr "" "\n" "Bitte legen Sie beide Ordner fest!" #: ../src/pyrenamer_tooltips.py:39 #, python-format msgid "" "Original: %s\n" "Renamed: %s" msgstr "" "Original: »%s«\n" "Umbenannt: »%s«" #: ../src/pyrenamer_tooltips.py:41 #, python-format msgid "Original: %s" msgstr "Original: »%s«" #: ../src/treefilebrowser.py:389 msgid "Show hidden files" msgstr "Versteckte Dateien anzeigen" #~ msgid "Rename MP3s using their ID3 tags" #~ msgstr "MP3s anhand ihrere ID3-Tags umbenennen" #~ msgid "{1}" #~ msgstr "{1}" #~ msgid "{X}" #~ msgstr "{X}" #~ msgid "Last selected dir" #~ msgstr "Last selected dir" pyrenamer-0.6.0/po/POTFILES.in0000644000175000017500000000042111063530464012632 00000000000000[encoding: UTF-8] data/pyrenamer.desktop.in.in.in data/pyrenamer.glade data/pyrenamer.schemas.in src/pyrenamer.py src/pyrenamer_globals.py.in src/pyrenamer_filefuncs.py src/pyrenamer_pattern_editor.py src/pyrenamer_prefs.py src/pyrenamer_tooltips.py src/treefilebrowser.py pyrenamer-0.6.0/po/es.po0000644000175000017500000004655111064171712012040 00000000000000# Spanish translations for pyrenamer package. # Copyright (C) 2007 THE pyrenamer'S COPYRIGHT HOLDER # This file is distributed under the same license as the pyrenamer package. # Adolfo González Blázquez , 2007. # # msgid "" msgstr "" "Project-Id-Version: pyrenamer 0.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-09-17 14:10+0200\n" "PO-Revision-Date: 2008-09-16 12:38+0100\n" "Last-Translator: Adolfo González Blázquez \n" "Language-Team: Spanish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../data/pyrenamer.desktop.in.in.in.h:1 msgid "Mass rename files" msgstr "Renombramiento masivo de archivos" #: ../data/pyrenamer.desktop.in.in.in.h:2 ../data/pyrenamer.glade.h:177 msgid "pyRenamer" msgstr "pyRenamer" #: ../data/pyrenamer.glade.h:1 msgid "*" msgstr "*" #: ../data/pyrenamer.glade.h:2 msgid "" "*\t\tSelect every visible file\n" "*.jpg\tSelect just files that end with the \"jpg\" extension\n" "\t\tSelect every file (including hidden ones)\n" ".*\t\tSelect files starting by \".\"" msgstr "" "*\t\tSeleccionar todos los archivos visibles\n" "*.jpg\tSeleccionar archivos que acaben con la extensión \"jpg\"\n" "\t\tSeleccionar todos los archivos (incluyendo los ocultos)\n" ".*\t\tSeleccionar los archivos que empiecen po \".\"" #: ../data/pyrenamer.glade.h:6 msgid "Common substitutions" msgstr "Sustituciones comunes" #: ../data/pyrenamer.glade.h:7 msgid "Default directories" msgstr "Directorios predeterminados" #: ../data/pyrenamer.glade.h:8 msgid "Insert or delete characters from filenames" msgstr "Insertar o borrar caracteres de los nombres de archivos" #: ../data/pyrenamer.glade.h:9 msgid "Options" msgstr "Opciones" #: ../data/pyrenamer.glade.h:10 msgid "Rename files manually" msgstr "Renombrar archivos manualmente" #: ../data/pyrenamer.glade.h:11 msgid "Rename files using patterns" msgstr "Renombrar archivos usando patrones" #: ../data/pyrenamer.glade.h:12 msgid "Rename images using their metadata" msgstr "Renombrar imágenes usando sus metadatos" #: ../data/pyrenamer.glade.h:13 msgid "Rename music using its metadata" msgstr "Renombrar música usando sus metadatos" #: ../data/pyrenamer.glade.h:14 msgid "" "Put the mouse over the text fields to get help on which patterns you can " "use" msgstr "" "Ponga el ratón sobre los campos de texto para obtener ayuda sobre los " "patrones que puede usar" #: ../data/pyrenamer.glade.h:15 msgid "Select the file to rename, change its name and click Preview" msgstr "" "Seleccione el archivo a renombrar, cambie su nombre y haga click en " "\"Vista previa\"" #: ../data/pyrenamer.glade.h:16 msgid "The default selected directory" msgstr "El directorio seleccionado por defecto" #: ../data/pyrenamer.glade.h:17 msgid "The parent of the directories tree" msgstr "La raíz del árbol de directorios" #: ../data/pyrenamer.glade.h:18 msgid "Active" msgstr "Activo" #: ../data/pyrenamer.glade.h:19 msgid "Add files recursively" msgstr "Añadir archivos recursivamente" #: ../data/pyrenamer.glade.h:20 msgid "Add pattern" msgstr "Añadir patrón" #: ../data/pyrenamer.glade.h:21 msgid "" "All uppercase\n" "All downcase\n" "First letter uppercase\n" "First letter uppercase of each word" msgstr "" "Todas en mayúsculas\n" "Todas en minúsculas\n" "Primera letra en mayúsculas\n" "Primera letra de cada palabra en mayúsculas" #: ../data/pyrenamer.glade.h:25 msgid "Browse..." msgstr "Examinar..." #: ../data/pyrenamer.glade.h:26 msgid "C_lear" msgstr "_Limpiar" #: ../data/pyrenamer.glade.h:27 msgid "C_lear Preview" msgstr "_Limpiar vista previa" #: ../data/pyrenamer.glade.h:28 msgid "Capitalization" msgstr "Capitalización" #: ../data/pyrenamer.glade.h:29 msgid "" "Changes:\n" "..... to .\n" "---- to -\n" "____ to _\n" "' ' to ' '" msgstr "" "Cambia:\n" "..... por .\n" "---- por -\n" "____ por _\n" "' ' por ' '" #: ../data/pyrenamer.glade.h:34 msgid "Delete from" msgstr "Eliminar desde" #: ../data/pyrenamer.glade.h:35 msgid "" "Files\n" "Directories\n" "Files and directories" msgstr "" "Ficheros\n" "Directorios\n" "Ficheros y directorios" #: ../data/pyrenamer.glade.h:38 msgid "Fix duplicated symbols" msgstr "Arreglar símbolos duplicados" #: ../data/pyrenamer.glade.h:39 msgid "" "Image metadata replacements:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebruary\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tfriday\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Sustituciones de metadatos en imágenes:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebrero\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tviernes\n" "{imagedaysimp}\t\tvie\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Sustituciones comunes:\n" "Use {1} para la primera coincidencia. {2} para la segunda, etc...\n" "Use {num} para añadir 1, 2, 3... a los nombres de archivo\n" "Use {num2} para 01, 02, 03.....\n" "Use {num3} para 001, 002, 003...\n" "Use {num+10} para 10, 11, 12...\n" "Use {num2+10} para 010, 011, 012...\n" "Use {dir} para conseguir el directorio actual\n" "\n" "Algunas sustituciones de la fecha actual:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebrero\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tviernes\n" "{daysimp}\t\tvie\n" "\n" "Sustituciones con números aleatorios:\n" "{rand} es un número aleatorio entre 0 y 100.\n" "{rand,3} es un número aleatorio entre 0 y 100 de 3 dígitos (012)\n" "{rand500} es un número aleatorio entre 0 y 500\n" "{rand10-20} es un número aleatorio entre 10 y 20\n" "{rand20,5} es un número aleatorio entre 0 y 20 de 5 dígitos (00012)" #: ../data/pyrenamer.glade.h:82 msgid "Images" msgstr "Imágenes" #: ../data/pyrenamer.glade.h:83 msgid "Insert" msgstr "Insertar" #: ../data/pyrenamer.glade.h:84 msgid "Insert / Delete" msgstr "Insertar / Eliminar" #: ../data/pyrenamer.glade.h:85 msgid "Keep extensions" msgstr "Mantener extensiones" #: ../data/pyrenamer.glade.h:86 msgid "Manual rename" msgstr "Renombramiento manual" #: ../data/pyrenamer.glade.h:87 msgid "Music" msgstr "Música" #: ../data/pyrenamer.glade.h:88 msgid "" "Music metadata replacements:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{myear}\t2006\n" "{genre}\tHardcore\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Sustituciones de metadatos en música:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{year}\t\t2006\n" "{genre}\tHardcore\n" "\n" "Sustituciones comunes:\n" "Use {1} para la primera coincidencia. {2} para la segunda, etc...\n" "Use {num} para añadir 1, 2, 3... a los nombres de archivo\n" "Use {num2} para 01, 02, 03.....\n" "Use {num3} para 001, 002, 003...\n" "Use {num+10} para 10, 11, 12...\n" "Use {num2+10} para 010, 011, 012...\n" "Use {dir} para conseguir el directorio actual\n" "\n" "Algunas sustituciones de la fecha actual:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebrero\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tviernes\n" "{daysimp}\t\tvie\n" "\n" "Sustituciones con números aleatorios:\n" "{rand} es un número aleatorio entre 0 y 100.\n" "{rand,3} es un número aleatorio entre 0 y 100 de 3 dígitos (012)\n" "{rand500} es un número aleatorio entre 0 y 500\n" "{rand10-20} es un número aleatorio entre 10 y 20\n" "{rand20,5} es un número aleatorio entre 0 y 20 de 5 dígitos (00012)" #: ../data/pyrenamer.glade.h:122 msgid "New file name" msgstr "Nuevo nombre de archivo" #: ../data/pyrenamer.glade.h:123 msgid "Original file name pattern" msgstr "Patrón de nombre de archivo original" #: ../data/pyrenamer.glade.h:124 msgid "Pattern editor" msgstr "Editor de patrones" #: ../data/pyrenamer.glade.h:125 msgid "Pattern:" msgstr "Patrón:" #: ../data/pyrenamer.glade.h:126 msgid "Patterns" msgstr "Patrones" #: ../data/pyrenamer.glade.h:127 msgid "Preview automatically" msgstr "Vista previa automática" #: ../data/pyrenamer.glade.h:128 msgid "Remove accents" msgstr "Eliminar acentos" #: ../data/pyrenamer.glade.h:129 msgid "Renamed file name pattern" msgstr "Patrón de nombre de archivo nuevo" #: ../data/pyrenamer.glade.h:130 msgid "Replace" msgstr "Reemplazar" #: ../data/pyrenamer.glade.h:131 msgid "Root" msgstr "Raíz" #: ../data/pyrenamer.glade.h:132 msgid "Select _nothing" msgstr "Seleccionar _nada" #: ../data/pyrenamer.glade.h:133 msgid "Select _all" msgstr "Seleccionar _todo" #: ../data/pyrenamer.glade.h:134 msgid "Selection pattern" msgstr "Patrón de selección de archivos" #: ../data/pyrenamer.glade.h:135 msgid "Show options" msgstr "Mostrar opciones" #: ../data/pyrenamer.glade.h:136 msgid "Spaces" msgstr "Espacios" #: ../data/pyrenamer.glade.h:137 msgid "" "Spaces to Underscores\n" "Underscores to Spaces\n" "Spaces to Dots\n" "Dots to Spaces\n" "Spaces to Dashes\n" "Dashes to Spaces" msgstr "" "Espacios a guiones bajos\n" "Guiones bajos a espacios\n" "Espacios a puntos\n" "Puntos a espacios\n" "Espacios a guiones\n" "Guiones a espacios" #: ../data/pyrenamer.glade.h:143 msgid "Substitutions" msgstr "Sustituciones" #: ../data/pyrenamer.glade.h:144 msgid "" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Use {1} para la primera coincidencia. {2} para la segunda, etc...\n" "Use {num} para añadir 1, 2, 3... a los nombres de archivo\n" "Use {num2} para 01, 02, 03.....\n" "Use {num3} para 001, 002, 003...\n" "Use {num+10} para 10, 11, 12...\n" "Use {num2+10} para 010, 011, 012...\n" "Use {dir} para conseguir el directorio actual\n" "\n" "Algunas sustituciones de la fecha actual:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebrero\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tviernes\n" "{daysimp}\t\tvie\n" "\n" "Sustituciones con números aleatorios:\n" "{rand} es un número aleatorio entre 0 y 100.\n" "{rand,3} es un número aleatorio entre 0 y 100 de 3 dígitos (012)\n" "{rand500} es un número aleatorio entre 0 y 500\n" "{rand10-20} es un número aleatorio entre 10 y 20\n" "{rand20,5} es un número aleatorio entre 0 y 20 de 5 dígitos (00012)" #: ../data/pyrenamer.glade.h:168 msgid "_Edit" msgstr "_Editar" #: ../data/pyrenamer.glade.h:169 msgid "_File" msgstr "_Archivo" #: ../data/pyrenamer.glade.h:170 msgid "_Help" msgstr "A_yuda" #: ../data/pyrenamer.glade.h:171 msgid "_Load names from file..." msgstr "_Cargar nombres desde fichero..." #: ../data/pyrenamer.glade.h:172 msgid "_Preview" msgstr "Vista _previa" #: ../data/pyrenamer.glade.h:173 msgid "_Rename" msgstr "_Renombrar" #: ../data/pyrenamer.glade.h:174 msgid "_View" msgstr "_Vista" #: ../data/pyrenamer.glade.h:175 msgid "at" msgstr "en" #: ../data/pyrenamer.glade.h:176 msgid "or at the end" msgstr "o al final" #: ../data/pyrenamer.glade.h:178 msgid "pyRenamer preferences" msgstr "Preferencias de pyRenamer" #: ../data/pyrenamer.glade.h:179 msgid "to" msgstr "hasta" #: ../data/pyrenamer.glade.h:180 msgid "with" msgstr "con" #: ../data/pyrenamer.glade.h:181 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash" msgstr "" "{#}\tNúmeros\n" "{L}\t\tLetras\n" "{C}\t\tCaracteres (números y letras, no espacios)\n" "{X}\t\tNúmeros, letras y espacios\n" "{@}\tBasura" #: ../data/pyrenamer.glade.h:186 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash " msgstr "" "{#}\tNúmeros\n" "{L}\t\tLetras\n" "{C}\t\tCaracteres (números y letras, no espacios)\n" "{X}\t\tNúmeros, letras y espacios\n" "{@}\tBasura" #: ../data/pyrenamer.schemas.in.h:1 msgid "" "0: Rename files / 1: Rename directories / 2: Rename files and directories" msgstr "" "0: Renombrar ficheros / 1: Renombrar directorios / 2: Renombrar ficheros y " "directorios" #: ../data/pyrenamer.schemas.in.h:2 msgid "Auto preview changes" msgstr "Auto previsualizar los cambios" #: ../data/pyrenamer.schemas.in.h:3 msgid "Default active dir" msgstr "Directorio activo predeterminado" #: ../data/pyrenamer.schemas.in.h:4 msgid "Default root dir" msgstr "Directorio raíz predeterminado" #: ../data/pyrenamer.schemas.in.h:5 msgid "Display the options pane" msgstr "Muestra el panel de opciones" #: ../data/pyrenamer.schemas.in.h:6 msgid "Is the window maximized?" msgstr "¿Está la ventana maximizada?" #: ../data/pyrenamer.schemas.in.h:7 msgid "Keep files extensions" msgstr "Mantienes las extensiones de los ficheros" #: ../data/pyrenamer.schemas.in.h:8 msgid "Position of the pane separator" msgstr "Posición del separador del panel" #: ../data/pyrenamer.schemas.in.h:9 msgid "Rename files or directories" msgstr "Renombrar ficheros o directorios" #: ../data/pyrenamer.schemas.in.h:10 msgid "Window height" msgstr "Altura de la ventana" #: ../data/pyrenamer.schemas.in.h:11 msgid "Window width" msgstr "Anchura de la ventana" #: ../data/pyrenamer.schemas.in.h:12 msgid "X position of the window" msgstr "Posición X de la ventana" #: ../data/pyrenamer.schemas.in.h:13 msgid "Y position of the window" msgstr "Posición Y de la ventana" #: ../src/pyrenamer.py:430 msgid "Original file name" msgstr "Nombre de archivo original" #: ../src/pyrenamer.py:435 msgid "Renamed file name" msgstr "Nombre de archivo nuevo" #: ../src/pyrenamer.py:452 #, python-format msgid "" "Could not rename file %s to %s\n" "%s" msgstr "" "No se pudo renombrar el archivo %s a %s\n" "%s" #: ../src/pyrenamer.py:1325 msgid "Select file" msgstr "Seleccionar fichero" #: ../src/pyrenamer.py:1376 #, python-format msgid "Reading contents of dir %s" msgstr "Leyendo el contenido del directorio %s" #: ../src/pyrenamer.py:1395 ../src/pyrenamer.py:1454 #, python-format msgid "Directory: %s - Files: %s" msgstr "Directorio: %s - Archivos: %s" #: ../src/pyrenamer.py:1448 #, python-format msgid "Adding file %s" msgstr "Añadiendo archivo %s" #: ../src/pyrenamer.py:1545 msgid "Ignore errors" msgstr "Ignorar errores" #. about.set_artists(pyrenamerglob.artists) #: ../src/pyrenamer.py:1559 msgid "translator-credits" msgstr "Adolfo González Blázquez " #: ../src/pyrenamer_globals.py.in:73 msgid "Mass file renamer for GNOME" msgstr "Renombramiento masivo de archivos para GNOME" #: ../src/pyrenamer_filefuncs.py:661 #, python-format msgid "Error while renaming %s to %s! -> %s already exists!" msgstr "Error al renombrar %s a %s! -> %s ya existe!" #: ../src/pyrenamer_filefuncs.py:670 #, python-format msgid "Error while renaming %s to %s!" msgstr "Error al renombrar %s a %s!" #: ../src/pyrenamer_pattern_editor.py:152 msgid "Patterns editor" msgstr "Editor de patrones" #: ../src/pyrenamer_pattern_editor.py:154 msgid "Image patterns editor" msgstr "Editor de patrones para imágenes" #: ../src/pyrenamer_pattern_editor.py:156 msgid "Music patterns editor" msgstr "Editor de patrones para música" #: ../src/pyrenamer_prefs.py:108 msgid "Select root directory" msgstr "Seleccione el directorio raíz" #: ../src/pyrenamer_prefs.py:125 msgid "Select active directory" msgstr "Seleccione el directorio activo" #: ../src/pyrenamer_prefs.py:147 ../src/pyrenamer_prefs.py:170 msgid "" "\n" "The root directory is not valid!\n" "Please select another directory." msgstr "" "\n" "El directorio raíz no es válido!\n" "Por favor, seleccione otro directorio." #: ../src/pyrenamer_prefs.py:150 ../src/pyrenamer_prefs.py:174 msgid "" "\n" "The active directory is not valid!\n" "Please select another directory." msgstr "" "\n" "El directorio activo no es válido!\n" "Por favor, seleccione otro directorio." #: ../src/pyrenamer_prefs.py:158 ../src/pyrenamer_prefs.py:183 msgid "" "\n" "Please set both directories!" msgstr "" "\n" "Por favor, seleccione los dos directorios!" #: ../src/pyrenamer_tooltips.py:39 #, python-format msgid "" "Original: %s\n" "Renamed: %s" msgstr "" "Original: %s\n" "Renombrado: %s" #: ../src/pyrenamer_tooltips.py:41 #, python-format msgid "Original: %s" msgstr "Original: %s" #: ../src/treefilebrowser.py:389 msgid "Show hidden files" msgstr "Mostrar archivos ocultos" #~ msgid "Rename MP3s using their ID3 tags" #~ msgstr "Renombrar MP3s usando su etiquetas ID3" #~ msgid "{1}" #~ msgstr "{1}" #~ msgid "{X}" #~ msgstr "{X}" #~ msgid "Last selected dir" #~ msgstr "Último directorio seleccionado" pyrenamer-0.6.0/po/LINGUAS0000644000175000017500000000007211027665127012111 00000000000000# please keep this list sorted alphabetically de en es fr pyrenamer-0.6.0/po/fr.po0000644000175000017500000004663411064171712012042 00000000000000# Spanish translations for pyrenamer package. # Copyright (C) 2007 THE pyrenamer'S COPYRIGHT HOLDER # This file is distributed under the same license as the pyrenamer package. # Adolfo González Blázquez , 2007. # # msgid "" msgstr "" "Project-Id-Version: pyrenamer 0.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-09-17 14:10+0200\n" "PO-Revision-Date: 2008-09-16 12:38+0100\n" "Last-Translator: Adolfo González Blázquez \n" "Language-Team: French\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: French\n" #: ../data/pyrenamer.desktop.in.in.in.h:1 msgid "Mass rename files" msgstr "Renomme en masse les fichiers" #: ../data/pyrenamer.desktop.in.in.in.h:2 ../data/pyrenamer.glade.h:177 msgid "pyRenamer" msgstr "pyRenamer" #: ../data/pyrenamer.glade.h:1 msgid "*" msgstr "*" #: ../data/pyrenamer.glade.h:2 msgid "" "*\t\tSelect every visible file\n" "*.jpg\tSelect just files that end with the \"jpg\" extension\n" "\t\tSelect every file (including hidden ones)\n" ".*\t\tSelect files starting by \".\"" msgstr "" "*\t\tSélectionner tout fichier visible\n" "*.jpg\tSélectionner les fichiers portant l'extension \"jpg\"\n" "\t\tSélectionner tous les fichers (cachés compris)\n" ".*\t\tSélectionner les fichiers commençant par \".\"" #: ../data/pyrenamer.glade.h:6 msgid "Common substitutions" msgstr "Substitutions générales" #: ../data/pyrenamer.glade.h:7 msgid "Default directories" msgstr "Répertoires par défaut" #: ../data/pyrenamer.glade.h:8 msgid "Insert or delete characters from filenames" msgstr "Insérer ou effacer des caractères des noms de fichier" #: ../data/pyrenamer.glade.h:9 msgid "Options" msgstr "Options" #: ../data/pyrenamer.glade.h:10 msgid "Rename files manually" msgstr "Renommer les fichiers manuellement" #: ../data/pyrenamer.glade.h:11 msgid "Rename files using patterns" msgstr "Renommer les fichiers en utilisant des règles" #: ../data/pyrenamer.glade.h:12 msgid "Rename images using their metadata" msgstr "Renommer les images d'après leurs métadonnées" #: ../data/pyrenamer.glade.h:13 msgid "Rename music using its metadata" msgstr "Renommer la musique d'après ses métadonnées" #: ../data/pyrenamer.glade.h:14 msgid "" "Put the mouse over the text fields to get help on which patterns you can " "use" msgstr "" "Survolez avec la souris les champs de texte pour obtenir de l'aide sur " "les règles disponibles" #: ../data/pyrenamer.glade.h:15 msgid "Select the file to rename, change its name and click Preview" msgstr "" "Sélectionnez le fichier à renommer, changez son nom et cliquez sur " "\"Aperçu\"" #: ../data/pyrenamer.glade.h:16 msgid "The default selected directory" msgstr "Le répertoire sélectionné par défaut" #: ../data/pyrenamer.glade.h:17 msgid "The parent of the directories tree" msgstr "Le répertoire racine par défaut" #: ../data/pyrenamer.glade.h:18 msgid "Active" msgstr "Actif" #: ../data/pyrenamer.glade.h:19 msgid "Add files recursively" msgstr "Ajouter les fichiers récursivement" #: ../data/pyrenamer.glade.h:20 msgid "Add pattern" msgstr "Ajouter une règle" #: ../data/pyrenamer.glade.h:21 msgid "" "All uppercase\n" "All downcase\n" "First letter uppercase\n" "First letter uppercase of each word" msgstr "" "Toutes en majuscules\n" "Toutes en minuscules\n" "Première en majuscule\n" "Première lettre de chaque mot en majuscule" #: ../data/pyrenamer.glade.h:25 msgid "Browse..." msgstr "Parcourir..." #: ../data/pyrenamer.glade.h:26 msgid "C_lear" msgstr "_Vider" #: ../data/pyrenamer.glade.h:27 msgid "C_lear Preview" msgstr "_Vider l'aperçu" #: ../data/pyrenamer.glade.h:28 msgid "Capitalization" msgstr "Majuscules" #: ../data/pyrenamer.glade.h:29 msgid "" "Changes:\n" "..... to .\n" "---- to -\n" "____ to _\n" "' ' to ' '" msgstr "" "Changements:\n" "..... à .\n" "---- à -\n" "____ à _\n" "' ' à ' '" #: ../data/pyrenamer.glade.h:34 msgid "Delete from" msgstr "Effacer à partir de" #: ../data/pyrenamer.glade.h:35 msgid "" "Files\n" "Directories\n" "Files and directories" msgstr "" "Fichiers\n" "Répertoires\n" "Fichiers et répertoires" #: ../data/pyrenamer.glade.h:38 msgid "Fix duplicated symbols" msgstr "Réparer les symboles dupliqués" #: ../data/pyrenamer.glade.h:39 msgid "" "Image metadata replacements:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfebruary\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tfriday\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Substitutions par les métadonnées des images:\n" "{imagewidth}\t\t\t640\n" "{imageheight}\t\t\t480\n" "{cameramaker}\t\t\tNikon\n" "{cameramodel}\t\t\tD-50\n" "{imagedate}\t\t\t22feb1980\n" "{imageyear}\t\t\t1980\n" "{imagemonth}\t\t\t02\n" "{imagemonthname}\t\tfévrier\n" "{imagemonthsimp}\t\tfeb\n" "{imageday}\t\t\t\t22\n" "{imagedayname}\t\tvendredi\n" "{imagedaysimp}\t\tfri\n" "{imagetime}\t\t\t13_56_02\n" "{imagehour}\t\t\t13\n" "{imageminute}\t\t\t56\n" "{imagesecond}\t\t\t02\n" "\n" "Substitutions générales:\n" "Utilisez {1} pour le premier segment. {2} pour le second, etc...\n" "Utilisez {num} pour ajouter 1, 2, 3... aux noms des fichiers\n" "Utilisez {num2} pour 01, 02, 03.....\n" "Utilisez {num3} pour 001, 002, 003...\n" "Utilisez {num+10} pour 10, 11, 12...\n" "Utilsez {num2+10} pour 010, 011, 012...\n" "Utilisez {dir} pour obtenir le dossier actuel\n" "\n" "Quelques substitutions avec la date actuelle:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfévrier\n" "{monthsimp}\tfév\n" "{day}\t\t\t22\n" "{dayname}\t\tvendredi\n" "{daysimp}\t\tven\n" "\n" "Substitutions aléatoires de nombres:\n" "{rand} est un nombre aléatoire entre 0 et 100.\n" "{rand,3} est un nombre aléatoire entre 0 et 100 de 3 chiffres (012)\n" "{rand500} est un nombre aléatoire entre 0 et 500\n" "{rand10-20} est un nombre aléatoire entre 0 et 20\n" "{rand20,5} est un nombre aléatoire entre 0 et 20 de 5 chiffres (00012)" #: ../data/pyrenamer.glade.h:82 msgid "Images" msgstr "Images" #: ../data/pyrenamer.glade.h:83 msgid "Insert" msgstr "Insérer" #: ../data/pyrenamer.glade.h:84 msgid "Insert / Delete" msgstr "Insérer / Effacer" #: ../data/pyrenamer.glade.h:85 msgid "Keep extensions" msgstr "Garder les extensions" #: ../data/pyrenamer.glade.h:86 msgid "Manual rename" msgstr "Renommage manuel" #: ../data/pyrenamer.glade.h:87 msgid "Music" msgstr "Musique" #: ../data/pyrenamer.glade.h:88 msgid "" "Music metadata replacements:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{myear}\t2006\n" "{genre}\tHardcore\n" "\n" "Common replacements:\n" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Substitutions par les métadonnées de la musique:\n" "{artist}\t\tAnxiA\n" "{title}\t\tEl mundo no es una mercancía\n" "{album}\tJóven pájaro negro muerto\n" "{track}\t\t02\n" "{tracktotal}\t10\n" "{year}\t\t2006\n" "{genre}\tHardcore\n" "\n" "Substitutions générales:\n" "Utilisez {1} pour le premier segment. {2} pour le second, etc...\n" "Utilisez {num} pour ajouter 1, 2, 3... aux noms des fichiers\n" "Utilisez {num2} pour 01, 02, 03.....\n" "Utilisez {num3} pour 001, 002, 003...\n" "Utilisez {num+10} pour 10, 11, 12...\n" "Utilsez {num2+10} pour 010, 011, 012...\n" "Utilisez {dir} pour obtenir le dossier actuel\n" "\n" "Quelques substitutions avec la date actuelle:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfévrier\n" "{monthsimp}\tfév\n" "{day}\t\t\t22\n" "{dayname}\t\tvendredi\n" "{daysimp}\t\tven\n" "Substitutions aléatoires de nombres:\n" "{rand} est un nombre aléatoire entre 0 et 100.\n" "{rand,3} est un nombre aléatoire entre 0 et 100 de 3 chiffres (012)\n" "{rand500} est un nombre aléatoire entre 0 et 500\n" "{rand10-20} est un nombre aléatoire entre 0 et 20\n" "{rand20,5} est un nombre aléatoire entre 0 et 20 de 5 chiffres (00012)" #: ../data/pyrenamer.glade.h:122 msgid "New file name" msgstr "Nouveau nom de fichier" #: ../data/pyrenamer.glade.h:123 msgid "Original file name pattern" msgstr "Règle du nom de fichier original" #: ../data/pyrenamer.glade.h:124 msgid "Pattern editor" msgstr "Éditeur de règles" #: ../data/pyrenamer.glade.h:125 msgid "Pattern:" msgstr "Règle:" #: ../data/pyrenamer.glade.h:126 msgid "Patterns" msgstr "Règles" #: ../data/pyrenamer.glade.h:127 msgid "Preview automatically" msgstr "Aperçu automatique" #: ../data/pyrenamer.glade.h:128 msgid "Remove accents" msgstr "Effacer accents" #: ../data/pyrenamer.glade.h:129 msgid "Renamed file name pattern" msgstr "Règle du nom de fichier renommé" #: ../data/pyrenamer.glade.h:130 msgid "Replace" msgstr "Remplacer" #: ../data/pyrenamer.glade.h:131 msgid "Root" msgstr "Racine" #: ../data/pyrenamer.glade.h:132 msgid "Select _nothing" msgstr "_Ne rien sélectionner" #: ../data/pyrenamer.glade.h:133 msgid "Select _all" msgstr "_Tout sélectionner" #: ../data/pyrenamer.glade.h:134 msgid "Selection pattern" msgstr "Règle de sélection des fichiers" #: ../data/pyrenamer.glade.h:135 msgid "Show options" msgstr "Afficher les options" #: ../data/pyrenamer.glade.h:136 msgid "Spaces" msgstr "Espaces" #: ../data/pyrenamer.glade.h:137 msgid "" "Spaces to Underscores\n" "Underscores to Spaces\n" "Spaces to Dots\n" "Dots to Spaces\n" "Spaces to Dashes\n" "Dashes to Spaces" msgstr "" "Espaces en tirets bas\n" "Tirets bas en espaces\n" "Espaces en points\n" "Points en espaces\n" "Espaces en tirets\n" "Tirets en espaces" #: ../data/pyrenamer.glade.h:143 msgid "Substitutions" msgstr "Substitutions" #: ../data/pyrenamer.glade.h:144 msgid "" "Use {1} for first catched item. {2} for second, etc...\n" "Use {num} for adding 1, 2, 3... to file names\n" "Use {num2} for 01, 02, 03.....\n" "Use {num3} for 001, 002, 003...\n" "Use {num+10} for 10, 11, 12...\n" "Use {num2+10} for 010, 011, 012...\n" "Use {dir} for getting current dir\n" "\n" "Some today date replacements:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfebruary\n" "{monthsimp}\tfeb\n" "{day}\t\t\t22\n" "{dayname}\t\tfriday\n" "{daysimp}\t\tfri\n" "\n" "Random number replacements:\n" "{rand} is random number between 0 and 100.\n" "{rand,3} is random number between 0 and 100 of 3 digits (012)\n" "{rand500} is random number between 0 and 500\n" "{rand10-20} is random number between 10 and 20\n" "{rand20,5} is random number between 0 and 20 of 5 digits (00012)" msgstr "" "Substitutions générales:\n" "Utilisez {1} pour le premier segment. {2} pour le second, etc...\n" "Utilisez {num} pour ajouter 1, 2, 3... aux noms des fichiers\n" "Utilisez {num2} pour 01, 02, 03.....\n" "Utilisez {num3} pour 001, 002, 003...\n" "Utilisez {num+10} pour 10, 11, 12...\n" "Utilsez {num2+10} pour 010, 011, 012...\n" "Utilisez {dir} pour obtenir le dossier actuel\n" "\n" "Quelques substitutions avec la date actuelle:\n" "{date}\t\t\t22feb1980\n" "{year}\t\t\t1980\n" "{month}\t\t02\n" "{monthname}\tfévrier\n" "{monthsimp}\tfév\n" "{day}\t\t\t22\n" "{dayname}\t\tvendredi\n" "{daysimp}\t\tven\n" "\n" "Substitutions aléatoires de nombres:\n" "{rand} est un nombre aléatoire entre 0 et 100.\n" "{rand,3} est un nombre aléatoire entre 0 et 100 de 3 chiffres (012)\n" "{rand500} est un nombre aléatoire entre 0 et 500\n" "{rand10-20} est un nombre aléatoire entre 0 et 20\n" "{rand20,5} est un nombre aléatoire entre 0 et 20 de 5 chiffres (00012)" #: ../data/pyrenamer.glade.h:168 msgid "_Edit" msgstr "É_dition" #: ../data/pyrenamer.glade.h:169 msgid "_File" msgstr "_Fichier" #: ../data/pyrenamer.glade.h:170 msgid "_Help" msgstr "Aid_e" #: ../data/pyrenamer.glade.h:171 msgid "_Load names from file..." msgstr "Charger _les noms depuis un fichier..." #: ../data/pyrenamer.glade.h:172 msgid "_Preview" msgstr "A_perçu" #: ../data/pyrenamer.glade.h:173 msgid "_Rename" msgstr "_Renommer" #: ../data/pyrenamer.glade.h:174 msgid "_View" msgstr "_Affichage" #: ../data/pyrenamer.glade.h:175 msgid "at" msgstr "en" #: ../data/pyrenamer.glade.h:176 msgid "or at the end" msgstr "ou à la fin" #: ../data/pyrenamer.glade.h:178 msgid "pyRenamer preferences" msgstr "Préférences de pyRenamer" #: ../data/pyrenamer.glade.h:179 msgid "to" msgstr "à" #: ../data/pyrenamer.glade.h:180 msgid "with" msgstr "par" #: ../data/pyrenamer.glade.h:181 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash" msgstr "" "{#}\tChiffres\n" "{L}\t\tLettres\n" "{C}\tCaractères (chiffres et lettres, pas d'espaces)\n" "{X}\t\tChiffres, lettres et espaces\n" "{@}\tCorbeille " #: ../data/pyrenamer.glade.h:186 msgid "" "{#}\tNumbers\n" "{L}\t\tLetters\n" "{C}\t\tCharacters (numbers and letters, not spaces)\n" "{X}\t\tNumbers, letters, and spaces\n" "{@}\tTrash " msgstr "" "{#}\tChiffres\n" "{L}\t\tLettres\n" "{C}\tCaractères (chiffres et lettres, pas d'espaces)\n" "{X}\t\tChiffres, lettres et espaces\n" "{@}\tCorbeille " #: ../data/pyrenamer.schemas.in.h:1 msgid "" "0: Rename files / 1: Rename directories / 2: Rename files and directories" msgstr "" "0: Renommer les fichiers / 1: Renommer les répertoires / 2: Renommer les " "fichiers et répertoires" #: ../data/pyrenamer.schemas.in.h:2 msgid "Auto preview changes" msgstr "Aperçu automatique des changements" #: ../data/pyrenamer.schemas.in.h:3 msgid "Default active dir" msgstr "Répertoire actif par défaut" #: ../data/pyrenamer.schemas.in.h:4 msgid "Default root dir" msgstr "Répertoire racine par défaut" #: ../data/pyrenamer.schemas.in.h:5 msgid "Display the options pane" msgstr "Montrer le panneau d'options" #: ../data/pyrenamer.schemas.in.h:6 msgid "Is the window maximized?" msgstr "La fenêtre est-elle maximisée?" #: ../data/pyrenamer.schemas.in.h:7 msgid "Keep files extensions" msgstr "Garder les extensions des fichiers" #: ../data/pyrenamer.schemas.in.h:8 msgid "Position of the pane separator" msgstr "Position du séparateur du panneau" #: ../data/pyrenamer.schemas.in.h:9 msgid "Rename files or directories" msgstr "Renommer les fichiers ou répertoires" #: ../data/pyrenamer.schemas.in.h:10 msgid "Window height" msgstr "Hauteur de la fenêtre" #: ../data/pyrenamer.schemas.in.h:11 msgid "Window width" msgstr "Largeur de la fenêtre" #: ../data/pyrenamer.schemas.in.h:12 msgid "X position of the window" msgstr "Position X de la fenêtre" #: ../data/pyrenamer.schemas.in.h:13 msgid "Y position of the window" msgstr "Position Y de la fenêtre" #: ../src/pyrenamer.py:430 msgid "Original file name" msgstr "Nom de fichier original" #: ../src/pyrenamer.py:435 msgid "Renamed file name" msgstr "Nouveau nom de fichier" #: ../src/pyrenamer.py:452 #, python-format msgid "" "Could not rename file %s to %s\n" "%s" msgstr "" "Le fichier n'a pas pu être renommé de %s en %s\n" "%s" #: ../src/pyrenamer.py:1325 msgid "Select file" msgstr "Sélectionner fichier" #: ../src/pyrenamer.py:1376 #, python-format msgid "Reading contents of dir %s" msgstr "Parcoure le contenu du répertoire %s" #: ../src/pyrenamer.py:1395 ../src/pyrenamer.py:1454 #, python-format msgid "Directory: %s - Files: %s" msgstr "Répertoires: %s - Fichiers: %s" #: ../src/pyrenamer.py:1448 #, python-format msgid "Adding file %s" msgstr "Ajout des fichiers %s" #: ../src/pyrenamer.py:1545 msgid "Ignore errors" msgstr "Ignorer les erreurs" #. about.set_artists(pyrenamerglob.artists) #: ../src/pyrenamer.py:1559 msgid "translator-credits" msgstr "Christophe Perez " #: ../src/pyrenamer_globals.py.in:73 msgid "Mass file renamer for GNOME" msgstr "Renommage en masse de fichiers pour GNOME" #: ../src/pyrenamer_filefuncs.py:661 #, python-format msgid "Error while renaming %s to %s! -> %s already exists!" msgstr "Erreur au renommage %s en %s! -> %s existe déjà!" #: ../src/pyrenamer_filefuncs.py:670 #, python-format msgid "Error while renaming %s to %s!" msgstr "Erreur au renommage %s en %s!" #: ../src/pyrenamer_pattern_editor.py:152 msgid "Patterns editor" msgstr "Éditeur de règles" #: ../src/pyrenamer_pattern_editor.py:154 msgid "Image patterns editor" msgstr "Éditeur de règles pour les images" #: ../src/pyrenamer_pattern_editor.py:156 msgid "Music patterns editor" msgstr "Éditeur de règles pour la musique" #: ../src/pyrenamer_prefs.py:108 msgid "Select root directory" msgstr "Sélectionnez le répertoire racine" #: ../src/pyrenamer_prefs.py:125 msgid "Select active directory" msgstr "Sélectionnez le répertoire actif" #: ../src/pyrenamer_prefs.py:147 ../src/pyrenamer_prefs.py:170 msgid "" "\n" "The root directory is not valid!\n" "Please select another directory." msgstr "" "\n" "Le répertoire racine choisi n'est pas valide!\n" "Veuillez sélectionner un autre répertoire." #: ../src/pyrenamer_prefs.py:150 ../src/pyrenamer_prefs.py:174 msgid "" "\n" "The active directory is not valid!\n" "Please select another directory." msgstr "" "\n" "Le répertoire actif choisi n'est pas valide!\n" "Veuillez sélectionner un autre répertoire." #: ../src/pyrenamer_prefs.py:158 ../src/pyrenamer_prefs.py:183 msgid "" "\n" "Please set both directories!" msgstr "" "\n" "Veuillez sélectionner les deux répertoires!" #: ../src/pyrenamer_tooltips.py:39 #, python-format msgid "" "Original: %s\n" "Renamed: %s" msgstr "" "Original: %s\n" "Renommé: %s" #: ../src/pyrenamer_tooltips.py:41 #, python-format msgid "Original: %s" msgstr "Original: %s" #: ../src/treefilebrowser.py:389 msgid "Show hidden files" msgstr "Afficher les fichiers cachés" pyrenamer-0.6.0/COPYING0000644000175000017500000004312210654337407011506 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. pyrenamer-0.6.0/README0000644000175000017500000000410411064027014011312 00000000000000-========================- -= pyRenamer 0.6.0 =- -========================- pyRenamer is an application for mass renaming files. You can rename files using patterns, substitutions, insert or delete text, or even rename files manually. You can also rename images using their EXIF tags and music using their internal tags. pyRenamer is released under the terms of the GNU General Public License. -= You need =_ * python * pygtk (>= 2.6) * gconf * python-hachoir-metadata (for music renaming) or python-eyed3 (for renaming MP3s) -= To install =- $ ./configure --prefix /usr $ make $ sudo make install -= To run pyRenamer =- $ pyrenamer This will launch pyRenamer $ pyrenamer /home/user/Music This will launch pyRenamer and select /home/user/Music as active dir $ pyrenamer --root /mnt/music This will set /mnt/music as the roor dir on left directories tree $ pyrenamer --root /mnt/music /mnt/music/hardcorepunk This is like above option, but setting /mnt/music/hardcorepunk as active dir $ pyrenamer --help This will show available command line options -= Website =- More info on: http://www.infinicode.org/code/pyrenamer/ -= Author =- Adolfo González Blázquez -= Translators =- French: Christophe Perez German: Vinzenz Vietzke Christian Kirbach -= TreeFileBrowser =- pyRenamer uses a widget called treefilebrowser.py, which is a tree-like file browser, just like the one on Nautilus side bar. You can see its source code on src/treefilebrowser.py There's an example on how to use it on doc/treefilebrowser_example.py -= Thanks =- pyRenamer uses TreeViewTooltips.py from Daniel J. Popowich pyRenamer uses EXIF.py from Gene Cash Thanks to Piotr Ożarowski for sponsoring Debian packages and helping debugging Thanks to Jeremy Messenger for freebsd packaging and helping debugging Thanks to Jan Virt for czech language accents replacement pyrenamer-0.6.0/py-compile0000755000175000017500000001005611064200176012443 00000000000000#!/bin/sh # py-compile - Compile a Python program scriptversion=2005-05-14.22 # Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi basedir= destdir= files= while test $# -ne 0; do case "$1" in --basedir) basedir=$2 if test -z "$basedir"; then echo "$0: Missing argument to --basedir." 1>&2 exit 1 fi shift ;; --destdir) destdir=$2 if test -z "$destdir"; then echo "$0: Missing argument to --destdir." 1>&2 exit 1 fi shift ;; -h|--h*) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--v*) echo "py-compile $scriptversion" exit $? ;; *) files="$files $1" ;; esac shift done if test -z "$files"; then echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, string, py_compile files = '''$files''' print 'Byte-compiling python modules...' for file in string.split(files): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(filepath, filepath + 'c', path) print" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, string, py_compile files = '''$files''' print 'Byte-compiling python modules (optimized versions) ...' for file in string.split(files): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue print file, sys.stdout.flush() py_compile.compile(filepath, filepath + 'o', path) print" 2>/dev/null || : # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pyrenamer-0.6.0/src/0000777000175000017500000000000011064200213011300 500000000000000pyrenamer-0.6.0/src/EXIF.py0000644000175000017500000012170110654337136012346 00000000000000# Library to extract EXIF information in digital camera image files # # To use this library call with: # f=open(path_name, 'rb') # tags=EXIF.process_file(f) # tags will now be a dictionary mapping names of EXIF tags to their # values in the file named by path_name. You can process the tags # as you wish. In particular, you can iterate through all the tags with: # for tag in tags.keys(): # if tag not in ('JPEGThumbnail', 'TIFFThumbnail', 'Filename', # 'EXIF MakerNote'): # print "Key: %s, value %s" % (tag, tags[tag]) # (This code uses the if statement to avoid printing out a few of the # tags that tend to be long or boring.) # # The tags dictionary will include keys for all of the usual EXIF # tags, and will also include keys for Makernotes used by some # cameras, for which we have a good specification. # # Contains code from "exifdump.py" originally written by Thierry Bousch # and released into the public domain. # # Updated and turned into general-purpose library by Gene Cash # # This copyright license is intended to be similar to the FreeBSD license. # # Copyright 2002 Gene Cash All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # # THIS SOFTWARE IS PROVIDED BY GENE CASH ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # This means you may do anything you want with this code, except claim you # wrote it. Also, if it breaks you get to keep both pieces. # # Patch Contributors: # * Simon J. Gerraty # s2n fix & orientation decode # * John T. Riedl # Added support for newer Nikon type 3 Makernote format for D70 and some # other Nikon cameras. # * Joerg Schaefer # Fixed subtle bug when faking an EXIF header, which affected maker notes # using relative offsets, and a fix for Nikon D100. # # 21-AUG-99 TB Last update by Thierry Bousch to his code. # 17-JAN-02 CEC Discovered code on web. # Commented everything. # Made small code improvements. # Reformatted for readability. # 19-JAN-02 CEC Added ability to read TIFFs and JFIF-format JPEGs. # Added ability to extract JPEG formatted thumbnail. # Added ability to read GPS IFD (not tested). # Converted IFD data structure to dictionaries indexed by # tag name. # Factored into library returning dictionary of IFDs plus # thumbnail, if any. # 20-JAN-02 CEC Added MakerNote processing logic. # Added Olympus MakerNote. # Converted data structure to single-level dictionary, avoiding # tag name collisions by prefixing with IFD name. This makes # it much easier to use. # 23-JAN-02 CEC Trimmed nulls from end of string values. # 25-JAN-02 CEC Discovered JPEG thumbnail in Olympus TIFF MakerNote. # 26-JAN-02 CEC Added ability to extract TIFF thumbnails. # Added Nikon, Fujifilm, Casio MakerNotes. # 30-NOV-03 CEC Fixed problem with canon_decode_tag() not creating an # IFD_Tag() object. # 15-FEB-04 CEC Finally fixed bit shift warning by converting Y to 0L. # # field type descriptions as (length, abbreviation, full name) tuples FIELD_TYPES=( (0, 'X', 'Proprietary'), # no such type (1, 'B', 'Byte'), (1, 'A', 'ASCII'), (2, 'S', 'Short'), (4, 'L', 'Long'), (8, 'R', 'Ratio'), (1, 'SB', 'Signed Byte'), (1, 'U', 'Undefined'), (2, 'SS', 'Signed Short'), (4, 'SL', 'Signed Long'), (8, 'SR', 'Signed Ratio') ) # dictionary of main EXIF tag names # first element of tuple is tag name, optional second element is # another dictionary giving names to values EXIF_TAGS={ 0x0100: ('ImageWidth', ), 0x0101: ('ImageLength', ), 0x0102: ('BitsPerSample', ), 0x0103: ('Compression', {1: 'Uncompressed TIFF', 6: 'JPEG Compressed'}), 0x0106: ('PhotometricInterpretation', ), 0x010A: ('FillOrder', ), 0x010D: ('DocumentName', ), 0x010E: ('ImageDescription', ), 0x010F: ('Make', ), 0x0110: ('Model', ), 0x0111: ('StripOffsets', ), 0x0112: ('Orientation', {1: 'Horizontal (normal)', 2: 'Mirrored horizontal', 3: 'Rotated 180', 4: 'Mirrored vertical', 5: 'Mirrored horizontal then rotated 90 CCW', 6: 'Rotated 90 CW', 7: 'Mirrored horizontal then rotated 90 CW', 8: 'Rotated 90 CCW'}), 0x0115: ('SamplesPerPixel', ), 0x0116: ('RowsPerStrip', ), 0x0117: ('StripByteCounts', ), 0x011A: ('XResolution', ), 0x011B: ('YResolution', ), 0x011C: ('PlanarConfiguration', ), 0x0128: ('ResolutionUnit', {1: 'Not Absolute', 2: 'Pixels/Inch', 3: 'Pixels/Centimeter'}), 0x012D: ('TransferFunction', ), 0x0131: ('Software', ), 0x0132: ('DateTime', ), 0x013B: ('Artist', ), 0x013E: ('WhitePoint', ), 0x013F: ('PrimaryChromaticities', ), 0x0156: ('TransferRange', ), 0x0200: ('JPEGProc', ), 0x0201: ('JPEGInterchangeFormat', ), 0x0202: ('JPEGInterchangeFormatLength', ), 0x0211: ('YCbCrCoefficients', ), 0x0212: ('YCbCrSubSampling', ), 0x0213: ('YCbCrPositioning', ), 0x0214: ('ReferenceBlackWhite', ), 0x828D: ('CFARepeatPatternDim', ), 0x828E: ('CFAPattern', ), 0x828F: ('BatteryLevel', ), 0x8298: ('Copyright', ), 0x829A: ('ExposureTime', ), 0x829D: ('FNumber', ), 0x83BB: ('IPTC/NAA', ), 0x8769: ('ExifOffset', ), 0x8773: ('InterColorProfile', ), 0x8822: ('ExposureProgram', {0: 'Unidentified', 1: 'Manual', 2: 'Program Normal', 3: 'Aperture Priority', 4: 'Shutter Priority', 5: 'Program Creative', 6: 'Program Action', 7: 'Portrait Mode', 8: 'Landscape Mode'}), 0x8824: ('SpectralSensitivity', ), 0x8825: ('GPSInfo', ), 0x8827: ('ISOSpeedRatings', ), 0x8828: ('OECF', ), # print as string 0x9000: ('ExifVersion', lambda x: ''.join(map(chr, x))), 0x9003: ('DateTimeOriginal', ), 0x9004: ('DateTimeDigitized', ), 0x9101: ('ComponentsConfiguration', {0: '', 1: 'Y', 2: 'Cb', 3: 'Cr', 4: 'Red', 5: 'Green', 6: 'Blue'}), 0x9102: ('CompressedBitsPerPixel', ), 0x9201: ('ShutterSpeedValue', ), 0x9202: ('ApertureValue', ), 0x9203: ('BrightnessValue', ), 0x9204: ('ExposureBiasValue', ), 0x9205: ('MaxApertureValue', ), 0x9206: ('SubjectDistance', ), 0x9207: ('MeteringMode', {0: 'Unidentified', 1: 'Average', 2: 'CenterWeightedAverage', 3: 'Spot', 4: 'MultiSpot'}), 0x9208: ('LightSource', {0: 'Unknown', 1: 'Daylight', 2: 'Fluorescent', 3: 'Tungsten', 10: 'Flash', 17: 'Standard Light A', 18: 'Standard Light B', 19: 'Standard Light C', 20: 'D55', 21: 'D65', 22: 'D75', 255: 'Other'}), 0x9209: ('Flash', {0: 'No', 1: 'Fired', 5: 'Fired (?)', # no return sensed 7: 'Fired (!)', # return sensed 9: 'Fill Fired', 13: 'Fill Fired (?)', 15: 'Fill Fired (!)', 16: 'Off', 24: 'Auto Off', 25: 'Auto Fired', 29: 'Auto Fired (?)', 31: 'Auto Fired (!)', 32: 'Not Available'}), 0x920A: ('FocalLength', ), 0x927C: ('MakerNote', ), # print as string 0x9286: ('UserComment', lambda x: ''.join(map(chr, x))), 0x9290: ('SubSecTime', ), 0x9291: ('SubSecTimeOriginal', ), 0x9292: ('SubSecTimeDigitized', ), # print as string 0xA000: ('FlashPixVersion', lambda x: ''.join(map(chr, x))), 0xA001: ('ColorSpace', ), 0xA002: ('ExifImageWidth', ), 0xA003: ('ExifImageLength', ), 0xA005: ('InteroperabilityOffset', ), 0xA20B: ('FlashEnergy', ), # 0x920B in TIFF/EP 0xA20C: ('SpatialFrequencyResponse', ), # 0x920C - - 0xA20E: ('FocalPlaneXResolution', ), # 0x920E - - 0xA20F: ('FocalPlaneYResolution', ), # 0x920F - - 0xA210: ('FocalPlaneResolutionUnit', ), # 0x9210 - - 0xA214: ('SubjectLocation', ), # 0x9214 - - 0xA215: ('ExposureIndex', ), # 0x9215 - - 0xA217: ('SensingMethod', ), # 0x9217 - - 0xA300: ('FileSource', {3: 'Digital Camera'}), 0xA301: ('SceneType', {1: 'Directly Photographed'}), 0xA302: ('CVAPattern',), } # interoperability tags INTR_TAGS={ 0x0001: ('InteroperabilityIndex', ), 0x0002: ('InteroperabilityVersion', ), 0x1000: ('RelatedImageFileFormat', ), 0x1001: ('RelatedImageWidth', ), 0x1002: ('RelatedImageLength', ), } # GPS tags (not used yet, haven't seen camera with GPS) GPS_TAGS={ 0x0000: ('GPSVersionID', ), 0x0001: ('GPSLatitudeRef', ), 0x0002: ('GPSLatitude', ), 0x0003: ('GPSLongitudeRef', ), 0x0004: ('GPSLongitude', ), 0x0005: ('GPSAltitudeRef', ), 0x0006: ('GPSAltitude', ), 0x0007: ('GPSTimeStamp', ), 0x0008: ('GPSSatellites', ), 0x0009: ('GPSStatus', ), 0x000A: ('GPSMeasureMode', ), 0x000B: ('GPSDOP', ), 0x000C: ('GPSSpeedRef', ), 0x000D: ('GPSSpeed', ), 0x000E: ('GPSTrackRef', ), 0x000F: ('GPSTrack', ), 0x0010: ('GPSImgDirectionRef', ), 0x0011: ('GPSImgDirection', ), 0x0012: ('GPSMapDatum', ), 0x0013: ('GPSDestLatitudeRef', ), 0x0014: ('GPSDestLatitude', ), 0x0015: ('GPSDestLongitudeRef', ), 0x0016: ('GPSDestLongitude', ), 0x0017: ('GPSDestBearingRef', ), 0x0018: ('GPSDestBearing', ), 0x0019: ('GPSDestDistanceRef', ), 0x001A: ('GPSDestDistance', ) } # Nikon E99x MakerNote Tags # http://members.tripod.com/~tawba/990exif.htm MAKERNOTE_NIKON_NEWER_TAGS={ 0x0002: ('ISOSetting', ), 0x0003: ('ColorMode', ), 0x0004: ('Quality', ), 0x0005: ('Whitebalance', ), 0x0006: ('ImageSharpening', ), 0x0007: ('FocusMode', ), 0x0008: ('FlashSetting', ), 0x0009: ('AutoFlashMode', ), 0x000B: ('WhiteBalanceBias', ), 0x000C: ('WhiteBalanceRBCoeff', ), 0x000F: ('ISOSelection', ), 0x0012: ('FlashCompensation', ), 0x0013: ('ISOSpeedRequested', ), 0x0016: ('PhotoCornerCoordinates', ), 0x0018: ('FlashBracketCompensationApplied', ), 0x0019: ('AEBracketCompensationApplied', ), 0x0080: ('ImageAdjustment', ), 0x0081: ('ToneCompensation', ), 0x0082: ('AuxiliaryLens', ), 0x0083: ('LensType', ), 0x0084: ('LensMinMaxFocalMaxAperture', ), 0x0085: ('ManualFocusDistance', ), 0x0086: ('DigitalZoomFactor', ), 0x0088: ('AFFocusPosition', {0x0000: 'Center', 0x0100: 'Top', 0x0200: 'Bottom', 0x0300: 'Left', 0x0400: 'Right'}), 0x0089: ('BracketingMode', {0x00: 'Single frame, no bracketing', 0x01: 'Continuous, no bracketing', 0x02: 'Timer, no bracketing', 0x10: 'Single frame, exposure bracketing', 0x11: 'Continuous, exposure bracketing', 0x12: 'Timer, exposure bracketing', 0x40: 'Single frame, white balance bracketing', 0x41: 'Continuous, white balance bracketing', 0x42: 'Timer, white balance bracketing'}), 0x008D: ('ColorMode', ), 0x008F: ('SceneMode?', ), 0x0090: ('LightingType', ), 0x0092: ('HueAdjustment', ), 0x0094: ('Saturation', {-3: 'B&W', -2: '-2', -1: '-1', 0: '0', 1: '1', 2: '2'}), 0x0095: ('NoiseReduction', ), 0x00A7: ('TotalShutterReleases', ), 0x00A9: ('ImageOptimization', ), 0x00AA: ('Saturation', ), 0x00AB: ('DigitalVariProgram', ), 0x0010: ('DataDump', ) } MAKERNOTE_NIKON_OLDER_TAGS={ 0x0003: ('Quality', {1: 'VGA Basic', 2: 'VGA Normal', 3: 'VGA Fine', 4: 'SXGA Basic', 5: 'SXGA Normal', 6: 'SXGA Fine'}), 0x0004: ('ColorMode', {1: 'Color', 2: 'Monochrome'}), 0x0005: ('ImageAdjustment', {0: 'Normal', 1: 'Bright+', 2: 'Bright-', 3: 'Contrast+', 4: 'Contrast-'}), 0x0006: ('CCDSpeed', {0: 'ISO 80', 2: 'ISO 160', 4: 'ISO 320', 5: 'ISO 100'}), 0x0007: ('WhiteBalance', {0: 'Auto', 1: 'Preset', 2: 'Daylight', 3: 'Incandescent', 4: 'Fluorescent', 5: 'Cloudy', 6: 'Speed Light'}) } # decode Olympus SpecialMode tag in MakerNote def olympus_special_mode(v): a={ 0: 'Normal', 1: 'Unknown', 2: 'Fast', 3: 'Panorama'} b={ 0: 'Non-panoramic', 1: 'Left to right', 2: 'Right to left', 3: 'Bottom to top', 4: 'Top to bottom'} return '%s - sequence %d - %s' % (a[v[0]], v[1], b[v[2]]) MAKERNOTE_OLYMPUS_TAGS={ # ah HAH! those sneeeeeaky bastids! this is how they get past the fact # that a JPEG thumbnail is not allowed in an uncompressed TIFF file 0x0100: ('JPEGThumbnail', ), 0x0200: ('SpecialMode', olympus_special_mode), 0x0201: ('JPEGQual', {1: 'SQ', 2: 'HQ', 3: 'SHQ'}), 0x0202: ('Macro', {0: 'Normal', 1: 'Macro'}), 0x0204: ('DigitalZoom', ), 0x0207: ('SoftwareRelease', ), 0x0208: ('PictureInfo', ), # print as string 0x0209: ('CameraID', lambda x: ''.join(map(chr, x))), 0x0F00: ('DataDump', ) } MAKERNOTE_CASIO_TAGS={ 0x0001: ('RecordingMode', {1: 'Single Shutter', 2: 'Panorama', 3: 'Night Scene', 4: 'Portrait', 5: 'Landscape'}), 0x0002: ('Quality', {1: 'Economy', 2: 'Normal', 3: 'Fine'}), 0x0003: ('FocusingMode', {2: 'Macro', 3: 'Auto Focus', 4: 'Manual Focus', 5: 'Infinity'}), 0x0004: ('FlashMode', {1: 'Auto', 2: 'On', 3: 'Off', 4: 'Red Eye Reduction'}), 0x0005: ('FlashIntensity', {11: 'Weak', 13: 'Normal', 15: 'Strong'}), 0x0006: ('Object Distance', ), 0x0007: ('WhiteBalance', {1: 'Auto', 2: 'Tungsten', 3: 'Daylight', 4: 'Fluorescent', 5: 'Shade', 129: 'Manual'}), 0x000B: ('Sharpness', {0: 'Normal', 1: 'Soft', 2: 'Hard'}), 0x000C: ('Contrast', {0: 'Normal', 1: 'Low', 2: 'High'}), 0x000D: ('Saturation', {0: 'Normal', 1: 'Low', 2: 'High'}), 0x0014: ('CCDSpeed', {64: 'Normal', 80: 'Normal', 100: 'High', 125: '+1.0', 244: '+3.0', 250: '+2.0',}) } MAKERNOTE_FUJIFILM_TAGS={ 0x0000: ('NoteVersion', lambda x: ''.join(map(chr, x))), 0x1000: ('Quality', ), 0x1001: ('Sharpness', {1: 'Soft', 2: 'Soft', 3: 'Normal', 4: 'Hard', 5: 'Hard'}), 0x1002: ('WhiteBalance', {0: 'Auto', 256: 'Daylight', 512: 'Cloudy', 768: 'DaylightColor-Fluorescent', 769: 'DaywhiteColor-Fluorescent', 770: 'White-Fluorescent', 1024: 'Incandescent', 3840: 'Custom'}), 0x1003: ('Color', {0: 'Normal', 256: 'High', 512: 'Low'}), 0x1004: ('Tone', {0: 'Normal', 256: 'High', 512: 'Low'}), 0x1010: ('FlashMode', {0: 'Auto', 1: 'On', 2: 'Off', 3: 'Red Eye Reduction'}), 0x1011: ('FlashStrength', ), 0x1020: ('Macro', {0: 'Off', 1: 'On'}), 0x1021: ('FocusMode', {0: 'Auto', 1: 'Manual'}), 0x1030: ('SlowSync', {0: 'Off', 1: 'On'}), 0x1031: ('PictureMode', {0: 'Auto', 1: 'Portrait', 2: 'Landscape', 4: 'Sports', 5: 'Night', 6: 'Program AE', 256: 'Aperture Priority AE', 512: 'Shutter Priority AE', 768: 'Manual Exposure'}), 0x1100: ('MotorOrBracket', {0: 'Off', 1: 'On'}), 0x1300: ('BlurWarning', {0: 'Off', 1: 'On'}), 0x1301: ('FocusWarning', {0: 'Off', 1: 'On'}), 0x1302: ('AEWarning', {0: 'Off', 1: 'On'}) } MAKERNOTE_CANON_TAGS={ 0x0006: ('ImageType', ), 0x0007: ('FirmwareVersion', ), 0x0008: ('ImageNumber', ), 0x0009: ('OwnerName', ) } # see http://www.burren.cx/david/canon.html by David Burren # this is in element offset, name, optional value dictionary format MAKERNOTE_CANON_TAG_0x001={ 1: ('Macromode', {1: 'Macro', 2: 'Normal'}), 2: ('SelfTimer', ), 3: ('Quality', {2: 'Normal', 3: 'Fine', 5: 'Superfine'}), 4: ('FlashMode', {0: 'Flash Not Fired', 1: 'Auto', 2: 'On', 3: 'Red-Eye Reduction', 4: 'Slow Synchro', 5: 'Auto + Red-Eye Reduction', 6: 'On + Red-Eye Reduction', 16: 'external flash'}), 5: ('ContinuousDriveMode', {0: 'Single Or Timer', 1: 'Continuous'}), 7: ('FocusMode', {0: 'One-Shot', 1: 'AI Servo', 2: 'AI Focus', 3: 'MF', 4: 'Single', 5: 'Continuous', 6: 'MF'}), 10: ('ImageSize', {0: 'Large', 1: 'Medium', 2: 'Small'}), 11: ('EasyShootingMode', {0: 'Full Auto', 1: 'Manual', 2: 'Landscape', 3: 'Fast Shutter', 4: 'Slow Shutter', 5: 'Night', 6: 'B&W', 7: 'Sepia', 8: 'Portrait', 9: 'Sports', 10: 'Macro/Close-Up', 11: 'Pan Focus'}), 12: ('DigitalZoom', {0: 'None', 1: '2x', 2: '4x'}), 13: ('Contrast', {0xFFFF: 'Low', 0: 'Normal', 1: 'High'}), 14: ('Saturation', {0xFFFF: 'Low', 0: 'Normal', 1: 'High'}), 15: ('Sharpness', {0xFFFF: 'Low', 0: 'Normal', 1: 'High'}), 16: ('ISO', {0: 'See ISOSpeedRatings Tag', 15: 'Auto', 16: '50', 17: '100', 18: '200', 19: '400'}), 17: ('MeteringMode', {3: 'Evaluative', 4: 'Partial', 5: 'Center-weighted'}), 18: ('FocusType', {0: 'Manual', 1: 'Auto', 3: 'Close-Up (Macro)', 8: 'Locked (Pan Mode)'}), 19: ('AFPointSelected', {0x3000: 'None (MF)', 0x3001: 'Auto-Selected', 0x3002: 'Right', 0x3003: 'Center', 0x3004: 'Left'}), 20: ('ExposureMode', {0: 'Easy Shooting', 1: 'Program', 2: 'Tv-priority', 3: 'Av-priority', 4: 'Manual', 5: 'A-DEP'}), 23: ('LongFocalLengthOfLensInFocalUnits', ), 24: ('ShortFocalLengthOfLensInFocalUnits', ), 25: ('FocalUnitsPerMM', ), 28: ('FlashActivity', {0: 'Did Not Fire', 1: 'Fired'}), 29: ('FlashDetails', {14: 'External E-TTL', 13: 'Internal Flash', 11: 'FP Sync Used', 7: '2nd("Rear")-Curtain Sync Used', 4: 'FP Sync Enabled'}), 32: ('FocusMode', {0: 'Single', 1: 'Continuous'}) } MAKERNOTE_CANON_TAG_0x004={ 7: ('WhiteBalance', {0: 'Auto', 1: 'Sunny', 2: 'Cloudy', 3: 'Tungsten', 4: 'Fluorescent', 5: 'Flash', 6: 'Custom'}), 9: ('SequenceNumber', ), 14: ('AFPointUsed', ), 15: ('FlashBias', {0XFFC0: '-2 EV', 0XFFCC: '-1.67 EV', 0XFFD0: '-1.50 EV', 0XFFD4: '-1.33 EV', 0XFFE0: '-1 EV', 0XFFEC: '-0.67 EV', 0XFFF0: '-0.50 EV', 0XFFF4: '-0.33 EV', 0X0000: '0 EV', 0X000C: '0.33 EV', 0X0010: '0.50 EV', 0X0014: '0.67 EV', 0X0020: '1 EV', 0X002C: '1.33 EV', 0X0030: '1.50 EV', 0X0034: '1.67 EV', 0X0040: '2 EV'}), 19: ('SubjectDistance', ) } # extract multibyte integer in Motorola format (little endian) def s2n_motorola(str): x=0 for c in str: x=(x << 8) | ord(c) return x # extract multibyte integer in Intel format (big endian) def s2n_intel(str): x=0 y=0L for c in str: x=x | (ord(c) << y) y=y+8 return x # ratio object that eventually will be able to reduce itself to lowest # common denominator for printing def gcd(a, b): if b == 0: return a else: return gcd(b, a % b) class Ratio: def __init__(self, num, den): self.num=num self.den=den def __repr__(self): self.reduce() if self.den == 1: return str(self.num) return '%d/%d' % (self.num, self.den) def reduce(self): div=gcd(self.num, self.den) if div > 1: self.num=self.num/div self.den=self.den/div # for ease of dealing with tags class IFD_Tag: def __init__(self, printable, tag, field_type, values, field_offset, field_length): # printable version of data self.printable=printable # tag ID number self.tag=tag # field type as index into FIELD_TYPES self.field_type=field_type # offset of start of field in bytes from beginning of IFD self.field_offset=field_offset # length of data field in bytes self.field_length=field_length # either a string or array of data items self.values=values def __str__(self): return self.printable def __repr__(self): return '(0x%04X) %s=%s @ %d' % (self.tag, FIELD_TYPES[self.field_type][2], self.printable, self.field_offset) # class that handles an EXIF header class EXIF_header: def __init__(self, file, endian, offset, fake_exif, debug=0): self.file=file self.endian=endian self.offset=offset self.fake_exif=fake_exif self.debug=debug self.tags={} # convert slice to integer, based on sign and endian flags # usually this offset is assumed to be relative to the beginning of the # start of the EXIF information. For some cameras that use relative tags, # this offset may be relative to some other starting point. def s2n(self, offset, length, signed=0): self.file.seek(self.offset+offset) slice=self.file.read(length) if self.endian == 'I': val=s2n_intel(slice) else: val=s2n_motorola(slice) # Sign extension ? if signed: msb=1L << (8*length-1) if val & msb: val=val-(msb << 1) return val # convert offset to string def n2s(self, offset, length): s='' for i in range(length): if self.endian == 'I': s=s+chr(offset & 0xFF) else: s=chr(offset & 0xFF)+s offset=offset >> 8 return s # return first IFD def first_IFD(self): return self.s2n(4, 4) # return pointer to next IFD def next_IFD(self, ifd): entries=self.s2n(ifd, 2) return self.s2n(ifd+2+12*entries, 4) # return list of IFDs in header def list_IFDs(self): i=self.first_IFD() a=[] while i: a.append(i) i=self.next_IFD(i) return a # return list of entries in this IFD def dump_IFD(self, ifd, ifd_name, dict=EXIF_TAGS, relative=0): entries=self.s2n(ifd, 2) for i in range(entries): # entry is index of start of this IFD in the file entry=ifd+2+12*i tag=self.s2n(entry, 2) # get tag name. We do it early to make debugging easier tag_entry=dict.get(tag) if tag_entry: tag_name=tag_entry[0] else: tag_name='Tag 0x%04X' % tag field_type=self.s2n(entry+2, 2) if not 0 < field_type < len(FIELD_TYPES): # unknown field type raise ValueError, \ 'unknown type %d in tag 0x%04X' % (field_type, tag) typelen=FIELD_TYPES[field_type][0] count=self.s2n(entry+4, 4) offset=entry+8 if count*typelen > 4: # offset is not the value; it's a pointer to the value # if relative we set things up so s2n will seek to the right # place when it adds self.offset. Note that this 'relative' # is for the Nikon type 3 makernote. Other cameras may use # other relative offsets, which would have to be computed here # slightly differently. if relative: tmp_offset=self.s2n(offset, 4) offset=tmp_offset+ifd-self.offset+4 if self.fake_exif: offset=offset+18 else: offset=self.s2n(offset, 4) field_offset=offset if field_type == 2: # special case: null-terminated ASCII string if count != 0: self.file.seek(self.offset+offset) values=self.file.read(count) values=values.strip().replace('\x00','') else: values='' else: values=[] signed=(field_type in [6, 8, 9, 10]) for j in range(count): if field_type in (5, 10): # a ratio value_j=Ratio(self.s2n(offset, 4, signed), self.s2n(offset+4, 4, signed)) else: value_j=self.s2n(offset, typelen, signed) values.append(value_j) offset=offset+typelen # now "values" is either a string or an array if count == 1 and field_type != 2: printable=str(values[0]) else: printable=str(values) # compute printable version of values if tag_entry: if len(tag_entry) != 1: # optional 2nd tag element is present if callable(tag_entry[1]): # call mapping function printable=tag_entry[1](values) else: printable='' for i in values: # use lookup table for this tag printable+=tag_entry[1].get(i, repr(i)) self.tags[ifd_name+' '+tag_name]=IFD_Tag(printable, tag, field_type, values, field_offset, count*typelen) if self.debug: print ' debug: %s: %s' % (tag_name, repr(self.tags[ifd_name+' '+tag_name])) # extract uncompressed TIFF thumbnail (like pulling teeth) # we take advantage of the pre-existing layout in the thumbnail IFD as # much as possible def extract_TIFF_thumbnail(self, thumb_ifd): entries=self.s2n(thumb_ifd, 2) # this is header plus offset to IFD ... if self.endian == 'M': tiff='MM\x00*\x00\x00\x00\x08' else: tiff='II*\x00\x08\x00\x00\x00' # ... plus thumbnail IFD data plus a null "next IFD" pointer self.file.seek(self.offset+thumb_ifd) tiff+=self.file.read(entries*12+2)+'\x00\x00\x00\x00' # fix up large value offset pointers into data area for i in range(entries): entry=thumb_ifd+2+12*i tag=self.s2n(entry, 2) field_type=self.s2n(entry+2, 2) typelen=FIELD_TYPES[field_type][0] count=self.s2n(entry+4, 4) oldoff=self.s2n(entry+8, 4) # start of the 4-byte pointer area in entry ptr=i*12+18 # remember strip offsets location if tag == 0x0111: strip_off=ptr strip_len=count*typelen # is it in the data area? if count*typelen > 4: # update offset pointer (nasty "strings are immutable" crap) # should be able to say "tiff[ptr:ptr+4]=newoff" newoff=len(tiff) tiff=tiff[:ptr]+self.n2s(newoff, 4)+tiff[ptr+4:] # remember strip offsets location if tag == 0x0111: strip_off=newoff strip_len=4 # get original data and store it self.file.seek(self.offset+oldoff) tiff+=self.file.read(count*typelen) # add pixel strips and update strip offset info old_offsets=self.tags['Thumbnail StripOffsets'].values old_counts=self.tags['Thumbnail StripByteCounts'].values for i in range(len(old_offsets)): # update offset pointer (more nasty "strings are immutable" crap) offset=self.n2s(len(tiff), strip_len) tiff=tiff[:strip_off]+offset+tiff[strip_off+strip_len:] strip_off+=strip_len # add pixel strip to end self.file.seek(self.offset+old_offsets[i]) tiff+=self.file.read(old_counts[i]) self.tags['TIFFThumbnail']=tiff # decode all the camera-specific MakerNote formats # Note is the data that comprises this MakerNote. The MakerNote will # likely have pointers in it that point to other parts of the file. We'll # use self.offset as the starting point for most of those pointers, since # they are relative to the beginning of the file. # # If the MakerNote is in a newer format, it may use relative addressing # within the MakerNote. In that case we'll use relative addresses for the # pointers. # # As an aside: it's not just to be annoying that the manufacturers use # relative offsets. It's so that if the makernote has to be moved by the # picture software all of the offsets don't have to be adjusted. Overall, # this is probably the right strategy for makernotes, though the spec is # ambiguous. (The spec does not appear to imagine that makernotes would # follow EXIF format internally. Once they did, it's ambiguous whether # the offsets should be from the header at the start of all the EXIF info, # or from the header at the start of the makernote.) def decode_maker_note(self): note=self.tags['EXIF MakerNote'] make=self.tags['Image Make'].printable model=self.tags['Image Model'].printable # Nikon # The maker note usually starts with the word Nikon, followed by the # type of the makernote (1 or 2, as a short). If the word Nikon is # not at the start of the makernote, it's probably type 2, since some # cameras work that way. if make in ('NIKON', 'NIKON CORPORATION'): if note.values[0:7] == [78, 105, 107, 111, 110, 00, 01]: if self.debug: print "Looks like a type 1 Nikon MakerNote." self.dump_IFD(note.field_offset+8, 'MakerNote', dict=MAKERNOTE_NIKON_OLDER_TAGS) elif note.values[0:7] == [78, 105, 107, 111, 110, 00, 02]: if self.debug: print "Looks like a labeled type 2 Nikon MakerNote" if note.values[12:14] != [0, 42] and note.values[12:14] != [42L, 0L]: raise ValueError, "Missing marker tag '42' in MakerNote." # skip the Makernote label and the TIFF header self.dump_IFD(note.field_offset+10+8, 'MakerNote', dict=MAKERNOTE_NIKON_NEWER_TAGS, relative=1) else: # E99x or D1 if self.debug: print "Looks like an unlabeled type 2 Nikon MakerNote" self.dump_IFD(note.field_offset, 'MakerNote', dict=MAKERNOTE_NIKON_NEWER_TAGS) return # Olympus if make[:7] == 'OLYMPUS': self.dump_IFD(note.field_offset+8, 'MakerNote', dict=MAKERNOTE_OLYMPUS_TAGS) return # Casio if make == 'Casio': self.dump_IFD(note.field_offset, 'MakerNote', dict=MAKERNOTE_CASIO_TAGS) return # Fujifilm if make == 'FUJIFILM': # bug: everything else is "Motorola" endian, but the MakerNote # is "Intel" endian endian=self.endian self.endian='I' # bug: IFD offsets are from beginning of MakerNote, not # beginning of file header offset=self.offset self.offset+=note.field_offset # process note with bogus values (note is actually at offset 12) self.dump_IFD(12, 'MakerNote', dict=MAKERNOTE_FUJIFILM_TAGS) # reset to correct values self.endian=endian self.offset=offset return # Canon if make == 'Canon': self.dump_IFD(note.field_offset, 'MakerNote', dict=MAKERNOTE_CANON_TAGS) for i in (('MakerNote Tag 0x0001', MAKERNOTE_CANON_TAG_0x001), ('MakerNote Tag 0x0004', MAKERNOTE_CANON_TAG_0x004)): self.canon_decode_tag(self.tags[i[0]].values, i[1]) return # decode Canon MakerNote tag based on offset within tag # see http://www.burren.cx/david/canon.html by David Burren def canon_decode_tag(self, value, dict): for i in range(1, len(value)): x=dict.get(i, ('Unknown', )) if self.debug: print i, x name=x[0] if len(x) > 1: val=x[1].get(value[i], 'Unknown') else: val=value[i] # it's not a real IFD Tag but we fake one to make everybody # happy. this will have a "proprietary" type self.tags['MakerNote '+name]=IFD_Tag(str(val), None, 0, None, None, None) # process an image file (expects an open file object) # this is the function that has to deal with all the arbitrary nasty bits # of the EXIF standard def process_file(file, debug=0): # determine whether it's a JPEG or TIFF data=file.read(12) if data[0:4] in ['II*\x00', 'MM\x00*']: # it's a TIFF file file.seek(0) endian=file.read(1) file.read(1) offset=0 elif data[0:2] == '\xFF\xD8': # it's a JPEG file # skip JFIF style header(s) fake_exif=0 while data[2] == '\xFF' and data[6:10] in ('JFIF', 'JFXX', 'OLYM'): length=ord(data[4])*256+ord(data[5]) file.read(length-8) # fake an EXIF beginning of file data='\xFF\x00'+file.read(10) fake_exif=1 if data[2] == '\xFF' and data[6:10] == 'Exif': # detected EXIF header offset=file.tell() endian=file.read(1) else: # no EXIF information return {} else: # file format not recognized return {} # deal with the EXIF info we found if debug: print {'I': 'Intel', 'M': 'Motorola'}[endian], 'format' hdr=EXIF_header(file, endian, offset, fake_exif, debug) ifd_list=hdr.list_IFDs() ctr=0 for i in ifd_list: if ctr == 0: IFD_name='Image' elif ctr == 1: IFD_name='Thumbnail' thumb_ifd=i else: IFD_name='IFD %d' % ctr if debug: print ' IFD %d (%s) at offset %d:' % (ctr, IFD_name, i) hdr.dump_IFD(i, IFD_name) # EXIF IFD exif_off=hdr.tags.get(IFD_name+' ExifOffset') if exif_off: if debug: print ' EXIF SubIFD at offset %d:' % exif_off.values[0] hdr.dump_IFD(exif_off.values[0], 'EXIF') # Interoperability IFD contained in EXIF IFD intr_off=hdr.tags.get('EXIF SubIFD InteroperabilityOffset') if intr_off: if debug: print ' EXIF Interoperability SubSubIFD at offset %d:' \ % intr_off.values[0] hdr.dump_IFD(intr_off.values[0], 'EXIF Interoperability', dict=INTR_TAGS) # GPS IFD gps_off=hdr.tags.get(IFD_name+' GPSInfo') if gps_off: if debug: print ' GPS SubIFD at offset %d:' % gps_off.values[0] hdr.dump_IFD(gps_off.values[0], 'GPS', dict=GPS_TAGS) ctr+=1 # extract uncompressed TIFF thumbnail thumb=hdr.tags.get('Thumbnail Compression') if thumb and thumb.printable == 'Uncompressed TIFF': hdr.extract_TIFF_thumbnail(thumb_ifd) # JPEG thumbnail (thankfully the JPEG data is stored as a unit) thumb_off=hdr.tags.get('Thumbnail JPEGInterchangeFormat') if thumb_off: file.seek(offset+thumb_off.values[0]) size=hdr.tags['Thumbnail JPEGInterchangeFormatLength'].values[0] hdr.tags['JPEGThumbnail']=file.read(size) # deal with MakerNote contained in EXIF IFD if hdr.tags.has_key('EXIF MakerNote'): hdr.decode_maker_note() # Sometimes in a TIFF file, a JPEG thumbnail is hidden in the MakerNote # since it's not allowed in a uncompressed TIFF IFD if not hdr.tags.has_key('JPEGThumbnail'): thumb_off=hdr.tags.get('MakerNote JPEGThumbnail') if thumb_off: file.seek(offset+thumb_off.values[0]) hdr.tags['JPEGThumbnail']=file.read(thumb_off.field_length) return hdr.tags # library test/debug function (dump given files) if __name__ == '__main__': import sys if len(sys.argv) < 2: print 'Usage: %s files...\n' % sys.argv[0] sys.exit(0) for filename in sys.argv[1:]: try: file=open(filename, 'rb') except: print filename, 'unreadable' print continue print filename+':' # data=process_file(file, 1) # with debug info data=process_file(file) if not data: print 'No EXIF information found' continue x=data.keys() x.sort() for i in x: if i in ('JPEGThumbnail', 'TIFFThumbnail'): continue try: print ' %s (%s): %s' % \ (i, FIELD_TYPES[data[i].field_type][2], data[i].printable) except: print 'error', i, '"', data[i], '"' if data.has_key('JPEGThumbnail'): print 'File has JPEG thumbnail' print pyrenamer-0.6.0/src/pyrenamer.py0000755000175000017500000017252611064167605013631 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ try: import pygtk pygtk.require('2.0') except: print "PyGtk 2.0 or later required for this app to run" raise SystemExit try: import gtk import gtk.glade import gobject except: raise SystemExit try: import gconf HAS_GCONF = True except: HAS_GCONF = False import treefilebrowser import pyrenamer_filefuncs as renamerfilefuncs import pyrenamer_globals as pyrenamerglob import pyrenamer_tooltips as tooltips import pyrenamer_prefs import pyrenamer_pattern_editor import pyrenamer_menu_cb import pyrenamer_undo import threading from os import path as ospath import locale import gettext from gettext import gettext as _ gettext.bindtextdomain(pyrenamerglob.name, pyrenamerglob.locale_dir) gettext.textdomain(pyrenamerglob.name) gtk.glade.bindtextdomain(pyrenamerglob.name, pyrenamerglob.locale_dir) gtk.glade.textdomain(pyrenamerglob.name) class pyRenamer: def __init__(self, rootdir=None, startdir=None): global HAS_GCONF self.menu_cb = pyrenamer_menu_cb.PyrenamerMenuCB(self) # Main variables self.count = 0 self.populate_id = [] self.listing = [] self.listing_thread = None self.ignore_errors = False # Patterns saving variables self.patterns = {} self.patterns_default = { "main_ori": "", "main_dest": "", "images_ori": "", "images_dest": "", "music_ori": "", "music_dest": "" } # Window geometry vars self.window_maximized = False self.window_width = 500 self.window_height = 500 self.window_posx = 0 self.window_posy = 0 self.pane_position = 250 # Directories variables self.home = pyrenamerglob.home_dir self.root_dir = '/' self.active_dir = self.home # Options self.options_shown = False self.filedir = 0 # 0: Files; 1: Dirs; 2: Both self.keepext = False self.autopreview = False # Read preferences using Gconf if HAS_GCONF: self.prefs = pyrenamer_prefs.PyrenamerPrefs(self) self.prefs.preferences_read() # Process commanline if rootdir != None: self.root_dir = rootdir if startdir != None: self.active_dir = startdir # Init Glade stuff self.glade_tree = gtk.glade.XML(pyrenamerglob.gladefile, "main_window") # Get some widgets self.main_window = self.glade_tree.get_widget("main_window") self.main_hpaned = self.glade_tree.get_widget("main_hpaned") self.selected_files, selected_files_scrolled = self.create_selected_files_treeview() self.statusbar = self.glade_tree.get_widget("statusbar") self.notebook = self.glade_tree.get_widget("notebook") self.clear_button = self.glade_tree.get_widget("clear_button") self.preview_button = self.glade_tree.get_widget("preview_button") self.rename_button = self.glade_tree.get_widget("rename_button") self.original_pattern = self.glade_tree.get_widget("original_pattern") self.renamed_pattern = self.glade_tree.get_widget("renamed_pattern") self.original_pattern_combo = self.glade_tree.get_widget("original_pattern_combo") self.renamed_pattern_combo = self.glade_tree.get_widget("renamed_pattern_combo") self.subs_spaces = self.glade_tree.get_widget("subs_spaces") self.subs_capitalization = self.glade_tree.get_widget("subs_capitalization") self.subs_spaces_combo = self.glade_tree.get_widget("subs_spaces_combo") self.subs_capitalization_combo = self.glade_tree.get_widget("subs_capitalization_combo") self.subs_replace = self.glade_tree.get_widget("subs_replace") self.subs_replace_orig = self.glade_tree.get_widget("subs_replace_orig") self.subs_replace_new = self.glade_tree.get_widget("subs_replace_new") self.subs_replace_label = self.glade_tree.get_widget("subs_replace_label") self.subs_accents = self.glade_tree.get_widget("subs_accents") self.subs_duplicated = self.glade_tree.get_widget("subs_duplicated") self.insert_radio = self.glade_tree.get_widget("insert_radio") self.insert_entry = self.glade_tree.get_widget("insert_entry") self.insert_pos = self.glade_tree.get_widget("insert_pos") self.insert_end = self.glade_tree.get_widget("insert_end") self.delete_radio = self.glade_tree.get_widget("delete_radio") self.delete_from = self.glade_tree.get_widget("delete_from") self.delete_to = self.glade_tree.get_widget("delete_to") self.manual = self.glade_tree.get_widget("manual") self.menu_clear_preview = self.glade_tree.get_widget("menu_clear_preview") self.menu_rename = self.glade_tree.get_widget("menu_rename") self.menu_show_options = self.glade_tree.get_widget("menu_show_options") self.menu_undo = self.glade_tree.get_widget("menu_undo") self.menu_redo = self.glade_tree.get_widget("menu_redo") self.menu_music = self.glade_tree.get_widget("menu_music") self.images_original_pattern = self.glade_tree.get_widget("images_original_pattern") self.images_renamed_pattern = self.glade_tree.get_widget("images_renamed_pattern") self.images_original_pattern_combo = self.glade_tree.get_widget("images_original_pattern_combo") self.images_renamed_pattern_combo = self.glade_tree.get_widget("images_renamed_pattern_combo") self.music_original_pattern = self.glade_tree.get_widget("music_original_pattern") self.music_renamed_pattern = self.glade_tree.get_widget("music_renamed_pattern") self.music_original_pattern_combo = self.glade_tree.get_widget("music_original_pattern_combo") self.music_renamed_pattern_combo = self.glade_tree.get_widget("music_renamed_pattern_combo") # Options panel self.file_pattern = self.glade_tree.get_widget("file_pattern") self.add_recursive = self.glade_tree.get_widget("add_recursive") self.options_button = self.glade_tree.get_widget("options_button") self.options_vbox = self.glade_tree.get_widget("options_vbox") self.options_label = self.glade_tree.get_widget("options_label") self.options_close_button = self.glade_tree.get_widget("options_close_button") self.filedir_combo = self.glade_tree.get_widget("filedir_combo") self.pattern_hbox = self.glade_tree.get_widget("pattern_hbox") self.add_recursive = self.glade_tree.get_widget("add_recursive") self.extensions_check = self.glade_tree.get_widget("extensions_check") self.autopreview_check = self.glade_tree.get_widget("autopreview_check") self.options_panel_state(self.options_shown) self.menu_show_options.set_active(self.options_shown) self.filedir_combo.set_active(self.filedir) self.extensions_check.set_active(self.keepext) self.autopreview_check.set_active(self.autopreview) self.statusbar_context = self.statusbar.get_context_id("file_renamer") # Get Glade defined signals signals = { "on_main_window_destroy": self.on_main_quit, "on_main_window_window_state_event": self.on_main_window_window_state_event, "on_main_window_configure_event": self.on_main_window_configure_event, "on_main_hpaned_notify": self.on_main_hpaned_notify, "on_file_pattern_changed": self.on_file_pattern_changed, "on_original_pattern_changed": self.on_original_pattern_changed, "on_renamed_pattern_changed": self.on_renamed_pattern_changed, "on_pattern_ori_save_clicked": self.on_pattern_ori_save_clicked, "on_pattern_ori_edit_clicked": self.on_pattern_ori_edit_clicked, "on_pattern_dest_save_clicked": self.on_pattern_dest_save_clicked, "on_pattern_dest_edit_clicked": self.on_pattern_dest_edit_clicked, "on_original_pattern_combo_changed": self.on_original_pattern_combo_changed, "on_renamed_pattern_combo_changed": self.on_renamed_pattern_combo_changed, "on_preview_button_clicked": self.on_preview_button_clicked, "on_clean_button_clicked": self.on_clean_button_clicked, "on_rename_button_clicked": self.on_rename_button_clicked, "on_exit_button_clicked": self.on_main_quit, "on_options_button_clicked": self.on_options_button_clicked, "on_add_recursive_toggled": self.prefs.on_add_recursive_toggled, "on_filedir_combo_changed": self.prefs.on_filedir_combo_changed, "on_extensions_check_toggled": self.prefs.on_extensions_check_toggled, "on_autopreview_check_toggled": self.prefs.on_autopreview_check_toggled, "on_menu_preview_activate": self.on_preview_button_clicked, "on_menu_rename_activate": self.on_rename_button_clicked, "on_menu_load_names_from_file_activate": self.on_menu_load_names_from_file_activate, "on_menu_clear_preview_activate": self.on_clean_button_clicked, "on_menu_undo_activate": self.menu_cb.on_menu_undo_activate, "on_menu_redo_activate": self.menu_cb.on_menu_redo_activate, "on_cut_activate": self.on_cut_activate, "on_copy_activate": self.on_copy_activate, "on_paste_activate": self.on_paste_activate, "on_clear_activate": self.on_clear_activate, "on_select_all_activate": self.on_select_all_activate, "on_select_nothing_activate": self.on_select_nothing_activate, "on_preferences_activate": self.on_preferences_activate, "on_menu_refresh_activate": self.menu_cb.on_menu_refresh_activate, "on_menu_patterns_activate": self.menu_cb.on_menu_patterns_activate, "on_menu_substitutions_activate": self.menu_cb.on_menu_substitutions_activate, "on_menu_insert_activate": self.menu_cb.on_menu_insert_activate, "on_menu_manual_activate": self.menu_cb.on_menu_manual_activate, "on_menu_images_activate": self.menu_cb.on_menu_images_activate, "on_menu_music_activate": self.menu_cb.on_menu_music_activate, "on_menu_show_options_activate": self.menu_cb.on_menu_show_options_activate, "on_subs_spaces_toggled": self.on_subs_spaces_toggled, "on_subs_capitalization_toggled": self.on_subs_capitalization_toggled, "on_subs_spaces_combo_changed": self.on_subs_spaces_combo_changed, "on_subs_capitalization_combo_changed": self.on_subs_capitalization_combo_changed, "on_subs_replace_toggled": self.on_subs_replace_toggled, "on_subs_replace_orig_changed": self.on_subs_replace_orig_changed, "on_subs_replace_new_changed": self.on_subs_replace_new_changed, "on_subs_accents_toggled": self.on_subs_accents_toggled, "on_subs_duplicated_toggled": self.on_subs_duplicated_toggled, "on_insert_radio_toggled": self.on_insert_radio_toggled, "on_insert_entry_changed": self.on_insert_entry_changed, "on_insert_pos_changed": self.on_insert_pos_changed, "on_insert_end_toggled": self.on_insert_end_toggled, "on_delete_radio_toggled": self.on_delete_radio_toggled, "on_delete_from_changed": self.on_delete_from_changed, "on_delete_to_changed": self.on_delete_to_changed, "on_images_original_pattern_changed": self.on_images_original_pattern_changed, "on_images_renamed_pattern_changed": self.on_images_renamed_pattern_changed, "on_images_ori_save_clicked": self.on_images_ori_save_clicked, "on_images_ori_edit_clicked": self.on_images_ori_edit_clicked, "on_images_dest_save_clicked": self.on_images_dest_save_clicked, "on_images_dest_edit_clicked": self.on_images_dest_edit_clicked, "on_images_original_pattern_combo_changed": self.on_images_original_pattern_combo_changed, "on_images_renamed_pattern_combo_changed": self.on_images_renamed_pattern_combo_changed, "on_music_original_pattern_changed": self.on_music_original_pattern_changed, "on_music_renamed_pattern_changed": self.on_music_renamed_pattern_changed, "on_music_ori_save_clicked": self.on_music_ori_save_clicked, "on_music_ori_edit_clicked": self.on_music_ori_edit_clicked, "on_music_dest_save_clicked": self.on_music_dest_save_clicked, "on_music_dest_edit_clicked": self.on_music_dest_edit_clicked, "on_music_original_pattern_combo_changed": self.on_music_original_pattern_combo_changed, "on_music_renamed_pattern_combo_changed": self.on_music_renamed_pattern_combo_changed, "on_menu_quit_activate": self.on_main_quit, "on_menu_about_activate": self.about_info, "on_notebook_switch_page": self.on_notebook_switch_page, "on_manual_key_press_event": self.on_manual_key_press_event, "on_quit_button_clicked": self.on_main_quit } self.glade_tree.signal_autoconnect(signals) # Create ProgressBar and add it to the StatusBar. Add also a Stop icon self.progressbar = gtk.ProgressBar() self.progressbar.set_pulse_step(0.01) self.progressbar.set_size_request(-1,14) self.progressbar_vbox = gtk.VBox() self.progressbar_vbox.pack_start(self.progressbar, 0, 0) self.progressbar_vbox.set_homogeneous(True) self.stop_button = gtk.Button() self.stop_button.set_relief(gtk.RELIEF_NONE) stop_image = gtk.Image() stop_image.set_from_file(pyrenamerglob.pixmaps_dir+'/stop.png') self.stop_button.connect("clicked", self.on_stop_button_clicked) self.stop_button.set_image(stop_image) self.statusbar.pack_start(self.stop_button,0,0) self.statusbar.pack_start(self.progressbar_vbox,0,0) self.statusbar.set_size_request(-1,20) self.statusbar.show_all() self.stop_button.hide() # Init main window self.main_window.set_title(pyrenamerglob.name_long) self.main_window.set_icon_from_file(pyrenamerglob.icon) self.main_window.move(self.window_posx, self.window_posy) self.main_hpaned.set_position(self.pane_position) self.main_window.resize(self.window_width, self.window_height) if self.window_maximized: self.main_window.maximize() # Init TreeFileBrowser self.file_browser = treefilebrowser.TreeFileBrowser(self.root_dir) self.file_browser_view = self.file_browser.get_view() file_browser_scrolled = self.file_browser.get_scrolled() signal = self.file_browser.connect("cursor-changed", self.dir_selected) # Add dirs and files tomain window self.main_hpaned.pack1(file_browser_scrolled, resize=True, shrink=False) self.main_hpaned.pack2(selected_files_scrolled, resize=True, shrink=False) # Add signal for manual entry changed self.manual_signal = self.manual.connect("changed", self.on_manual_changed) # Create model and add dirs self.create_model() # Set cursor on selected dir try: # Check if the dir is hidden if "/." in (self.active_dir or self.root_dir): self.file_browser.set_show_hidden(True) # Check if paths are correct if not self.file_browser.check_active_dir(self.active_dir): self.active_dir = self.home if not self.file_browser.check_active_dir(self.active_dir): self.active_dir = self.root_dir except: self.active_dir = self.home self.file_browser.set_active_dir(self.active_dir) # Init comboboxes self.subs_spaces_combo.set_active(0) self.subs_capitalization_combo.set_active(0) # Init some menu items self.menu_rename.set_sensitive(False) self.menu_clear_preview.set_sensitive(False) # Init delete radio buttons self.delete_from.set_sensitive(False) self.delete_to.set_sensitive(False) # Init pattern comboboxes self.populate_pattern_combos() # Init tooltips tips = tooltips.ToolTips(self.column_preview) tips.add_view(self.selected_files) # Hide music tab if necessary if not pyrenamerglob.have_hachoir and not pyrenamerglob.have_eyed3: self.notebook.get_nth_page(5).hide() self.menu_music.hide() if pyrenamerglob.have_hachoir: print "Using hachoir for music renaming." elif pyrenamerglob.have_eyed3: print "Using eyed3 for music renaming." # Init the undo/redo manager self.undo_manager = pyrenamer_undo.PyrenamerUndo() self.menu_undo.set_sensitive(False) self.menu_redo.set_sensitive(False) #--------------------------------------------------------------------------------------- # Model and View stuff def create_selected_files_treeview(self): """ Create the TreeView and the ScrolledWindow for the selected files """ view = gtk.TreeView() view.set_headers_visible(True) view.set_enable_search(True) view.set_reorderable(False) view.set_rules_hint(True) view.get_selection().set_mode(gtk.SELECTION_MULTIPLE) view.connect("cursor-changed", self.on_selected_files_cursor_changed) # Create scrollbars around the view scrolled = gtk.ScrolledWindow() scrolled.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrolled.set_shadow_type(gtk.SHADOW_ETCHED_IN) scrolled.add(view) scrolled.show() return view, scrolled def create_model(self): """ Create the model to hold the needed data Model = [file, /path/to/file, newfilename, /path/to/newfilename] """ self.file_selected_model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gtk.gdk.Pixbuf) self.selected_files.set_model(self.file_selected_model) renderer0 = gtk.CellRendererPixbuf() column0 = gtk.TreeViewColumn('', renderer0, pixbuf=4) #column0.set_resizable(True) self.selected_files.append_column(column0) renderer1 = gtk.CellRendererText() column1 = gtk.TreeViewColumn(_("Original file name"), renderer1, text=0) #column1.set_resizable(True) self.selected_files.append_column(column1) renderer2 = gtk.CellRendererText() column2 = gtk.TreeViewColumn(_("Renamed file name"), renderer2, text=2) self.column_preview = column2 #column2.set_resizable(True) self.selected_files.append_column(column2) self.selected_files.show() def rename_rows(self, model, path, iter, user_data): """ This function is called by foreach to rename files on every row """ ori = model.get_value(iter, 1) new = model.get_value(iter, 3) if new != None and new != '': result, error = renamerfilefuncs.rename_file(ori, new) if not result: if not self.ignore_errors: self.display_error_dialog(_("Could not rename file %s to %s\n%s") % (ori, new, error)) else: self.undo_manager.add(ori, new) def preview_rename_rows(self, model, path, iter, paths): """ Called when Preview button is clicked. Get new names and paths and add it to the model """ if (paths != None) and (path not in paths) and (paths != []): # Preview only selected rows (if we're not on manual rename) return # Get current values name = model.get_value(iter, 0) path = model.get_value(iter, 1) newname = name newpath = path # Keep extension (not valid on manual rename!) if self.keepext and self.notebook.get_current_page() != 3: ename, epath, ext = renamerfilefuncs.cut_extension(newname, newpath) if ext != '': newname = ename newpath = epath if self.notebook.get_current_page() == 0: # Replace using patterns pattern_ini = self.original_pattern.get_text() pattern_end = self.renamed_pattern.get_text() newname, newpath = renamerfilefuncs.rename_using_patterns(newname, newpath, pattern_ini, pattern_end, self.count) elif self.notebook.get_current_page() == 1: # Replace spaces if self.subs_spaces.get_active() and newname != None: newname, newpath = renamerfilefuncs.replace_spaces(newname, newpath, self.subs_spaces_combo.get_active()) # Replace orig with new if self.subs_replace.get_active() and newname != None: orig = self.subs_replace_orig.get_text() new = self.subs_replace_new.get_text() newname, newpath = renamerfilefuncs.replace_with(newname, newpath, orig, new) # Replace capitalization if self.subs_capitalization.get_active() and newname != None: newname, newpath = renamerfilefuncs.replace_capitalization(newname, newpath, self.subs_capitalization_combo.get_active()) # Replace accents if self.subs_accents.get_active() and newname != None: newname, newpath = renamerfilefuncs.replace_accents(newname, newpath) # Fix duplicated symbols if self.subs_duplicated.get_active() and newname != None: newname, newpath = renamerfilefuncs.replace_duplicated(newname, newpath) elif self.notebook.get_current_page() == 2: # Insert / delete if self.insert_radio.get_active(): text = self.insert_entry.get_text() if text != "": if self.insert_end.get_active(): pos = None else: pos = int(self.insert_pos.get_value())-1 newname, newpath = renamerfilefuncs.insert_at(newname, newpath, text, pos) elif self.delete_radio.get_active(): ini = int(self.delete_from.get_value())-1 to = int(self.delete_to.get_value())-1 newname, newpath = renamerfilefuncs.delete_from(newname, newpath, ini, to) elif self.notebook.get_current_page() == 3: # Manual rename self.selected_files.get_selection().set_mode(gtk.SELECTION_SINGLE) nmodel, niter = self.selected_files.get_selection().get_selected() if niter != None: if nmodel.get_value(niter,0) == name: newname = self.manual.get_text() newpath = renamerfilefuncs.get_new_path(newname, path) else: newname = model.get_value(iter, 2) newpath = model.get_value(iter, 3) self.selected_files.get_selection().set_mode(gtk.SELECTION_MULTIPLE) elif self.notebook.get_current_page() == 4: # Replace images using patterns pattern_ini = self.images_original_pattern.get_text() pattern_end = self.images_renamed_pattern.get_text() newname, newpath = renamerfilefuncs.rename_using_patterns(newname, newpath, pattern_ini, pattern_end, self.count) newname, newpath = renamerfilefuncs.replace_images(name, path, newname, newpath) elif self.notebook.get_current_page() == 5 and (pyrenamerglob.have_hachoir or pyrenamerglob.have_eyed3): # Replace music using patterns pattern_ini = self.music_original_pattern.get_text() pattern_end = self.music_renamed_pattern.get_text() newname, newpath = renamerfilefuncs.rename_using_patterns(newname, newpath, pattern_ini, pattern_end, self.count) if pyrenamerglob.have_hachoir: newname, newpath = renamerfilefuncs.replace_music_hachoir(name, path, newname, newpath) elif pyrenamerglob.have_eyed3: newname, newpath = renamerfilefuncs.replace_music_eyed3(name, path, newname, newpath) # Add the kept extension if self.keepext and self.notebook.get_current_page() != 3 and (newname and newpath) != '': if ext != '': newname, newpath = renamerfilefuncs.add_extension(newname, newpath, ext) # Set new values on model if newname != '' and newname != None: model.set_value(iter, 2, newname) model.set_value(iter, 3, newpath) else: model.set_value(iter, 2, None) model.set_value(iter, 3, None) self.count += 1 def preview_selected_row(self): """ Preview just selected row """ # Get values of current row model, iter = self.selected_files.get_selection().get_selected() name = model.get_value(iter, 0) path = model.get_value(iter, 1) if iter != None: newname = self.manual.get_text() if newname != name: newpath = renamerfilefuncs.get_new_path(newname, path) else: newname = None newpath = None # Set new values on model if newname != '' and newname != None: model.set_value(iter, 2, newname) model.set_value(iter, 3, newpath) else: model.set_value(iter, 2, None) model.set_value(iter, 3, None) self.count += 1 def preview_clear(self, model, path, iter, paths): """ Clean a row """ if (paths != None) and (path not in paths) and (paths != []): return model.set_value(iter, 2, None) model.set_value(iter, 3, None) def enable_rename_and_clean(self, model, path, iter): """ Check if the rename button and menu should be enabled """ val = model.get_value(iter, 2) != None if path[0] > 0: prev = self.rename_button.get_property("sensitive") else: prev = False self.rename_button.set_sensitive(val or prev) self.menu_rename.set_sensitive(val or prev) self.clear_button.set_sensitive(val or prev) self.menu_clear_preview.set_sensitive(val or prev) return False #--------------------------------------------------------------------------------------- # Callbacks def on_selected_files_cursor_changed(self, treeview): """ Clicked a file """ if self.notebook.get_current_page() == 3: # Manual rename try: self.selected_files.get_selection().set_mode(gtk.SELECTION_SINGLE) model, iter = treeview.get_selection().get_selected() name = model.get_value(iter,0) newname = model.get_value(iter,2) if newname != None: self.manual.set_text(newname) else: self.manual.set_text(name) except: pass def on_stop_button_clicked(self, widget): """ The stop button on Statusbar. Stop adding items to the selected files list and show information on statusbar """ self.populate_stop() def on_main_window_window_state_event(self, window, event): """ Thrown when window is maximized or demaximized """ if event.changed_mask & gtk.gdk.WINDOW_STATE_MAXIMIZED: if event.new_window_state & gtk.gdk.WINDOW_STATE_MAXIMIZED: self.window_maximized = True self.statusbar.set_has_resize_grip(False) else: self.window_maximized = False self.statusbar.set_has_resize_grip(True) def on_main_window_configure_event(self, window, event): """ Saving window size to avoid losing data when it gets destroyed """ self.window_width, self.window_height = self.main_window.get_size() self.window_posx, self.window_posy = self.main_window.get_position() def on_rename_button_clicked(self, widget): """ For everyrow rename the files as requested """ self.undo_manager.clean() self.menu_undo.set_sensitive(True) self.menu_redo.set_sensitive(False) self.file_selected_model.foreach(self.rename_rows, None) self.dir_reload_current() self.clear_button.set_sensitive(False) self.menu_clear_preview.set_sensitive(False) self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) self.ignore_errors = False def on_preview_button_clicked(self, widget): """ Set the item count to zero and get new names and paths for files on model """ self.count = 0 # Get selected rows and execute rename function model, paths = self.selected_files.get_selection().get_selected_rows() self.file_selected_model.foreach(self.preview_rename_rows, paths) self.selected_files.columns_autosize() self.clear_button.set_sensitive(True) self.menu_clear_preview.set_sensitive(True) self.rename_button.set_sensitive(True) self.menu_rename.set_sensitive(True) self.file_selected_model.foreach(self.enable_rename_and_clean) def on_clean_button_clicked(self, widget): """ Clean the previewed filenames """ self.count = 0 # Clean selected rows model, paths = self.selected_files.get_selection().get_selected_rows() self.file_selected_model.foreach(self.preview_clear, paths) self.file_selected_model.foreach(self.enable_rename_and_clean) self.selected_files.columns_autosize() if self.notebook.get_current_page() == 3: # Manual rename try: self.selected_files.get_selection().set_mode(gtk.SELECTION_SINGLE) model, iter = self.selected_files.get_selection().get_selected() name = model.get_value(iter,0) newname = model.get_value(iter,2) if newname != None: self.manual.set_text(newname) else: self.manual.set_text(name) except: pass def on_main_hpaned_notify(self, pane, gparamspec): if gparamspec.name == 'position': self.pane_position = pane.get_property('position') def on_options_button_clicked(self, widget): self.options_panel_state(not self.options_shown) def options_panel_state(self, state): if state: self.options_vbox.show() self.options_label.show() icon = self.options_button.get_child() icon.set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU) else: self.options_vbox.hide() self.options_label.hide() icon = self.options_button.get_child() icon.set_from_stock(gtk.STOCK_PREFERENCES, gtk.ICON_SIZE_MENU) self.options_shown = state self.menu_show_options.set_active(state) def on_file_pattern_changed(self, widget): """ Reload the current dir 'cause we need it """ self.dir_reload_current() def on_original_pattern_changed(self, widget): """ Reload current dir and disable Rename button """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_renamed_pattern_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_spaces_toggled(self, widget): """ Enable/Disable spaces combo """ self.subs_spaces_combo.set_sensitive(widget.get_active()) self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_capitalization_toggled(self, widget): """ Enable/Disable caps combo """ self.subs_capitalization_combo.set_sensitive(widget.get_active()) self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_replace_toggled(self, widget): """ Enable/Disable replace with text entries """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) self.subs_replace_new.set_sensitive(widget.get_active()) self.subs_replace_orig.set_sensitive(widget.get_active()) self.subs_replace_label.set_sensitive(widget.get_active()) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_spaces_combo_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_capitalization_combo_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_replace_orig_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_replace_new_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_accents_toggled(self, widget): """ Enable/Disable accents """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_subs_duplicated_toggled(self, widget): """ Fixes duplicated symbols """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_insert_radio_toggled(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) self.insert_entry.set_sensitive(True) self.insert_pos.set_sensitive(True) self.insert_end.set_sensitive(True) self.delete_from.set_sensitive(False) self.delete_to.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_insert_entry_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_insert_pos_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_insert_end_toggled(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) self.insert_pos.set_sensitive(not self.insert_end.get_active()) if self.autopreview: self.on_preview_button_clicked(None) def on_delete_radio_toggled(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) self.delete_from.set_sensitive(True) self.delete_to.set_sensitive(True) self.insert_entry.set_sensitive(False) self.insert_pos.set_sensitive(False) self.insert_end.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_delete_from_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.delete_from.get_value() > self.delete_to.get_value(): self.delete_from.set_value(self.delete_to.get_value()) if self.autopreview: self.on_preview_button_clicked(None) def on_delete_to_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.delete_to.get_value() < self.delete_from.get_value(): self.delete_to.set_value(self.delete_from.get_value()) if self.autopreview: self.on_preview_button_clicked(None) def on_manual_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_images_original_pattern_changed(self, widget): """ Reload current dir and disable Rename button """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_images_renamed_pattern_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_music_original_pattern_changed(self, widget): """ Reload current dir and disable Rename button """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def on_music_renamed_pattern_changed(self, widget): """ Disable Rename button (user has to click on Preview again) """ self.rename_button.set_sensitive(False) self.menu_rename.set_sensitive(False) if self.autopreview: self.on_preview_button_clicked(None) def populate_pattern_combos(self): """ Populate pattern combo boxes """ # Clear 'em all first self.patterns = {} self.original_pattern_combo.get_model().clear() self.renamed_pattern_combo.get_model().clear() self.images_original_pattern_combo.get_model().clear() self.images_renamed_pattern_combo.get_model().clear() self.music_original_pattern_combo.get_model().clear() self.music_renamed_pattern_combo.get_model().clear() pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) main_ori = pe.get_patterns('main_ori') main_dest = pe.get_patterns('main_dest') images_ori = pe.get_patterns('images_ori') images_dest = pe.get_patterns('images_dest') music_ori = pe.get_patterns('music_ori') music_dest = pe.get_patterns('music_dest') def set_combo_element(combo, newtext): pos = 0 try: model = combo.get_model() iter = model.get_iter_first() elem = model.get_value(iter, 0) while elem != newtext: iter = model.iter_next(iter) elem = model.get_value(iter, 0) pos += 1 except: pos = -1 text = combo.get_active_text() if pos >= 0: combo.set_active(pos) elif text == '': combo.set_active(0) else: combo.child.set_text(text) # Main original for p in main_ori: self.original_pattern_combo.append_text(p) set_combo_element(self.original_pattern_combo, self.patterns_default["main_ori"]) self.patterns["main_ori"] = main_ori # Main renamed for p in main_dest: self.renamed_pattern_combo.append_text(p) set_combo_element(self.renamed_pattern_combo, self.patterns_default["main_dest"]) self.patterns["main_dest"] = main_dest # Images original for p in images_ori: self.images_original_pattern_combo.append_text(p) set_combo_element(self.images_original_pattern_combo, self.patterns_default["images_ori"]) self.patterns["images_ori"] = images_ori # Images renamed for p in images_dest: self.images_renamed_pattern_combo.append_text(p) set_combo_element(self.images_renamed_pattern_combo, self.patterns_default["images_dest"]) self.patterns["images_dest"] = images_dest # Music original for p in music_ori: self.music_original_pattern_combo.append_text(p) set_combo_element(self.music_original_pattern_combo, self.patterns_default["music_ori"]) self.patterns["music_ori"] = music_ori # Music renamed for p in music_dest: self.music_renamed_pattern_combo.append_text(p) set_combo_element(self.music_renamed_pattern_combo, self.patterns_default["music_dest"]) self.patterns["music_dest"] = music_dest def on_pattern_ori_save_clicked(self, widget): # Get the pattern value text = self.original_pattern.get_text() # Add it to the local file pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.add_pattern('main_ori', text) # Add it to the variable patterns = self.patterns["main_ori"] patterns.append(text) self.patterns["main_ori"] = patterns # And show it on combobox self.original_pattern_combo.append_text(text) def on_pattern_ori_edit_clicked(self, widget): pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.create_window('main_ori') def on_pattern_dest_save_clicked(self, widget): # Get the pattern value text = self.renamed_pattern.get_text() # Add it to the local file pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.add_pattern('main_dest', text) # Add it to the variable patterns = self.patterns["main_dest"] patterns.append(text) self.patterns["main_dest"] = patterns # And show it on combobox self.renamed_pattern_combo.append_text(text) def on_pattern_dest_edit_clicked(self, widget): pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.create_window('main_dest') def on_images_ori_save_clicked(self, widget): # Get the pattern value text = self.images_original_pattern.get_text() # Add it to the local file pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.add_pattern('images_ori', text) # Add it to the variable patterns = self.patterns["images_ori"] patterns.append(text) self.patterns["images_ori"] = patterns # And show it on combobox self.images_original_pattern_combo.append_text(text) def on_images_ori_edit_clicked(self, widget): pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.create_window('images_ori') def on_images_dest_save_clicked(self, widget): # Get the pattern value text = self.images_renamed_pattern.get_text() # Add it to the local file pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.add_pattern('images_dest', text) # Add it to the variable patterns = self.patterns["images_dest"] patterns.append(text) self.patterns["images_dest"] = patterns # And show it on combobox self.images_renamed_pattern_combo.append_text(text) def on_images_dest_edit_clicked(self, widget): pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.create_window('images_dest') def on_music_ori_save_clicked(self, widget): # Get the pattern value text = self.music_original_pattern.get_text() # Add it to the local file pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.add_pattern('music_ori', text) # Add it to the variable patterns = self.patterns["music_ori"] patterns.append(text) self.patterns["music_ori"] = patterns # And show it on combobox self.music_original_pattern_combo.append_text(text) def on_music_ori_edit_clicked(self, widget): pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.create_window('music_ori') def on_music_dest_save_clicked(self, widget): # Get the pattern value text = self.music_renamed_pattern.get_text() # Add it to the local file pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.add_pattern('music_dest', text) # Add it to the variable patterns = self.patterns["music_dest"] patterns.append(text) self.patterns["music_dest"] = patterns # And show it on combobox self.music_renamed_pattern_combo.append_text(text) def on_music_dest_edit_clicked(self, widget): pe = pyrenamer_pattern_editor.PyrenamerPatternEditor(self) pe.create_window('music_dest') def on_original_pattern_combo_changed (self, widget): text = widget.get_active_text() self.patterns_default["main_ori"] = text def on_renamed_pattern_combo_changed (self, widget): text = widget.get_active_text() self.patterns_default["main_dest"] = text def on_images_original_pattern_combo_changed (self, widget): text = widget.get_active_text() self.patterns_default["images_ori"] = text def on_images_renamed_pattern_combo_changed (self, widget): text = widget.get_active_text() self.patterns_default["images_dest"] = text def on_music_original_pattern_combo_changed (self, widget): text = widget.get_active_text() self.patterns_default["music_ori"] = text def on_music_renamed_pattern_combo_changed (self, widget): text = widget.get_active_text() self.patterns_default["music_dest"] = text def on_notebook_switch_page(self, notebook, page, page_num): """ Tab changed """ if page_num != 3: self.selected_files.get_selection().set_mode(gtk.SELECTION_MULTIPLE) else: # Manual rename try: self.selected_files.get_selection().set_mode(gtk.SELECTION_SINGLE) model, iter = self.selected_files.get_selection().get_selected() name = model.get_value(iter,0) newname = model.get_value(iter,2) if newname != None: self.manual.set_text(newname) else: self.manual.set_text(name) except: pass def on_copy_activate(self, widget): """ Copy to clipboard """ w = self.main_window.get_focus() if isinstance(w, gtk.Entry): w.emit('copy-clipboard') def on_paste_activate(self, widget): """ Paste from clipboard """ w = self.main_window.get_focus() if isinstance(w, gtk.Entry): w.emit('paste-clipboard') def on_cut_activate(self, widget): """ Cut to clipboard """ w = self.main_window.get_focus() if isinstance(w, gtk.Entry): w.emit('cut-clipboard') def on_clear_activate(self, widget): """ Clear text widget """ w = self.main_window.get_focus() if isinstance(w, gtk.Entry): w.set_text('') def on_select_all_activate(self, widget): """ Select every row on selected-files treeview """ if self.notebook.get_current_page() == 3: self.selected_files.get_selection().set_mode(gtk.SELECTION_MULTIPLE) self.selected_files.get_selection().select_all() def on_select_nothing_activate(self, widget): """ Select nothing on selected-files treeview """ if self.notebook.get_current_page() == 3: self.selected_files.get_selection().set_mode(gtk.SELECTION_MULTIPLE) self.selected_files.get_selection().unselect_all() def on_preferences_activate(self, widget): """ Preferences menu item clicked """ self.prefs.create_preferences_dialog() def on_manual_key_press_event(self, widget, event): """ Key pressed on manual rename entry """ if self.notebook.get_current_page() == 3: self.selected_files.get_selection().set_mode(gtk.SELECTION_SINGLE) if event.keyval == gtk.keysyms.Page_Up: try: self.preview_selected_row() self.file_selected_model.foreach(self.enable_rename_and_clean) model, iter = self.selected_files.get_selection().get_selected() path = model.get_path(iter) path = path[0]-1 if path < 0: return iter = model.get_iter(path) name = model.get_value(iter,0) self.selected_files.get_selection().select_iter(iter) self.manual.handler_block(self.manual_signal) self.selected_files.scroll_to_cell(path) self.on_selected_files_cursor_changed(self.selected_files) self.manual.handler_unblock(self.manual_signal) except: pass elif event.keyval == gtk.keysyms.Page_Down: try: self.preview_selected_row() self.file_selected_model.foreach(self.enable_rename_and_clean) model, iter = self.selected_files.get_selection().get_selected() iter = model.iter_next(iter) if iter == None: return path = model.get_path(iter) name = model.get_value(iter,0) self.selected_files.get_selection().select_iter(iter) self.manual.handler_block(self.manual_signal) self.selected_files.scroll_to_cell(path) self.on_selected_files_cursor_changed(self.selected_files) self.manual.handler_unblock(self.manual_signal) except: pass elif event.keyval == gtk.keysyms.Return: try: self.preview_selected_row() self.file_selected_model.foreach(self.enable_rename_and_clean) model, iter = self.selected_files.get_selection().get_selected() iter = model.iter_next(iter) if iter == None: return path = model.get_path(iter) name = model.get_value(iter,0) self.selected_files.get_selection().select_iter(iter) self.manual.handler_block(self.manual_signal) self.selected_files.scroll_to_cell(path) self.on_selected_files_cursor_changed(self.selected_files) self.manual.handler_unblock(self.manual_signal) except: pass self.selected_files.get_selection().set_mode(gtk.SELECTION_MULTIPLE) def on_menu_load_names_from_file_activate(self, widget): """ Get file names from a file """ filename = "" f = gtk.FileChooserDialog(_('Select file'), self.main_window, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT), ) response = f.run() if response == gtk.RESPONSE_ACCEPT: filename = f.get_filename() elif response == gtk.RESPONSE_REJECT: pass f.destroy() if filename != "": self.populate_from_file(filename) def on_main_quit(self, *args): """ Bye bye! But first, save preferences """ self.populate_stop() if HAS_GCONF: self.prefs.preferences_save() gtk.main_quit() #--------------------------------------------------------------------------------------- # Directory functions def dir_reload_current(self): """ An easy way to call dir_selected """ self.dir_selected(None, self.active_dir) def dir_selected(self, obj, dir): """ The user has clicked on a directory on the left pane, so we need to load the files inside that dir on the right pane. """ self.active_dir = dir self.populate_stop() self.stop_button.show() self.clear_button.set_sensitive(False) self.rename_button.set_sensitive(False) self.file_selected_model.clear() while gtk.events_pending(): gtk.main_iteration() self.file_selected_model.clear() self.populate_selected_files(dir) self.selected_files.columns_autosize() self.statusbar.push(self.statusbar_context, _("Reading contents of dir %s") % dir) def populate_stop(self): """ Stop populating the TreeView """ renamerfilefuncs.set_stop(True) if self.listing_thread != None: while self.listing_thread.isAlive(): self.listing_thread.join() self.stop_button.hide() for i in self.populate_id: removed = gobject.source_remove(i) self.populate_id.remove(i) self.selected_files.set_model(self.file_selected_model) self.progressbar.set_fraction(0) self.statusbar.push(self.statusbar_context, _("Directory: %s - Files: %s") % (self.active_dir, self.count)) def populate_get_listing(self, dir, pattern, recursive): """ Get the file listing using the utilities on renamerfilefuncs """ # Add files from the current directory (and subdirs if needed) if recursive: self.listing = renamerfilefuncs.get_file_listing_recursive(dir, self.filedir, pattern) else: self.listing = renamerfilefuncs.get_file_listing(dir, self.filedir, pattern) gobject.idle_add(self.populate_get_listing_end) def populate_get_listing_end(self): """ The listing thread stuff is over, so now add things to the view """ if renamerfilefuncs.get_stop(): self.populate_stop() else: populate = self.populate_add_to_view(self.listing) self.populate_id.append(gobject.idle_add(populate.next)) def populate_selected_files(self, dir): """ Get the file listing using the utilities on renamerfilefuncs. Then add it to the model while updating the gui """ pattern = self.file_pattern.get_text() recursive = self.add_recursive.get_active() renamerfilefuncs.set_stop(False) self.listing_thread = threading.Thread(target=lambda:self.populate_get_listing(dir, pattern, recursive)) self.listing_thread.start() return def populate_add_to_view(self, listing): """ Add files to the treeview """ # Add items to treeview for elem in listing: iter = self.file_selected_model.insert_before(None, None) self.selected_files.set_model(None) self.file_selected_model.set_value(iter, 0, elem[0]) self.file_selected_model.set_value(iter, 1, elem[1]) self.file_selected_model.set_value(iter, 4, self.get_icon(elem[1])) self.progressbar.pulse() self.statusbar.push(self.statusbar_context, _("Adding file %s") % elem[1]) self.count += 1 yield True self.selected_files.set_model(self.file_selected_model) self.progressbar.set_fraction(0) self.statusbar.push(self.statusbar_context, _("Directory: %s - Files: %s") % (self.active_dir, self.count)) self.stop_button.hide() self.count = 0 yield False def populate_from_file(self, filename): """ Populate file preview loading the names from a file """ f = open(filename, 'r') iter = self.file_selected_model.get_iter_root() for line in f: line = line.rstrip() if len(line) > 255 or not isinstance(line, str) or line == "": line = None path = None if line != "" and line != None: oripath = self.file_selected_model.get_value(iter, 1) path = ospath.join(ospath.dirname(oripath), line) self.selected_files.set_model(None) self.file_selected_model.set_value(iter, 2, line) self.file_selected_model.set_value(iter, 3, path) self.count += 1 iter = self.file_selected_model.iter_next(iter) if iter == None: break self.selected_files.set_model(self.file_selected_model) self.selected_files.columns_autosize() self.clear_button.set_sensitive(True) self.menu_clear_preview.set_sensitive(True) self.rename_button.set_sensitive(True) self.menu_rename.set_sensitive(True) f.close() def get_icon(self, path): icon_theme = gtk.icon_theme_get_default() if ospath.isdir(path): try: icon = icon_theme.load_icon("gnome-fs-directory", 16, 0) return icon except gobject.GError, exc: try: icon = icon_theme.load_icon("gtk-directory", 16, 0) return icon except: return None else: mime = "text-x-generic" audio = ["mp3", "ogg", "wav", "aiff"] image = ["jpg", "gif", "png", "tiff", "tif", "jpeg"] video = ["avi", "ogm", "mpg", "mpeg", "mov"] package = ["rar", "zip", "gz", "tar", "bz2", "tgz", "deb", "rpm"] file = path.split('/')[-1] ext = (file.split('.')[-1]).lower() if ext in audio: mime = "audio-x-generic" elif ext in image: mime = "image-x-generic" elif ext in video: mime = "video-x-generic" elif ext in package: mime = "package-x-generic" try: icon = icon_theme.load_icon(mime, gtk.ICON_SIZE_MENU, 0) return icon except gobject.GError, exc: return None #--------------------------------------------------------------------------------------- # Dialog methods def display_error_dialog(self, text): """ Yeps, it shows a error dialog """ dialog = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_NONE, text) dialog.add_button(_("Ignore errors"), 1) dialog.add_button("gtk-ok", 0) self.ignore_errors = dialog.run() dialog.destroy() def about_info(self,event,data=None): """ Display the About dialog """ about = gtk.AboutDialog() about.set_name(pyrenamerglob.name_long) about.set_version(pyrenamerglob.version) about.set_authors(pyrenamerglob.authors) #about.set_artists(pyrenamerglob.artists) about.set_translator_credits(_('translator-credits')) about.set_logo(gtk.gdk.pixbuf_new_from_file(pyrenamerglob.icon)) about.set_license(pyrenamerglob.license) about.set_wrap_license(True) about.set_comments(_(pyrenamerglob.description)) about.set_copyright(pyrenamerglob.copyright) def openHomePage(widget,url,url2): import webbrowser webbrowser.open_new(url) gtk.about_dialog_set_url_hook(openHomePage,pyrenamerglob.website) about.set_website(pyrenamerglob.website) about.set_icon_from_file(pyrenamerglob.icon) about.run() about.destroy() pyrenamer-0.6.0/src/pyrenamer_tooltips.py0000644000175000017500000000317111002070350015526 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ import TreeViewTooltips as tvt from gettext import gettext as _ class ToolTips(tvt.TreeViewTooltips): def __init__(self,column): self.column = column tvt.TreeViewTooltips.__init__(self) def get_tooltip(self, view, column, path): model = view.get_model() oldpath = model[path][1] newpath = model[path][3] if newpath != None: return _("Original: %s\nRenamed: %s") % (oldpath, newpath) else: return _("Original: %s") % oldpath """if column is self.column: filepath = model[path][3] return 'New filename: %s' % filepath else: filepath = model[path][1] return 'Original filename: %s' % filepath""" pyrenamer-0.6.0/src/pyrenamer_globals.py.in0000644000175000017500000000606211062445310015713 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-07 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ from gettext import gettext as _ import os.path import user have_hachoir = True have_eyed3 = False # Check for hachoir_metadata try: import hachoir_metadata except ImportError, e: if str(e).find("hachoir_metadata") >= 0: have_hachoir = False print "WARNING: python-hachoir-metadata not found." except: have_hachoir = False print "WARNING: python-hachoir-metadata not found." # Check for eyed3 if not have_hachoir: # Check for eyeD3 have_eyed3 = True try: import eyeD3 except ImportError, e: if str(e).find("eyeD3") >= 0: have_eyed3 = False print "WARNING: python-eyed3 not found." except: have_eyed3 = False print "WARNING: python-eyed3 not found." if not (have_hachoir or have_eyed3): print "WARNING: Music rename disabled!" pixmaps_dir = "@RESOURCEDIR@" resources_dir = "@RESOURCEDIR@" locale_dir = "@LOCALEDIR@" home_dir = user.home config_dir = os.path.join(user.home, '.' + "@PACKAGE@") name = "@PACKAGE@" name_long = "pyRenamer" copyright = 'Copyright © 2006-08 Adolfo González Blázquez' authors = ["Adolfo González Blázquez "] artists = ["Adolfo González Blázquez "] website = "http://www.infinicode.org/code/pyrenamer/" version = "@VERSION@" description = _("Mass file renamer for GNOME") icon = pixmaps_dir + "/pyrenamer.png" gladefile = resources_dir + "/pyrenamer.glade" if os.path.isfile('/usr/share/common-licenses/GPL-2'): license = open('/usr/share/common-licenses/GPL-2').read() else: license = "This program is free software; you can redistribute it and/or modify \ it under the terms of the GNU General Public License as published by \ the Free Software Foundation; either version 2 of the License, or \ (at your option) any later version. \n\n\ 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. \n\n\ 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., \ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." pyrenamer-0.6.0/src/pyrenamer_undo.py0000644000175000017500000000264611061767155014651 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-07 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ import pyrenamer_filefuncs as renamerfilefuncs class PyrenamerUndo: def __init__(self): self.undo_memory = [] def clean(self): self.undo_memory = [] def add(self, original, renamed): self.undo_memory.append([original, renamed]) def undo(self): for i in self.undo_memory: renamerfilefuncs.rename_file(i[1], i[0]) print "Undo: %s -> %s" % (i[1] , i[0]) def redo(self): for i in self.undo_memory: renamerfilefuncs.rename_file(i[0], i[1]) print "Redo: %s -> %s" % (i[0] , i[1])pyrenamer-0.6.0/src/Makefile.am0000644000175000017500000000204611062443700013262 00000000000000################################### ### Main data ################################### all-local: pyrenamer_globals.py bin_SCRIPTS = pyrenamer pyrenamerdir = $(pythondir)/pyrenamer pyrenamer_PYTHON = \ __init__.py \ pyrenamer.py \ pyrenamer_filefuncs.py \ pyrenamer_menu_cb.py \ pyrenamer_metadata.py \ pyrenamer_pattern_editor.py \ pyrenamer_prefs.py \ pyrenamer_tooltips.py \ pyrenamer_undo.py \ treefilebrowser.py \ TreeViewTooltips.py \ EXIF.py nodist_pyrenamer_PYTHON = \ pyrenamer_globals.py EXTRA_DIST = \ $(bin_SCRIPTS) \ $(pyrenamer_PYTHON) \ pyrenamer_globals.py.in CLEANFILES = \ pyrenamer_globals.py ################################### ### Configure pyrenamer_globals.py ################################### pyrenamer_globals.py: pyrenamer_globals.py.in Makefile sed \ -e s!\@LOCALEDIR\@!$(datadir)/locale! \ -e s!\@RESOURCEDIR\@!$(datadir)/$(PACKAGE_NAME)! \ -e s!\@PKGDATADIR\@!$(pkgdatadir)! \ -e s!\@PACKAGE\@!$(PACKAGE_NAME)! \ -e s!\@VERSION\@!$(PACKAGE_VERSION)! \ < $< \ > $@pyrenamer-0.6.0/src/pyrenamer0000755000175000017500000000445410705725324013173 00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (C) 2006-07 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ try: import pygtk pygtk.require('2.0') except: print "PyGtk 2.0 or later required for this app to run" raise SystemExit try: import gtk from pyrenamer import pyrenamer except Exception, e: print "ERROR:", e raise SystemExit import os import sys import getopt def command_usage(): """ Prints application usage from command line """ print "Usage: %s [options] start_dir" % os.path.basename(sys.argv[0]) print "\n%s options:" % os.path.basename(sys.argv[0]) print " -?, --help Displays this dialog" print " -r, --root root_dir Start pyRenamer with a new root dir" sys.exit(0) def command_unknown(cmd): """ Displays error en bad command """ print "Run '%s --help' to see a full list of available command line options." % os.path.basename(sys.argv[0]) def parse_commandline_options(): """ Parses options passed by command line and acts """ try: opts, args = getopt.getopt(sys.argv[1:],"hr:", ["help","root="]) except Exception, e: print e command_unknown(sys.argv[1]) sys.exit(2) for o, a in opts: if o in ("-h", "--help"): command_usage() elif o in ("-r", "--root"): if len(args) > 0: return a, args[0] else: return a, None if len(args) > 0: return None, args[0] else: return None, None def main(): rootdir, startdir = parse_commandline_options() gtk.gdk.threads_init() py = pyrenamer.pyRenamer(rootdir, startdir) gtk.main() if __name__ == "__main__": main() pyrenamer-0.6.0/src/pyrenamer_filefuncs.py0000644000175000017500000005713511064130752015653 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ import os import dircache import glob import re import sys import time import random import pyrenamer_globals import EXIF if pyrenamer_globals.have_hachoir: from pyrenamer_metadata import PyrenamerMetadataMusic if pyrenamer_globals.have_eyed3: import eyeD3 from gettext import gettext as _ STOP = False def set_stop(stop): """ Set stop var to see if ther's no need to keep reading files """ global STOP STOP = stop def get_stop(): return STOP def escape_pattern(pattern): """ Escape special chars on patterns, so glob doesn't get confused """ pattern = pattern.replace('[', '[[]') return pattern def get_file_listing(dir, mode, pattern=None): """ Returns the file listing of a given directory. It returns only files. Returns a list of [file,/path/to/file] """ filelist = [] if pattern == (None or ''): listaux = dircache.listdir(dir) else: if dir != '/': dir += '/' dir = escape_pattern(dir + pattern) listaux = glob.glob(dir) listaux.sort(key=str.lower) for elem in listaux: if STOP: return filelist if mode == 0: # Get files if not os.path.isdir(os.path.join(dir,elem)): filelist.append([os.path.basename(elem),os.path.join(dir,elem)]) elif mode == 1: # Get directories if os.path.isdir(os.path.join(dir,elem)): filelist.append([os.path.basename(elem),os.path.join(dir,elem)]) elif mode == 2: # Get files and directories filelist.append([os.path.basename(elem),os.path.join(dir,elem)]) else: # Get files if not os.path.isdir(os.path.join(dir,elem)): filelist.append([os.path.basename(elem),os.path.join(dir,elem)]) return filelist def get_file_listing_recursive(dir, mode, pattern=None): """ Returns the file listing of a given directory recursively. It returns only files. Returns a list of [file,/path/to/file] """ filelist = [] # Get subdirs for root, dirs, files in os.walk(dir, topdown=False): if STOP: return filelist for directory in dirs: if STOP: return filelist elem = get_file_listing(os.path.join(root, directory), mode, pattern) for i in elem: if STOP: return filelist filelist.append(i) # Get root directory files list = get_file_listing(dir, mode, pattern) for i in list: filelist.append(i) return filelist def get_dir_listing(dir): """ Returns the subdirectory listing of a given directory. It returns only directories. Returns a list of [dir,/path/to/dir] """ dirlist = [] listaux = dircache.listdir(dir) listaux.sort(key=str.lower) for elem in listaux: if STOP: return dirlist if os.path.isdir(os.path.join(dir,elem)): dirlist.append([os.path.basename(elem),os.path.join(dir,elem)]) return dirlist def get_new_path(name, path): """ Remove file from path, so we have only the dir""" dirpath = os.path.split(path)[0] if dirpath != '/': dirpath += '/' return dirpath + name def replace_spaces(name, path, mode): """ if mode == 0: ' ' -> '_' if mode == 1: '_' -> ' ' if mode == 2: '_' -> '.' if mode == 3: '.' -> ' ' if mode == 4: ' ' -> '-' if mode == 5: '-' -> ' ' """ name = unicode(name) path = unicode(path) if mode == 0: newname = name.replace(' ', '_') elif mode == 1: newname = name.replace('_', ' ') elif mode == 2: newname = name.replace(' ', '.') elif mode == 3: newname = name.replace('.', ' ') elif mode == 4: newname = name.replace(' ', '-') elif mode == 5: newname = name.replace('-', ' ') newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def replace_capitalization(name, path, mode): """ 0: all to uppercase 1: all to lowercase 2: first letter uppercase 3: first letter uppercase of each word """ name = unicode(name) path = unicode(path) if mode == 0: newname = name.upper() elif mode == 1: newname = name.lower() elif mode == 2: newname = name.capitalize() elif mode == 3: #newname = name.title() newname = ' '.join([x.capitalize() for x in name.split()]) newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def replace_with(name, path, orig, new): """ Replace all occurences of orig with new """ newname = name.replace(orig, new) newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def replace_accents(name, path): """ Remove accents, umlauts and other locale symbols from words """ name = unicode(name) path = unicode(path) newname = name.replace('á', 'a') newname = newname.replace('à', 'a') newname = newname.replace('ä', 'a') newname = newname.replace('â', 'a') newname = newname.replace('Á', 'A') newname = newname.replace('À', 'A') newname = newname.replace('Ä', 'A') newname = newname.replace('Â', 'A') newname = newname.replace('é', 'e') newname = newname.replace('è', 'e') newname = newname.replace('ë', 'e') newname = newname.replace('ê', 'e') newname = newname.replace('É', 'E') newname = newname.replace('È', 'E') newname = newname.replace('Ë', 'E') newname = newname.replace('Ê', 'E') newname = newname.replace('í', 'i') newname = newname.replace('ì', 'i') newname = newname.replace('ï', 'i') newname = newname.replace('î', 'i') newname = newname.replace('Í', 'I') newname = newname.replace('Ì', 'I') newname = newname.replace('Ï', 'I') newname = newname.replace('Î', 'I') newname = newname.replace('ó', 'o') newname = newname.replace('ò', 'o') newname = newname.replace('ö', 'o') newname = newname.replace('ô', 'o') newname = newname.replace('Ó', 'O') newname = newname.replace('Ò', 'O') newname = newname.replace('Ö', 'O') newname = newname.replace('Ô', 'O') newname = newname.replace('ú', 'u') newname = newname.replace('ù', 'u') newname = newname.replace('ü', 'u') newname = newname.replace('û', 'u') newname = newname.replace('Ú', 'U') newname = newname.replace('Ù', 'U') newname = newname.replace('Ü', 'U') newname = newname.replace('Û', 'U') """ Czech language accents replacement """ newname = newname.replace('ě', 'e') newname = newname.replace('š', 's') newname = newname.replace('č', 'c') newname = newname.replace('ř', 'r') newname = newname.replace('ž', 'z') newname = newname.replace('ý', 'y') newname = newname.replace('ů', 'u') newname = newname.replace('Ě', 'E') newname = newname.replace('Š', 'S') newname = newname.replace('Č', 'C') newname = newname.replace('Ř', 'R') newname = newname.replace('Ž', 'Z') newname = newname.replace('Ý', 'Y') newname = newname.replace('Ů', 'U') newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def replace_duplicated(name, path): """ Remove duplicated symbols """ name = unicode(name) path = unicode(path) symbols = ['.', ' ', '-', '_'] newname = name[0] for c in name[1:]: if c in symbols: if newname[-1] != c: newname += c else: newname += c newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def rename_using_patterns(name, path, pattern_ini, pattern_end, count): """ This method parses te patterns given by the user and stores the new filename on the treestore. Posibble patterns are: {#} Numbers {L} Letters {C} Characters (Numbers & letters, not spaces) {X} Numbers, letters, and spaces {@} Trash """ name = unicode(name) path = unicode(path) pattern = pattern_ini newname = pattern_end pattern = pattern.replace('.','\.') pattern = pattern.replace('[','\[') pattern = pattern.replace(']','\]') pattern = pattern.replace('(','\(') pattern = pattern.replace(')','\)') pattern = pattern.replace('?','\?') pattern = pattern.replace('{#}', '([0-9]*)') pattern = pattern.replace('{L}', '([a-zA-Z]*)') pattern = pattern.replace('{C}', '([\S]*)') pattern = pattern.replace('{X}', '([\S\s]*)') pattern = pattern.replace('{@}', '(.*)') repattern = re.compile(pattern) try: groups = repattern.search(name).groups() for i in range(len(groups)): newname = newname.replace('{'+`i+1`+'}',groups[i]) except: return None, None # Replace {num} with item number. # If {num2} the number will be 02 # If {num3+10} the number will be 010 count = `count` cr = re.compile("{(num)([0-9]*)}" "|{(num)([0-9]*)(\+)([0-9]*)}") try: cg = cr.search(newname).groups() if len(cg) == 6: if cg[0] == 'num': # {num2} if cg[1] != '': count = count.zfill(int(cg[1])) newname = cr.sub(count, newname) elif cg[2] == 'num' and cg[4] == '+': # {num2+5} if cg[5] != '': count = str(int(count)+int(cg[5])) if cg[3] != '': count = count.zfill(int(cg[3])) newname = cr.sub(count, newname) except: pass # Replace {dir} with directory name dir = os.path.dirname(path) dir = os.path.basename(dir) newname = newname.replace('{dir}', dir) # Some date replacements newname = newname.replace('{date}', time.strftime("%d%b%Y", time.localtime())) newname = newname.replace('{year}', time.strftime("%Y", time.localtime())) newname = newname.replace('{month}', time.strftime("%m", time.localtime())) newname = newname.replace('{monthname}', time.strftime("%B", time.localtime())) newname = newname.replace('{monthsimp}', time.strftime("%b", time.localtime())) newname = newname.replace('{day}', time.strftime("%d", time.localtime())) newname = newname.replace('{dayname}', time.strftime("%A", time.localtime())) newname = newname.replace('{daysimp}', time.strftime("%a", time.localtime())) # Replace {rand} with random number between 0 and 100. # If {rand500} the number will be between 0 and 500 # If {rand10-20} the number will be between 10 and 20 # If you add ,5 the number will be padded with 5 digits # ie. {rand20,5} will be a number between 0 and 20 of 5 digits (00012) rnd = '' cr = re.compile("{(rand)([0-9]*)}" "|{(rand)([0-9]*)(\-)([0-9]*)}" "|{(rand)([0-9]*)(\,)([0-9]*)}" "|{(rand)([0-9]*)(\-)([0-9]*)(\,)([0-9]*)}") try: cg = cr.search(newname).groups() if len(cg) == 16: if cg[0] == 'rand': if cg[1] == '': # {rand} rnd = random.randint(0,100) else: # {rand2} rnd = random.randint(0,int(cg[1])) elif cg[2] == 'rand' and cg[4] == '-' and cg[3] != '' and cg[5] != '': # {rand10-100} rnd = random.randint(int(cg[3]),int(cg[5])) elif cg[6] == 'rand' and cg[8] == ',' and cg[9] != '': if cg[7] == '': # {rand,2} rnd = str(random.randint(0,100)).zfill(int(cg[9])) else: # {rand10,2} rnd = str(random.randint(0,int(cg[7]))).zfill(int(cg[9])) elif cg[10] == 'rand' and cg[12] == '-' and cg[14] == ',' and cg[11] != '' and cg[13] != '' and cg[15] != '': # {rand2-10,3} rnd = str(random.randint(int(cg[11]),int(cg[13]))).zfill(int(cg[15])) newname = cr.sub(str(rnd), newname) except: pass # Returns new name and path newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def replace_images(name, path, newname, newpath): """ Pattern replace for images """ name = unicode(name) path = unicode(path) newname = unicode(newname) newpath = unicode(newpath) # Image EXIF replacements date, width, height, cameramaker, cameramodel = get_exif_data(get_new_path(name, path)) if date != None: newname = newname.replace('{imagedate}', time.strftime("%d%b%Y", date)) newname = newname.replace('{imageyear}', time.strftime("%Y", date)) newname = newname.replace('{imagemonth}', time.strftime("%m", date)) newname = newname.replace('{imagemonthname}', time.strftime("%B", date)) newname = newname.replace('{imagemonthsimp}', time.strftime("%b", date)) newname = newname.replace('{imageday}', time.strftime("%d", date)) newname = newname.replace('{imagedayname}', time.strftime("%A", date)) newname = newname.replace('{imagedaysimp}', time.strftime("%a", date)) newname = newname.replace('{imagetime}', time.strftime("%H_%M_%S", date)) newname = newname.replace('{imagehour}', time.strftime("%H", date)) newname = newname.replace('{imageminute}', time.strftime("%M", date)) newname = newname.replace('{imagesecond}', time.strftime("%S", date)) else: newname = newname.replace('{imagedate}','') newname = newname.replace('{imageyear}', '') newname = newname.replace('{imagemonth}', '') newname = newname.replace('{imagemonthname}', '') newname = newname.replace('{imagemonthsimp}', '') newname = newname.replace('{imageday}', '') newname = newname.replace('{imagedayname}', '') newname = newname.replace('{imagedaysimp}', '') newname = newname.replace('{imagetime}', '') newname = newname.replace('{imagehour}', '') newname = newname.replace('{imageminute}', '') newname = newname.replace('{imagesecond}', '') if width != None: newname = newname.replace('{imagewidth}', width) else: newname = newname.replace('{imagewidth}', '') if height != None: newname = newname.replace('{imageheight}', height) else: newname = newname.replace('{imageheight}', '') if cameramaker != None: newname = newname.replace('{cameramaker}', cameramaker) else: newname = newname.replace('{cameramaker}', '') if cameramodel != None: newname = newname.replace('{cameramodel}', cameramodel) else: newname = newname.replace('{cameramodel}', '') # Returns new name and path newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def get_exif_data(path): """ Get EXIF data from file. """ date = None width = None height = None cameramaker = None cameramodel = None try: file = open(path, 'rb') except: print "ERROR: Opening image file", path return date, width, height, cameramaker, cameramodel try: tags = EXIF.process_file(file) if not tags: print "ERROR: No EXIF tags on", path return date, width, height, cameramaker, cameramodel except: print "ERROR: proccesing EXIF tags on", path return date, width, height, cameramaker, cameramodel # tags['EXIF DateTimeOriginal'] = "2001:03:31 12:27:36" if tags.has_key('EXIF DateTimeOriginal'): data = str(tags['EXIF DateTimeOriginal']) try: date = time.strptime(data, "%Y:%m:%d %H:%M:%S") except: date = None if tags.has_key('EXIF ExifImageWidth'): width = str(tags['EXIF ExifImageWidth']) if tags.has_key('EXIF ExifImageLength'): height = str(tags['EXIF ExifImageLength']) if tags.has_key('Image Make'): cameramaker = str(tags['Image Make']) if tags.has_key('Image Model'): cameramodel = str(tags['Image Model']) return date, width, height, cameramaker, cameramodel def replace_music_hachoir(name, path, newname, newpath): """ Pattern replace for music """ file = get_new_path(name, path) try: tags = PyrenamerMetadataMusic(file) artist = clean_metadata(tags.get_artist()) album = clean_metadata(tags.get_album()) title = clean_metadata(tags.get_title()) track = clean_metadata(tags.get_track_number()) trackt = clean_metadata(tags.get_track_total()) genre = clean_metadata(tags.get_genre()) year = clean_metadata(tags.get_year()) if artist != None: newname = newname.replace('{artist}', artist) else: newname = newname.replace('{artist}', '') if album != None: newname = newname.replace('{album}', album) else: newname = newname.replace('{album}', '') if title != None: newname = newname.replace('{title}', title) else: newname = newname.replace('{title}', '') if track != None: newname = newname.replace('{track}', str(track).zfill(2)) else: newname = newname.replace('{track}', '') if trackt != None: newname = newname.replace('{tracktotal}', str(trackt).zfill(2)) else: newname = newname.replace('{tracktotal}', '') if genre != None: newname = newname.replace('{genre}', genre) else: newname = newname.replace('{genre}', '') if year != None: newname = newname.replace('{myear}', year) else: newname = newname.replace('{myear}', '') except: newname = newname.replace('{artist}', '') newname = newname.replace('{album}', '') newname = newname.replace('{title}', '') newname = newname.replace('{track}', '') newname = newname.replace('{tracktotal}', '') newname = newname.replace('{genre}', '') newname = newname.replace('{myear}', '') # Returns new name and path newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def replace_music_eyed3(name, path, newname, newpath): """ Pattern replace for mp3 """ file = get_new_path(name, path) if eyeD3.isMp3File(file): try: audioFile = eyeD3.Mp3AudioFile(file, eyeD3.ID3_ANY_VERSION) tag = audioFile.getTag() except Exception, e: print "ERROR eyeD3:", e newpath = get_new_path('', path) return '', unicode(newpath) try: artist = clean_metadata(tag.getArtist()) except Exception, e: print "ERROR eyeD3:", e artist = None try: album = clean_metadata(tag.getAlbum()) except Exception, e: print "ERROR eyeD3:", e album = None try: title = clean_metadata(tag.getTitle()) except Exception, e: print "ERROR eyeD3:", e title = None try: track = clean_metadata(tag.getTrackNum()[0]) except Exception, e: print "ERROR eyeD3:", e track = None try: trackt = clean_metadata(tag.getTrackNum()[1]) except Exception, e: print "ERROR eyeD3:", e trackt = None try: genre = clean_metadata(tag.getGenre().getName()) except Exception, e: print "ERROR eyeD3:", e genre = None try: year = clean_metadata(tag.getYear()) except Exception, e: print "ERROR eyeD3:", e year = None if artist != None: newname = newname.replace('{artist}', artist) else: newname = newname.replace('{artist}', '') if album != None: newname = newname.replace('{album}', album) else: newname = newname.replace('{album}', '') if title != None: newname = newname.replace('{title}', title) else: newname = newname.replace('{title}', '') if track != None: newname = newname.replace('{track}', str(track)) else: newname = newname.replace('{track}', '') if trackt != None: newname = newname.replace('{tracktotal}', str(trackt)) else: newname = newname.replace('{tracktotal}', '') if genre != None: newname = newname.replace('{genre}', genre) else: newname = newname.replace('{genre}', '') if year != None: newname = newname.replace('{myear}', year) else: newname = newname.replace('{myear}', '') else: newname = newname.replace('{artist}', '') newname = newname.replace('{album}', '') newname = newname.replace('{title}', '') newname = newname.replace('{track}', '') newname = newname.replace('{tracktotal}', '') newname = newname.replace('{genre}', '') newname = newname.replace('{myear}', '') # Returns new name and path newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def rename_file(ori, new): """ Change filename with the new one """ if ori == new: return True, None # We don't need to rename the file, but don't show error message if os.path.exists(new): print _("Error while renaming %s to %s! -> %s already exists!") % (ori, new, new) error = "[Errno 17] %s" % os.strerror(17) return False, error try: os.renames(ori, new) print "Renaming %s to %s" % (ori, new) return True, None except Exception, e: print _("Error while renaming %s to %s!") % (ori, new) print e return False, e def insert_at(name, path, text, pos): """ Append text at given position""" if pos >= 0: ini = name[0:pos] end = name[pos:len(name)] newname = ini + text + end else: newname = name + text newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def delete_from(name, path, ini, to): """ Delete chars from ini till to""" textini = name[0:ini] textend = name[to+1:len(name)] newname = textini + textend newpath = get_new_path(newname, path) return unicode(newname), unicode(newpath) def cut_extension(name, path): """ Remove extension from file name """ if '.' in name: ext = name.split('.')[-1] name = name[0:len(name)-len(ext)-1] path = path[0:len(path)-len(ext)-1] return name, path, ext else: return name, path, '' def add_extension(name, path, ext): """ Add extension to file name """ if ext != '' and ext != None and name != '' and name != None: name = name + '.' + ext path = path + '.' + ext return name, path def clean_metadata(tag): """ Removes reserver characters from a given filename """ try: tag = tag.replace('|', '') tag = tag.replace('/', '') tag = tag.replace('\\', '') tag = tag.replace('?', '') tag = tag.replace('%', '') tag = tag.replace('*', '') tag = tag.replace(':', '') tag = tag.replace('<', '') tag = tag.replace('>', '') tag = tag.replace('"', '') return tag except: return Nonepyrenamer-0.6.0/src/pyrenamer_metadata.py0000644000175000017500000000701111061753335015446 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ from hachoir_core.cmd_line import unicodeFilename from hachoir_parser import createParser from hachoir_metadata import extractMetadata from hachoir_metadata.metadata import MultipleMetadata class PyrenamerMetadataException(Exception): def __init__(self, value): self.parameter = value def __str__(self): return repr(self.parameter) class PyrenamerMetadata(PyrenamerMetadataException): def __init__(self, name): self.real_filename = name self.filename = unicodeFilename(self.real_filename) self.parser = createParser(self.filename, real_filename=self.real_filename) def get_mime_type(self): return self.parser.mime_type def get_metadata(self): self.metadata = extractMetadata(self.parser) class PyrenamerMetadataMusic(PyrenamerMetadata): def __init__(self, name): super(PyrenamerMetadataMusic, self).__init__(name) if not 'audio' in self.parser.mime_type: raise PyrenamerMetadataException("File is not music!") self.get_metadata() if self.metadata is None: raise PyrenamerMetadataException("No metadata in file!") else: self.parse_metadata() def parse_metadata(self): self.tags = {} for data in sorted(self.metadata): if not data.values: continue title = data.description value = '' for item in data.values: value += item.text self.tags[title] = value def get_artist(self): try: return self.tags["Artist"] except: try: return self.tags["Author"] except: return None def get_album(self): try: return self.tags["Album"] except: return None def get_title(self): try: return self.tags["Title"] except: return None def get_track_number(self): try: return self.tags["Track number"] except: return None def get_track_total(self): try: return self.tags["Track total"] except: return None def get_genre(self): try: return self.tags["Music genre"] except: return None def get_year(self): try: return self.tags["Creation date"] except: return None def get_duration(self): try: return self.tags["Duration"] except: return None def get_bitrate(self): try: return self.tags["Bit rate"] except: return None pyrenamer-0.6.0/src/Makefile.in0000644000175000017500000003531011064200176013273 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src DIST_COMMON = $(pyrenamer_PYTHON) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pyrenamerdir)" \ "$(DESTDIR)$(pyrenamerdir)" binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; nodist_pyrenamerPYTHON_INSTALL = $(INSTALL_DATA) pyrenamerPYTHON_INSTALL = $(INSTALL_DATA) py_compile = $(top_srcdir)/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = pyrenamer pyrenamerdir = $(pythondir)/pyrenamer pyrenamer_PYTHON = \ __init__.py \ pyrenamer.py \ pyrenamer_filefuncs.py \ pyrenamer_menu_cb.py \ pyrenamer_metadata.py \ pyrenamer_pattern_editor.py \ pyrenamer_prefs.py \ pyrenamer_tooltips.py \ pyrenamer_undo.py \ treefilebrowser.py \ TreeViewTooltips.py \ EXIF.py nodist_pyrenamer_PYTHON = \ pyrenamer_globals.py EXTRA_DIST = \ $(bin_SCRIPTS) \ $(pyrenamer_PYTHON) \ pyrenamer_globals.py.in CLEANFILES = \ pyrenamer_globals.py all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done install-nodist_pyrenamerPYTHON: $(nodist_pyrenamer_PYTHON) @$(NORMAL_INSTALL) test -z "$(pyrenamerdir)" || $(MKDIR_P) "$(DESTDIR)$(pyrenamerdir)" @list='$(nodist_pyrenamer_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(nodist_pyrenamerPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pyrenamerdir)/$$f'"; \ $(nodist_pyrenamerPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pyrenamerdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyrenamerdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyrenamerdir)" $$dlist; \ fi; \ else :; fi uninstall-nodist_pyrenamerPYTHON: @$(NORMAL_UNINSTALL) @list='$(nodist_pyrenamer_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(pyrenamerdir)/$$f"; \ rm -f "$(DESTDIR)$(pyrenamerdir)/$${f}c"; \ rm -f "$(DESTDIR)$(pyrenamerdir)/$${f}o"; \ done install-pyrenamerPYTHON: $(pyrenamer_PYTHON) @$(NORMAL_INSTALL) test -z "$(pyrenamerdir)" || $(MKDIR_P) "$(DESTDIR)$(pyrenamerdir)" @list='$(pyrenamer_PYTHON)'; dlist=''; for p in $$list; do\ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ f=$(am__strip_dir) \ dlist="$$dlist $$f"; \ echo " $(pyrenamerPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pyrenamerdir)/$$f'"; \ $(pyrenamerPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pyrenamerdir)/$$f"; \ else :; fi; \ done; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyrenamerdir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pyrenamerdir)" $$dlist; \ fi; \ else :; fi uninstall-pyrenamerPYTHON: @$(NORMAL_UNINSTALL) @list='$(pyrenamer_PYTHON)'; dlist=''; for p in $$list; do\ f=$(am__strip_dir) \ rm -f "$(DESTDIR)$(pyrenamerdir)/$$f"; \ rm -f "$(DESTDIR)$(pyrenamerdir)/$${f}c"; \ rm -f "$(DESTDIR)$(pyrenamerdir)/$${f}o"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pyrenamerdir)" "$(DESTDIR)$(pyrenamerdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-nodist_pyrenamerPYTHON \ install-pyrenamerPYTHON install-dvi: install-dvi-am install-exec-am: install-binSCRIPTS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-nodist_pyrenamerPYTHON \ uninstall-pyrenamerPYTHON .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_pyrenamerPYTHON install-pdf install-pdf-am \ install-ps install-ps-am install-pyrenamerPYTHON install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-nodist_pyrenamerPYTHON uninstall-pyrenamerPYTHON ################################### ### Main data ################################### all-local: pyrenamer_globals.py ################################### ### Configure pyrenamer_globals.py ################################### pyrenamer_globals.py: pyrenamer_globals.py.in Makefile sed \ -e s!\@LOCALEDIR\@!$(datadir)/locale! \ -e s!\@RESOURCEDIR\@!$(datadir)/$(PACKAGE_NAME)! \ -e s!\@PKGDATADIR\@!$(pkgdatadir)! \ -e s!\@PACKAGE\@!$(PACKAGE_NAME)! \ -e s!\@VERSION\@!$(PACKAGE_VERSION)! \ < $< \ > $@ # 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. .NOEXPORT: pyrenamer-0.6.0/src/TreeViewTooltips.py0000644000175000017500000002245410654337136015110 00000000000000# Copyright (c) 2006, Daniel J. Popowich # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # # Send bug reports and contributions to: # # dpopowich AT astro dot umass dot edu # ''' TreeViewTooltips.py Provides TreeViewTooltips, a class which presents tooltips for cells, columns and rows in a gtk.TreeView. ------------------------------------------------------------ This file includes a demo. Just execute the file: python TreeViewTooltips.py ------------------------------------------------------------ To use, first subclass TreeViewTooltips and implement the get_tooltip() method; see below. Then add any number of gtk.TreeVew widgets to a TreeViewTooltips instance by calling the add_view() method. Overview of the steps: # 1. subclass TreeViewTooltips class MyTooltips(TreeViewTooltips): # 2. overriding get_tooltip() def get_tooltip(...): ... # 3. create an instance mytips = MyTooltips() # 4. Build up your gtk.TreeView. myview = gtk.TreeView() ...# create columns, set the model, etc. # 5. Add the view to the tooltips mytips.add_view(myview) How it works: the add_view() method connects the TreeView to the "motion-notify" event with the callback set to a private method. Whenever the mouse moves across the TreeView the callback will call get_tooltip() with the following arguments: get_tooltip(view, column, path) where, view: the gtk.TreeView instance. column: the gtk.TreeViewColumn instance that the mouse is currently over. path: the path to the row that the mouse is currently over. Based on whether or not column and path are checked for specific values, get_tooltip can return tooltips for a cell, column, row or the whole view: Column Checked Path Checked Tooltip For... Y Y cell Y N column N Y row N N view get_tooltip() should return None if no tooltip should be displayed. Otherwise the return value will be coerced to a string (with the str() builtin) and stripped; if non-empty, the result will be displayed as the tooltip. By default, the tooltip popup window will be displayed centered and just below the pointer and will remain shown until the pointer leaves the cell (or column, or row, or view, depending on how get_tooltip() is implemented). ''' import pygtk pygtk.require('2.0') import gtk import gtk.gdk import gobject if gtk.gtk_version < (2, 8): import warnings msg = ('''This module was developed and tested with version 2.8.18 of gtk. You are using version %d.%d.%d. Your milage may vary.''' % gtk.gtk_version) warnings.warn(msg) # major, minor, patch version = 1, 0, 0 class TreeViewTooltips: def __init__(self): ''' Initialize the tooltip. After initialization there are two attributes available for advanced control: window: the popup window that holds the tooltip text, an instance of gtk.Window. label: a gtk.Label that is packed into the window. The tooltip text is set in the label with the set_label() method, so the text can be plain or markup text. Be default, the tooltip is enabled. See the enabled/disabled methods. ''' # create the window self.window = window = gtk.Window(gtk.WINDOW_POPUP) window.set_name('gtk-tooltips') window.set_resizable(False) window.set_border_width(4) window.set_app_paintable(True) window.connect("expose-event", self.__on_expose_event) # create the label self.label = label = gtk.Label() label.set_line_wrap(True) label.set_alignment(0.5, 0.5) label.set_use_markup(True) label.show() window.add(label) # by default, the tooltip is enabled self.__enabled = True # saves the current cell self.__save = None # the timer id for the next tooltip to be shown self.__next = None # flag on whether the tooltip window is shown self.__shown = False def enable(self): 'Enable the tooltip' self.__enabled = True def disable(self): 'Disable the tooltip' self.__enabled = False def __show(self, tooltip, x, y): '''show the tooltip popup with the text/markup given by tooltip. tooltip: the text/markup for the tooltip. x, y: the coord. (root window based) of the pointer. ''' window = self.window # set label self.label.set_label(tooltip) # resize window w, h = window.size_request() # move the window window.move(*self.location(x,y,w,h)) # show it window.show() self.__shown = True def __hide(self): 'hide the tooltip' self.__queue_next() self.window.hide() self.__shown = False def __leave_handler(self, view, event): 'when the pointer leaves the view, hide the tooltip' self.__hide() def __motion_handler(self, view, event): 'As the pointer moves across the view, show a tooltip.' path = view.get_path_at_pos(int(event.x), int(event.y)) if self.__enabled and path: path, col, x, y = path tooltip = self.get_tooltip(view, col, path) if tooltip is not None: tooltip = str(tooltip).strip() if tooltip: self.__queue_next((path, col), tooltip, int(event.x_root), int(event.y_root)) return self.__hide() def __queue_next(self, *args): 'queue next request to show a tooltip' # if args is non-empty it means a request was made to show a # tooltip. if empty, no request is being made, but any # pending requests should be cancelled anyway. cell = None # if called with args, break them out if args: cell, tooltip, x, y = args # if it's the same cell as previously shown, just return if self.__save == cell: return # if we have something queued up, cancel it if self.__next: gobject.source_remove(self.__next) self.__next = None # if there was a request... if cell: # if the tooltip is already shown, show the new one # immediately if self.__shown: self.__show(tooltip, x, y) # else queue it up in 1/2 second else: self.__next = gobject.timeout_add(500, self.__show, tooltip, x, y) # save this cell self.__save = cell def __on_expose_event(self, window, event): # this magic is required so the window appears with a 1-pixel # black border (default gtk Style). This code is a # transliteration of the C implementation of gtk.Tooltips. w, h = window.size_request() window.style.paint_flat_box(window.window, gtk.STATE_NORMAL, gtk.SHADOW_OUT, None, window, 'tooltip', 0, 0, w, h) def location(self, x, y, w, h): '''Given the x,y coordinates of the pointer and the width and height (w,h) demensions of the tooltip window, return the x, y coordinates of the tooltip window. The default location is to center the window on the pointer and 4 pixels below it. ''' return x - w/2, y + 4 def add_view(self, view): 'add a gtk.TreeView to the tooltip' assert isinstance(view, gtk.TreeView), \ ('This handler should only be connected to ' 'instances of gtk.TreeView') view.connect("motion-notify-event", self.__motion_handler) view.connect("leave-notify-event", self.__leave_handler) def get_tooltip(self, view, column, path): 'See the module doc string for a description of this method' raise NotImplemented, 'Subclass must implement get_tooltip()'pyrenamer-0.6.0/src/pyrenamer_menu_cb.py0000644000175000017500000000426711062006435015301 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ class PyrenamerMenuCB: def __init__(self, main): self.main = main def on_menu_undo_activate(self, widget): self.main.undo_manager.undo() self.main.dir_reload_current() self.main.menu_undo.set_sensitive(False) self.main.menu_redo.set_sensitive(True) def on_menu_redo_activate(self, widget): self.main.undo_manager.redo() self.main.dir_reload_current() self.main.menu_undo.set_sensitive(True) self.main.menu_redo.set_sensitive(False) def on_menu_refresh_activate(self, widget): self.main.file_browser.create_new() self.main.file_browser.set_active_dir(self.main.active_dir) def on_menu_patterns_activate(self, widget): self.main.notebook.set_current_page(0) def on_menu_substitutions_activate(self, widget): self.main.notebook.set_current_page(1) def on_menu_insert_activate(self, widget): self.main.notebook.set_current_page(2) def on_menu_manual_activate(self, widget): self.main.notebook.set_current_page(3) def on_menu_images_activate(self, widget): self.main.notebook.set_current_page(4) def on_menu_music_activate(self, widget): self.main.notebook.set_current_page(5) def on_menu_show_options_activate(self, widget): self.main.options_panel_state(widget.get_active())pyrenamer-0.6.0/src/pyrenamer_prefs.py0000644000175000017500000002645311063516613015016 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ try: import pygtk pygtk.require('2.0') except: print "PyGtk 2.0 or later required for this app to run" raise SystemExit try: import gtk import gtk.glade import gobject except: raise SystemExit try: import gconf HAS_GCONF = True except: HAS_GCONF = False from os import path as ospath import pyrenamer_globals as pyrenamerglob from gettext import gettext as _ class PyrenamerPrefs: def __init__(self, main): self.main = main self.gconf_path = '/apps/' + pyrenamerglob.name self.gconf_root_dir = self.gconf_path + '/root_dir' self.gconf_active_dir = self.gconf_path + '/active_dir' self.gconf_window_maximized = self.gconf_path + '/window_maximized' self.gconf_pane_position = self.gconf_path + '/pane_position' self.gconf_window_width = self.gconf_path + '/window_width' self.gconf_window_height = self.gconf_path + '/window_height' self.gconf_window_posx = self.gconf_path + '/window_posx' self.gconf_window_posy = self.gconf_path + '/window_posy' self.gconf_options_shown = self.gconf_path + '/options_shown' self.gconf_filedir = self.gconf_path + '/filedir' self.gconf_keepext = self.gconf_path + '/keepext' self.gconf_autopreview = self.gconf_path + '/autopreview' def create_preferences_dialog(self): """ Create Preferences dialog and connect signals """ # Create the window self.preferences_tree = gtk.glade.XML(pyrenamerglob.gladefile, "prefs_window") # Get text entries and buttons self.prefs_window = self.preferences_tree.get_widget('prefs_window') self.prefs_entry_root = self.preferences_tree.get_widget('prefs_entry_root') self.prefs_entry_active = self.preferences_tree.get_widget('prefs_entry_active') self.prefs_browse_root = self.preferences_tree.get_widget('prefs_browse_root') self.prefs_browse_active = self.preferences_tree.get_widget('prefs_browse_active') self.prefs_close = self.preferences_tree.get_widget('prefs_close') # Signals signals = { "on_prefs_browse_root_clicked": self.on_prefs_browse_root_clicked, "on_prefs_browse_active_clicked": self.on_prefs_browse_active_clicked, "on_prefs_close_clicked": self.on_prefs_close_clicked, "on_prefs_window_destroy": self.on_prefs_destroy, } self.preferences_tree.signal_autoconnect(signals) # Fill the panel with gconf values or actual values (if gconf is empty) client = gconf.client_get_default() root_dir = client.get_string(self.gconf_root_dir) if root_dir == (None or ''): root_dir = self.main.root_dir active_dir = client.get_string(self.gconf_active_dir) if active_dir == (None or ''): active_dir = self.main.active_dir self.prefs_entry_root.set_text(root_dir) self.prefs_entry_active.set_text(active_dir) # Set prefs window icon self.prefs_window.set_icon_from_file(pyrenamerglob.icon) def on_prefs_browse_root_clicked(self, widget): """ Browse root clicked """ f = gtk.FileChooserDialog(_('Select root directory'), self.prefs_window, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT), ) f.set_current_folder(self.prefs_entry_root.get_text()) response = f.run() if response == gtk.RESPONSE_ACCEPT: self.prefs_entry_root.set_text(f.get_filename()) elif response == gtk.RESPONSE_REJECT: pass f.destroy() def on_prefs_browse_active_clicked(self, widget): """ Browse active clicked """ f = gtk.FileChooserDialog(_('Select active directory'), self.prefs_window, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_OK, gtk.RESPONSE_ACCEPT), ) f.set_current_folder(self.prefs_entry_active.get_text()) response = f.run() if response == gtk.RESPONSE_ACCEPT: self.prefs_entry_active.set_text(f.get_filename()) elif response == gtk.RESPONSE_REJECT: pass f.destroy() def on_prefs_close_clicked(self, widget): """ Prefs close button clicked """ root = self.prefs_entry_root.get_text() active = self.prefs_entry_active.get_text() if root != "" and active != "": if not self.check_root_dir(root): self.display_error_dialog(_("\nThe root directory is not valid!\nPlease select another directory.")) self.prefs_entry_root.set_text('/') elif not self.check_active_dir(root, active): self.main.display_error_dialog(_("\nThe active directory is not valid!\nPlease select another directory.")) self.prefs_entry_active.set_text(root) else: self.main.root_dir = root self.main.active_dir = active self.prefs_window.destroy() self.preferences_save_dirs() else: self.main.display_error_dialog(_("\nPlease set both directories!")) if root == '': self.prefs_entry_root.set_text(self.main.root_dir) if active == '': self.prefs_entry_active.set_text(self.main.active_dir) def on_prefs_destroy(self, widget): """ Prefs window destroyed """ root = self.prefs_entry_root.get_text() active = self.prefs_entry_active.get_text() if root != "" and active != "": if not self.check_root_dir(root): self.main.display_error_dialog(_("\nThe root directory is not valid!\nPlease select another directory.")) self.create_preferences_dialog() self.prefs_entry_root.set_text('/') elif not self.check_active_dir(root, active): self.main.display_error_dialog(_("\nThe active directory is not valid!\nPlease select another directory.")) self.create_preferences_dialog() self.prefs_entry_active.set_text(root) else: self.main.root_dir = root self.main.active_dir = active self.prefs_window.destroy() self.preferences_save_dirs() else: self.main.display_error_dialog(_("\nPlease set both directories!")) self.create_preferences_dialog() if root == '': self.prefs_entry_root.set_text(self.main.root_dir) if active == '': self.prefs_entry_active.set_text(self.main.active_dir) def on_add_recursive_toggled(self, widget): """ Reload current dir, but with Recursive flag enabled """ self.main.dir_reload_current() def on_filedir_combo_changed(self, combo): filedir = combo.get_active() self.main.filedir = filedir self.main.dir_reload_current() def on_extensions_check_toggled(self, check): self.main.keepext = check.get_active() def on_autopreview_check_toggled(self, check): self.main.autopreview = check.get_active() def check_root_dir(self, root): """ Checks if the root dir is correct """ return ospath.isdir(ospath.abspath(root)) def check_active_dir(self, root, active): """ Checks if active dir is correct """ root = ospath.abspath(root) active = ospath.abspath(active) return ospath.isdir(active) and (root in active) def preferences_save(self): """ Width and height are saved on the configure_event callback for main_window """ client = gconf.client_get_default() client.set_int(self.gconf_pane_position, self.main.pane_position) client.set_bool(self.gconf_window_maximized, self.main.window_maximized) client.set_int(self.gconf_window_width, self.main.window_width) client.set_int(self.gconf_window_height, self.main.window_height) client.set_int(self.gconf_window_posx, self.main.window_posx) client.set_int(self.gconf_window_posy, self.main.window_posy) client.set_bool(self.gconf_options_shown, self.main.options_shown) client.set_int(self.gconf_filedir, self.main.filedir) client.set_bool(self.gconf_keepext, self.main.keepext) client.set_bool(self.gconf_autopreview, self.main.autopreview) def preferences_save_dirs(self): """ Save default directories """ client = gconf.client_get_default() client.set_string(self.gconf_root_dir, self.main.root_dir) client.set_string(self.gconf_active_dir, self.main.active_dir) def preferences_read(self): """ The name says it all... """ client = gconf.client_get_default() root_dir = client.get_string(self.gconf_root_dir) if root_dir != None and root_dir != '': self.main.root_dir = root_dir active_dir = client.get_string(self.gconf_active_dir) if active_dir != None and active_dir != '': self.main.active_dir = active_dir pane_position = client.get_int(self.gconf_pane_position) if pane_position != None: self.main.pane_position = pane_position maximized = client.get_bool(self.gconf_window_maximized) if maximized != None: self.main.window_maximized = maximized width = client.get_int(self.gconf_window_width) height = client.get_int(self.gconf_window_height) if width != None and height != None: self.main.window_width = width self.main.window_height = height posx = client.get_int(self.gconf_window_posx) posy = client.get_int(self.gconf_window_posy) if posx != None and posy != None: self.main.window_posx = posx self.main.window_posy = posy options_shown = client.get_bool(self.gconf_options_shown) if options_shown != None: self.main.options_shown = options_shown filedir = client.get_int(self.gconf_filedir) if filedir != None: self.main.filedir = filedir keepext = client.get_bool(self.gconf_keepext) if keepext != None: self.main.keepext = keepext autopreview = client.get_bool(self.gconf_autopreview) if autopreview != None: self.main.autopreview = autopreview pyrenamer-0.6.0/src/treefilebrowser.py0000644000175000017500000004026011063520656015012 00000000000000# -*- coding: utf-8 -*- """ TreeFileBrowser a tree-like gtk file browser Copyright (C) 2006-2008 Adolfo González Blázquez This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ try: import pygtk pygtk.require('2.0') except: print "PyGtk 2.0 or later required for this app to run" raise SystemExit try: import gtk import gobject except: raise SystemExit from gettext import gettext as _ try: from os import path as ospath import dircache except: raise SystemExit class TreeFileBrowser(gobject.GObject): """ A widget that implements a tree-like file browser, like the one used on Nautilus spatial view in list mode """ __gproperties__ = { 'show-hidden': (gobject.TYPE_BOOLEAN, 'show hidden files', 'show hidden files and folders', False, gobject.PARAM_READWRITE), 'show-only-dirs': (gobject.TYPE_BOOLEAN, 'show only directories', 'show only directories, not files', True, gobject.PARAM_READWRITE), 'rules-hint': (gobject.TYPE_BOOLEAN, 'rules hint', 'show rows background in alternate colors', True, gobject.PARAM_READWRITE), 'root': (gobject.TYPE_STRING, 'initial path', 'initial path selected on tree browser', '/', gobject.PARAM_READWRITE) } __gsignals__ = { 'row-expanded' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING,)), 'cursor-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING,)) } def __init__(self, root=None): """ Path is where we wan the tree initialized """ gobject.GObject.__init__(self) self.show_hidden = False self.show_only_dirs = True self.show_rules_hint = True self.root = '/' if root != None and ospath.isdir(root): self.root = root #elif root != None: print "ERROR: %s doesn't exist." % root self.view, self.scrolled = self.make_view() self.create_new() self.create_popup() ##################################################### # Accessors and Mutators def do_get_property(self, property): """ GObject get_property method """ if property.name == 'show-hidden': return self.show_hidden elif property.name == 'show-only-dirs': return self.show_only_dirs elif property.name == 'rules-hint': return self.show_rules_hint elif property.name == 'path': return self.root else: raise AttributeError, 'unknown property %s' % property.name def do_set_property(self, property, value): """ GObject set_property method """ if property.name == 'show-hidden': self.show_hidden = value elif property.name == 'show-only-dirs': self.show_only_dirs = value elif property.name == 'rules-hint': self.show_rules_hint = value elif property.name == 'path': self.root = value else: raise AttributeError, 'unknown property %s' % property.name def get_view(self): return self.view def get_scrolled(self): return self.scrolled def set_show_hidden(self, hidden): self.show_hidden = hidden activedir = self.get_selected() self.create_new() if activedir != None: if "/." in activedir: self.set_active_dir(self.root) else: self.set_active_dir(activedir) self.hidden_check_menu.set_active(hidden) def get_show_hidden(self): return self.show_hidden def set_rules_hint(self, rules): self.show_rules_hint = rules self.view.set_rules_hint(rules) def get_rules_hint(self): return self.show_rules_hint def set_show_only_dirs(self, only_dirs): self.show_only_dirs = only_dirs self.create_new() def get_show_only_dirs(self): return self.show_only_dirs def get_selected(self): """ Returns selected item in browser """ model, iter = self.view.get_selection().get_selected() if iter != None: return model.get_value(iter, 2) else: return None ##################################################### # Callbacks def row_expanded(self, treeview, iter, path): """ CALLBACK: a row is expanded """ model = treeview.get_model() model.set_value(iter, 0, self.get_folder_opened_icon()) self.get_file_list(model, iter, model.get_value(iter,2)) self.remove_empty_child(model, iter) # Send signal with path of expanded row self.emit('row-expanded', model.get_value(iter,2)) def row_collapsed(self, treeview, iter, path): """ CALLBACK: a row is collapsed """ model = treeview.get_model() model.set_value(iter, 0, self.get_folder_closed_icon()) while model.iter_has_child(iter): child = model.iter_children(iter) model.remove(child) self.add_empty_child(model, iter) def row_activated(self, treeview, path, view_column): """ CALLBACK: row activated using return, double-click, shift-right, etc. """ if treeview.row_expanded(path): treeview.collapse_row(path) else: treeview.expand_row(path, False) def cursor_changed(self, treeview): """ CALLBACK: a new row has been selected """ model, iter = treeview.get_selection().get_selected() # Send signal with path of expanded row if iter == None: path = treeview.get_cursor()[0] iter = self.model.get_iter(path) self.emit('cursor-changed', model.get_value(iter,2)) def button_pressed(self, widget, event): """ CALLBACK: clicked on widget """ if event.button == 3: x = int(event.x) y = int(event.y) time = event.time pthinfo = self.view.get_path_at_pos(x, y) if pthinfo is not None: path, col, cellx, celly = pthinfo #self.view.grab_focus() #self.view.set_cursor( path, col, 0) self.popup.popup( None, None, None, event.button, time) return 1 def show_hidden_toggled(self, widget): """ CALLBACK: Show hidden files on context menu toggled """ state = widget.get_active() self.set_show_hidden(state) ##################################################### # Directories and files, nodes and icons def set_cursor_on_first_row(self): model = self.view.get_model() iter = model.get_iter_root() path = model.get_path(iter) self.view.set_cursor(path) def check_active_dir(self, directory): rootdir = self.root if not ospath.isdir(directory): return False if not (rootdir in directory): return False if directory == rootdir: return True return True def set_active_dir(self, directory): rootdir = self.root # Expand root model = self.view.get_model() iter = model.get_iter_root() path = model.get_path(iter) self.view.expand_row(path, False) iter = model.iter_children(iter) # Add trailing / to paths if len(directory) > 1 and directory[-1] != '/': directory += '/' if len(rootdir) > 1 and rootdir[-1] != '/': rootdir += '/' if not ospath.isdir(directory): #print "ERROR: %s doesn't exist." % directory self.set_cursor_on_first_row() return False if not (rootdir in directory): #print "ERROR: %s is not on root path." % directory self.set_cursor_on_first_row() return False if directory == rootdir: self.set_cursor_on_first_row() return True else: # Now we check if the desired dir is valid # Convert the given '/home/user/dir/' to ['/', 'home/', 'user/', 'dir/'] if len(directory) > 1: dirtree = directory.split('/') dirtree.pop(-1) else: dirtree = ['/'] if len(dirtree) > 1: dirtree[0] = '/' for i in range(len(dirtree)-1): dirtree[i+1] = dirtree[i+1] + '/' # Convert root to '/home/user/dir/' to ['/', 'home/', 'user/', 'dir/'] if len(rootdir) > 1: roottree = rootdir.split('/') roottree.pop(-1) else: roottree = ['/'] if len(roottree) > 1: roottree[0] = '/' for i in range(len(roottree)-1): roottree[i+1] = roottree[i+1] + '/' # Check if the dir is in the same path as the desired root long = len(roottree) for i in range(long): if roottree[i] != dirtree[i]: return False # End checking # Star expanding # Count how many iterations we need depth = len(dirtree) - len(roottree) # Expand baby expand! exp = len(roottree) for i in range(depth): newpath = dirtree[i+exp] if iter == None: continue val = model.get_value(iter, 1).replace('/','') + '/' while val != newpath: iter = model.iter_next(iter) val = model.get_value(iter, 1).replace('/','') + '/' path = model.get_path(iter) self.view.expand_row(path, False) iter = model.iter_children(iter) # Don't expand last row self.view.collapse_row(path) # Set the cursor self.view.set_cursor(path) return True def add_empty_child(self, model, iter): """ Adds a empty child to a node. Used when we need a folder that have children to show the expander arrow """ model.insert_before(iter, None) def remove_empty_child(self, model, iter): """ Delete empty child from a node. Used to remove the extra child used to show the expander arrow on folders with children """ newiter = model.iter_children(iter) model.remove(newiter) def get_file_list(self, model, iter, dir): """ Get the file list from a given directory """ ls = dircache.listdir(dir) ls.sort(key=str.lower) for i in ls: path = ospath.join(dir,i) if ospath.isdir(path) or not self.show_only_dirs : if i[0] != '.' or (self.show_hidden and i[0] == '.'): newiter = model.append(iter) if ospath.isdir(path): icon = self.get_folder_closed_icon() else: icon = self.get_file_icon() model.set_value(newiter, 0, icon) model.set_value(newiter, 1, i) model.set_value(newiter, 2, path) if ospath.isdir(path): try: subdir = dircache.listdir(path) except: subdir = [] if subdir != []: for i in subdir: if ospath.isdir(ospath.join(path,i)) or not self.show_only_dirs: if i[0] != '.' or (self.show_hidden and i[0] == '.'): self.add_empty_child(model, newiter) break def create_root(self): model = self.view.get_model() if self.root != '/': if self.root[-1] == '/': self.root = self.root.rsplit('/',1)[0] # Remove last / if neccesary directory = self.root.split('/')[-1] else: directory = self.root iter = model.insert_before(None, None) model.set_value(iter, 0, self.get_folder_opened_icon()) model.set_value(iter, 1, directory) model.set_value(iter, 2, self.root) iter = model.insert_before(iter, None) return iter def create_new(self): """ Create tree from scratch """ model = self.view.get_model() model.clear() iter = self.create_root() self.get_file_list(self.view.get_model(), iter, self.root) def create_popup(self): """ Create popup menu for right click """ self.popup = gtk.Menu() self.hidden_check_menu = gtk.CheckMenuItem(_("Show hidden files")) self.hidden_check_menu.connect('toggled', self.show_hidden_toggled) self.popup.add(self.hidden_check_menu) self.popup.show_all() def get_folder_closed_icon(self): """ Returns a pixbuf with the current theme closed folder icon """ icon_theme = gtk.icon_theme_get_default() try: icon = icon_theme.load_icon("gnome-fs-directory", 16, 0) return icon except gobject.GError, exc: #print "Can't load icon", exc try: icon = icon_theme.load_icon("gtk-directory", 16, 0) return icon except: #print "Can't load default icon" return None def get_folder_opened_icon(self): """ Returns a pixbuf with the current theme opened folder icon """ icon_theme = gtk.icon_theme_get_default() try: icon = icon_theme.load_icon("gnome-fs-directory-accept", 16, 0) return icon except gobject.GError, exc: #print "Can't load icon", exc try: icon = icon_theme.load_icon("gtk-directory", 16, 0) return icon except: #print "Can't load default icon" return None def get_file_icon(self): """ Returns a pixbuf with the current theme file icon """ icon_theme = gtk.icon_theme_get_default() try: icon = icon_theme.load_icon("text-x-generic", gtk.ICON_SIZE_MENU, 0) return icon except gobject.GError, exc: #print "Can't load icon", exc return None ##################################################### # Model, treeview and scrolledwindow def make_view(self): """ Create the view itself. (Icon, dir name, path) """ self.model = gtk.TreeStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING, gobject.TYPE_STRING) view = gtk.TreeView(self.model) view.set_headers_visible(False) view.set_enable_search(True) view.set_reorderable(False) view.set_rules_hint(self.show_rules_hint) view.connect('row-expanded', self.row_expanded) view.connect('row-collapsed', self.row_collapsed) view.connect('row-activated', self.row_activated) view.connect('cursor-changed', self.cursor_changed) view.connect('button_press_event', self.button_pressed) col = gtk.TreeViewColumn() # The icon render_pixbuf = gtk.CellRendererPixbuf() col.pack_start(render_pixbuf, expand=False) col.add_attribute(render_pixbuf, 'pixbuf', 0) # The dir name render_text = gtk.CellRendererText() col.pack_start(render_text, expand=True) col.add_attribute(render_text, 'text', 1) view.append_column(col) view.show() # Create scrollbars around the view scrolled = gtk.ScrolledWindow() scrolled.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrolled.set_shadow_type(gtk.SHADOW_ETCHED_IN) scrolled.add(view) scrolled.show() return view, scrolled gobject.type_register(TreeFileBrowser) # End TreeFileBrowser pyrenamer-0.6.0/src/__init__.py0000644000175000017500000000003010654337136013341 00000000000000# -*- coding: utf-8 -*- pyrenamer-0.6.0/src/pyrenamer_pattern_editor.py0000644000175000017500000002333611064171435016717 00000000000000# -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ try: import pygtk pygtk.require('2.0') except: print "PyGtk 2.0 or later required for this app to run" raise SystemExit try: import gtk import gtk.glade import gobject except: raise SystemExit import pyrenamer_globals as pyrenamerglob from gettext import gettext as _ import os class PyrenamerPatternEditor: def __init__(self, main): self.main = main # Check if config directory exists self.config_dir = os.path.join(pyrenamerglob.config_dir, 'patterns') if not os.path.isdir(self.config_dir): os.makedirs(self.config_dir) def get_patterns(self, selector): patterns = [] default_patterns = { "main_ori": "{X}\n", "main_dest": "{1}\n", "images_ori": "{X}\n", "images_dest": "{1}\n" \ "{imageyear}{imagemonth}{imageday}_{imagetime}_{1}\n" \ "{imagewidth}x{imageheight}_{1}\n", "music_ori": "{X}\n", "music_dest": "{1}\n" \ "{track} - {artist} ({album}) - {title}\n" \ "{track} - {artist}\n", } config_file = os.path.join(self.config_dir, selector) # If the config file doesn't exist, create it with default options if not os.path.isfile(config_file): f = open(config_file, 'w') try: f.write(default_patterns[selector]) finally: f.close() # Read patterns from file f = open(config_file, 'r') try: for line in f: line = line.rstrip("\r\n") patterns.append(line) finally: f.close() # Return found patterns if patterns == []: if "ori" in selector: patterns.append('{X}') else: patterns.append('{1}') return patterns def save_patterns(self, selector): config_file = os.path.join(self.config_dir, selector) f = open(config_file, 'w') iter = self.model.get_iter_first() try: while iter != None: val = self.model.get_value(iter, 0) f.write(val + "\n") iter = self.model.iter_next(iter) finally: f.close() def add_pattern(self, selector, pattern): config_file = os.path.join(self.config_dir, selector) f = open(config_file, 'a') try: f.write(pattern + "\n") finally: f.close() def create_window(self, selector): """ Create pattern editor dialog and connect signals """ # Save the selector for the future self.selector = selector # Create the window self.pattern_edit_tree = gtk.glade.XML(pyrenamerglob.gladefile, "pattern_edit_window") # Get widgets self.pattern_edit_window = self.pattern_edit_tree.get_widget('pattern_edit_window') self.pattern_edit_treeview = self.pattern_edit_tree.get_widget('pattern_edit_treeview') # Signals signals = { "on_pattern_edit_add_clicked": self.on_pattern_edit_add_clicked, "on_pattern_edit_del_clicked": self.on_pattern_edit_del_clicked, "on_pattern_edit_edit_clicked": self.on_pattern_edit_edit_clicked, "on_pattern_edit_up_clicked": self.on_pattern_edit_up_clicked, "on_pattern_edit_down_clicked": self.on_pattern_edit_down_clicked, "on_pattern_edit_close_clicked": self.on_prefs_close_clicked, "on_pattern_edit_treeview_button_press_event": self.on_pattern_edit_treeview_button_press_event, "on_pattern_edit_window_destroy": self.on_pattern_edit_destroy, } self.pattern_edit_tree.signal_autoconnect(signals) # Set prefs window icon self.pattern_edit_window.set_icon_from_file(pyrenamerglob.icon) # Set window name if 'main' in selector: self.pattern_edit_window.set_title(_('Patterns editor')) elif 'images' in selector: self.pattern_edit_window.set_title(_('Image patterns editor')) elif 'music' in selector: self.pattern_edit_window.set_title(_('Music patterns editor')) self.populate_treeview(selector) def populate_treeview(self, selector): # Get data from main variable if selector == "main_ori": data = self.main.patterns["main_ori"] elif selector == "main_dest": data = self.main.patterns["main_dest"] elif selector == "images_ori": data = self.main.patterns["images_ori"] elif selector == "images_dest": data = self.main.patterns["images_dest"] elif selector == "music_ori": data = self.main.patterns["music_ori"] elif selector == "music_dest": data = self.main.patterns["music_dest"] # Create model self.model = gtk.ListStore(gobject.TYPE_STRING) for p in data: self.model.append([p]) self.pattern_edit_treeview.set_model(self.model) # Draw treeview renderer = gtk.CellRendererText() renderer.set_property('editable', True) renderer.connect('edited', self.on_cell_edited, self.model) column = gtk.TreeViewColumn("Pattern",renderer, text=0) self.pattern_edit_treeview.append_column(column) self.pattern_edit_treeview.set_headers_visible(False) def on_cell_edited(self, cell, path, new_text, model): iter = model.get_iter(path) model.set_value(iter, 0, new_text) def on_pattern_edit_add_clicked(self, widget): # Run add dialog and get data dialog, entry = self.create_add_dialog() output = dialog.run() if output == 1: data = entry.get_text() dialog.destroy() else: dialog.destroy() return False if data == None or data == '': return False # Add the data selection = self.pattern_edit_treeview.get_selection() model, iter = selection.get_selected() if iter != None: iter = model.insert_after(iter, [data]) else: iter = model.append([data]) selection.select_iter(iter) def on_pattern_edit_del_clicked(self, widget): selection = self.pattern_edit_treeview.get_selection() model, iter = selection.get_selected() if iter != None: iter = model.remove(iter) else: return def on_pattern_edit_edit_clicked(self, widget): # Get data from treeview selection = self.pattern_edit_treeview.get_selection() model, iter = selection.get_selected() if iter != None: data = model.get_value(iter, 0) else: return False # Run edit dialog dialog, entry = self.create_add_dialog() entry.set_text(data) output = dialog.run() if output == 1: data = entry.get_text() dialog.destroy() else: dialog.destroy() return False if data == None or data == '': return False # Edit the data model.set_value(iter, 0, data) def on_pattern_edit_up_clicked(self, widget): model, iter = self.pattern_edit_treeview.get_selection().get_selected() iter_prev = self.iter_prev(model, iter) if iter_prev != None: model.swap(iter, iter_prev) def on_pattern_edit_down_clicked(self, widget): model, iter = self.pattern_edit_treeview.get_selection().get_selected() iter_next = model.iter_next(iter) if iter_next != None: model.swap(iter, iter_next) def on_prefs_close_clicked(self, widget): self.pattern_edit_window.destroy() def on_pattern_edit_destroy(self, widget): self.save_patterns(self.selector) self.main.populate_pattern_combos() def on_pattern_edit_treeview_button_press_event(self, widget, event): """ If clicked in a clean part of the listview, unselect all rows """ x, y = event.get_coords() if self.pattern_edit_treeview.get_path_at_pos(int(x), int(y)) == None: self.pattern_edit_treeview.get_selection().unselect_all() def iter_prev(self, model, iter): path = model.get_string_from_iter(iter) if path == "0": return None prev_path = int(path) -1 return model.get_iter_from_string(str(prev_path)) def create_add_dialog(self,): """ Create pattern add dialog and connect signals """ # Create the dialog tree = gtk.glade.XML(pyrenamerglob.gladefile, "add_pattern_dialog") # Get widgets dialog = tree.get_widget('add_pattern_dialog') entry = tree.get_widget('add_pattern_entry') return dialog, entry pyrenamer-0.6.0/TODO0000644000175000017500000000235111064160144011126 00000000000000TODO * Reorder elements in treeview * Edit filename directly on treeview * Drop gconf for python's ConfigParser * Add support for 1 char/number pattern, or to define just a number of chars, something like char{3} or {#4} for 4 numbers. * Add more patterns DONE x Fix read position of panels when window is not maximized x Ignore next errors dialog x Music rename: hachoir > eyed3 > none x Fix bug while renaming folders recursively x Fix repeated symbols (... -> . | __ -> _ | ' ' -> ' ') x Fix file selected on changing to manual renaming x Auto preview x Reload folder x Start on hidden directory x End saving patterns: x Direct save x Remember default combo option x Undo last rename: x Use a list with the changes - Display a window before undoing with the changes????? x Fix exceptions causing apport to report bugs on launchpad x New icon x Fix bugs: x Empty name + Extension x try: except: music and images x Add support from other music formats (ogg, ape, etc.) x Rename folder x Move files to another directories (target/$1) x Keep extensions while renaming x Unicode problems: - For example, if I have the file "Episódio 2.srt", I can use the pattern '{X} {C}.srt' but not 'Episódio {C}.srt'. pyrenamer-0.6.0/data/0000777000175000017500000000000011064200212011421 500000000000000pyrenamer-0.6.0/data/pyrenamer.desktop.in.in.in0000644000175000017500000000027410777177733016413 00000000000000[Desktop Entry] _Name=pyRenamer _Comment=Mass rename files Exec=@BINDIR@/pyrenamer Icon=@RESOURCEDIR@/pyrenamer.png Terminal=false Type=Application Categories=GNOME;GTK;Utility;FileTools; pyrenamer-0.6.0/data/Makefile.am0000644000175000017500000000314710656417561013425 00000000000000################################### ### Initialization ################################### EXTRA_DIST = DISTCLEANFILES = ################################### ### Desktop file ################################### @INTLTOOL_DESKTOP_RULE@ desktop_in_files = pyrenamer.desktop.in.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop) pyrenamer.desktop.in: pyrenamer.desktop.in.in sed \ -e s!\@RESOURCEDIR\@!$(datadir)/$(PACKAGE_NAME)! \ -e s!\@BINDIR\@!$(bindir)! \ < $< > $@ EXTRA_DIST += pyrenamer.desktop.in.in.in DISTCLEANFILES += $(desktop_DATA) pyrenamer.desktop.in ################################### ### Glade ################################### gladedir = $(pkgdatadir) glade_DATA = pyrenamer.glade EXTRA_DIST += $(glade_DATA) ################################### ### Gconf schemas ################################### @INTLTOOL_SCHEMAS_RULE@ schemadir = $(GCONF_SCHEMA_FILE_DIR) schema_in_files = pyrenamer.schemas.in schema_DATA = $(schema_in_files:.schemas.in=.schemas) EXTRA_DIST += $(schema_in_files) DISTCLEANFILES += $(schema_DATA) install-data-local: install-schemas uninstall-local: uninstall-schemas install-schemas: $(schema_DATA) if test -z "$(DESTDIR)" ; then \ for p in $^ ; do \ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ $(GCONFTOOL) \ --makefile-install-rule \ $(top_builddir)/data/$$p; \ done \ fi uninstall-schemas: $(schema_DATA) if test -z "$(DESTDIR)" ; then \ for p in $^ ; do \ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ $(GCONFTOOL) \ --makefile-uninstall-rule \ $(top_builddir)/data/$$p; \ done \ fipyrenamer-0.6.0/data/pyrenamer.schemas.in0000644000175000017500000000705211063757671015346 00000000000000 /schemas/apps/pyrenamer/root_dir /apps/pyrenamer/root_dir pyrenamer string Default root dir /schemas/apps/pyrenamer/active_dir /apps/pyrenamer/active_dir pyrenamer string Default active dir /schemas/apps/pyrenamer/window_maximized /apps/pyrenamer/window_maximized pyrenamer bool 0 Is the window maximized? /schemas/apps/pyrenamer/pane_position /apps/pyrenamer/pane_position pyrenamer int 250 Position of the pane separator /schemas/apps/pyrenamer/window_width /apps/pyrenamer/window_width pyrenamer int 500 Window width /schemas/apps/pyrenamer/window_height /apps/pyrenamer/window_height pyrenamer int 500 Window height /schemas/apps/pyrenamer/window_posx /apps/pyrenamer/window_posx pyrenamer int 0 X position of the window /schemas/apps/pyrenamer/window_posy /apps/pyrenamer/window_posy pyrenamer int 0 Y position of the window /schemas/apps/pyrenamer/options_shown /apps/pyrenamer/options_shown pyrenamer bool 0 Display the options pane /schemas/apps/pyrenamer/options_filedir /apps/pyrenamer/options_filedir pyrenamer int 0 Rename files or directories 0: Rename files / 1: Rename directories / 2: Rename files and directories /schemas/apps/pyrenamer/keepext /apps/pyrenamer/keepext pyrenamer bool 0 Keep files extensions /schemas/apps/pyrenamer/autopreview /apps/pyrenamer/autopreview pyrenamer bool 0 Auto preview changes pyrenamer-0.6.0/data/pyrenamer.glade0000644000175000017500000037630111063513447014367 00000000000000 True pyRenamer 700 500 True True True _File True True _Preview True True gtk-find 1 True _Rename True True gtk-apply 1 True True _Load names from file... True True gtk-open 1 True True C_lear Preview True True gtk-clear 1 True True gtk-quit True True True _Edit True True gtk-undo True True True gtk-redo True True True True gtk-cut True True True gtk-copy True True True gtk-paste True True True gtk-clear True True True True Select _all True True gtk-select-all 1 True Select _nothing True True True gtk-preferences True True True _View True True gtk-refresh True True True True Patterns True True Substitutions True True Insert / Delete True True Manual rename True True Images True True Music True True True Show options True True True _Help True True gtk-about True True False False True 12 12 True True True 6 True True 0 <b>Options</b> True True GTK_RELIEF_NONE False 0 True gtk-close 1 False False 1 False True True 6 True Files Directories Files and directories False True 12 True 0 Selection pattern True False False 75 True True * Select every visible file *.jpg Select just files that end with the "jpg" extension Select every file (including hidden ones) .* Select files starting by "." * False False 1 False False 1 True True Add files recursively True 0 True False False 2 True True Keep extensions True 0 True False False 3 True True Preview automatically True 0 True False False 4 1 False False 1 1 True 12 12 True True True True 12 4 4 6 6 True Use {1} for first catched item. {2} for second, etc... Use {num} for adding 1, 2, 3... to file names Use {num2} for 01, 02, 03..... Use {num3} for 001, 002, 003... Use {num+10} for 10, 11, 12... Use {num2+10} for 010, 011, 012... Use {dir} for getting current dir Some today date replacements: {date} 22feb1980 {year} 1980 {month} 02 {monthname} february {monthsimp} feb {day} 22 {dayname} friday {daysimp} fri Random number replacements: {rand} is random number between 0 and 100. {rand,3} is random number between 0 and 100 of 3 digits (012) {rand500} is random number between 0 and 500 {rand10-20} is random number between 10 and 20 {rand20,5} is random number between 0 and 20 of 5 digits (00012) True True 1 2 2 3 True {#} Numbers {L} Letters {C} Characters (numbers and letters, not spaces) {X} Numbers, letters, and spaces {@} Trash True True 1 2 1 2 True True 0 True gtk-edit 1 3 4 2 3 GTK_FILL True True 0 True gtk-save 1 2 3 2 3 True True 0 True gtk-edit 1 3 4 1 2 True True 0 True gtk-save 1 2 3 1 2 True 0 12 4 <i>Put the mouse over the text fields to get help on which patterns you can use</i> True 4 3 4 GTK_FILL True 0 <b>Rename files using patterns</b> True 4 GTK_FILL True 0 12 Renamed file name pattern True 2 3 GTK_FILL True 0 12 Original file name pattern True 1 2 GTK_FILL True Patterns tab False True 12 5 2 6 6 True False Spaces to Underscores Underscores to Spaces Spaces to Dots Dots to Spaces Spaces to Dashes Dashes to Spaces 1 2 1 2 GTK_FILL True 6 100 True False True True False with False False 1 100 True False True 2 1 2 2 3 GTK_FILL True True Remove accents True 0 True 4 5 GTK_FILL 12 True False All uppercase All downcase First letter uppercase First letter uppercase of each word 1 2 3 4 GTK_FILL True True Capitalization True 0 True 3 4 GTK_FILL 12 True True Replace True 0 True 2 3 GTK_FILL 12 True True Spaces True 0 True 1 2 GTK_FILL 12 True 0 <b>Common substitutions</b> True 2 GTK_FILL True True Changes: ..... to . ---- to - ____ to _ ' ' to ' ' Fix duplicated symbols 0 True 1 2 4 5 GTK_FILL 1 False True Substitutions tab 1 False True 12 3 1 6 6 True 12 True True Delete from True 0 True insert_radio False False True True 1 1 1000 1 10 10 1 False 1 True to False False 2 True True 5 1 1000 1 10 10 1 False 3 2 3 GTK_FILL 12 True 0 <b>Insert or delete characters from filenames</b> True GTK_FILL True 12 True True Insert True 0 True False False True True 1 True at False False 2 True True 1 1 1000 1 10 10 1 False 3 True True or at the end True 0 True False False 4 1 2 12 2 True Insert / Delete tab 2 False True 12 3 2 6 6 True 0 <b>Rename files manually</b> True 2 GTK_FILL True True 1 2 1 2 True 0 12 New file name 1 2 GTK_FILL True 0 12 4 <i>Select the file to rename, change its name and click Preview</i> True 2 2 3 GTK_FILL 3 True Manual rename tab 3 False True 12 4 4 6 6 True Image metadata replacements: {imagewidth} 640 {imageheight} 480 {cameramaker} Nikon {cameramodel} D-50 {imagedate} 22feb1980 {imageyear} 1980 {imagemonth} 02 {imagemonthname} february {imagemonthsimp} feb {imageday} 22 {imagedayname} friday {imagedaysimp} fri {imagetime} 13_56_02 {imagehour} 13 {imageminute} 56 {imagesecond} 02 Common replacements: Use {1} for first catched item. {2} for second, etc... Use {num} for adding 1, 2, 3... to file names Use {num2} for 01, 02, 03..... Use {num3} for 001, 002, 003... Use {num+10} for 10, 11, 12... Use {num2+10} for 010, 011, 012... Use {dir} for getting current dir Some today date replacements: {date} 22feb1980 {year} 1980 {month} 02 {monthname} february {monthsimp} feb {day} 22 {dayname} friday {daysimp} fri Random number replacements: {rand} is random number between 0 and 100. {rand,3} is random number between 0 and 100 of 3 digits (012) {rand500} is random number between 0 and 500 {rand10-20} is random number between 10 and 20 {rand20,5} is random number between 0 and 20 of 5 digits (00012) True True 1 2 2 3 True {#} Numbers {L} Letters {C} Characters (numbers and letters, not spaces) {X} Numbers, letters, and spaces {@} Trash True True 1 2 1 2 True True 0 True gtk-edit 1 3 4 2 3 GTK_FILL True True 0 True gtk-save 1 2 3 2 3 GTK_FILL True True 0 True gtk-edit 1 3 4 1 2 GTK_FILL True True 0 True gtk-save 1 2 3 1 2 GTK_FILL True 0 12 4 <i>Put the mouse over the text fields to get help on which patterns you can use</i> True 4 3 4 GTK_FILL True 0 <b>Rename images using their metadata</b> True 4 GTK_FILL True 0 12 Renamed file name pattern True 2 3 GTK_FILL True 0 12 Original file name pattern True 1 2 GTK_FILL 4 True Images tab 4 False True 12 4 4 6 6 True Music metadata replacements: {artist} AnxiA {title} El mundo no es una mercancía {album} Jóven pájaro negro muerto {track} 02 {tracktotal} 10 {myear} 2006 {genre} Hardcore Common replacements: Use {1} for first catched item. {2} for second, etc... Use {num} for adding 1, 2, 3... to file names Use {num2} for 01, 02, 03..... Use {num3} for 001, 002, 003... Use {num+10} for 10, 11, 12... Use {num2+10} for 010, 011, 012... Use {dir} for getting current dir Some today date replacements: {date} 22feb1980 {year} 1980 {month} 02 {monthname} february {monthsimp} feb {day} 22 {dayname} friday {daysimp} fri Random number replacements: {rand} is random number between 0 and 100. {rand,3} is random number between 0 and 100 of 3 digits (012) {rand500} is random number between 0 and 500 {rand10-20} is random number between 10 and 20 {rand20,5} is random number between 0 and 20 of 5 digits (00012) True True 1 2 2 3 True {#} Numbers {L} Letters {C} Characters (numbers and letters, not spaces) {X} Numbers, letters, and spaces {@} Trash True True 1 2 1 2 True True 0 True gtk-edit 1 3 4 2 3 GTK_FILL True True 0 True gtk-edit 1 3 4 1 2 GTK_FILL True True 0 True gtk-save 1 2 3 2 3 GTK_FILL True True 0 True gtk-save 1 2 3 1 2 GTK_FILL True 0 12 4 <i>Put the mouse over the text fields to get help on which patterns you can use</i> True 4 3 4 GTK_FILL True 0 <b>Rename music using its metadata</b> True 4 GTK_FILL True 0 12 Renamed file name pattern True 2 3 GTK_FILL True 0 12 Original file name pattern True 1 2 GTK_FILL 5 True Music tab 5 False True 25 True 10 True True True True True True 0 True 0 0 True 2 True gtk-find False False True _Preview True False False 1 False False True True True False 0 True 0 0 True 2 True gtk-clear False False True C_lear True False False 1 False False 1 True True True 0 True 0 0 True 2 True gtk-apply False False True _Rename True False False 1 False False 2 True True True gtk-quit True 0 False False 3 False False 1 False 2 True False False 3 True pyRenamer preferences False GDK_WINDOW_TYPE_HINT_DIALOG True True 12 True 0 <b>Default directories</b> True False False True 6 4 3 6 6 True 0 6 <i>The parent of the directories tree</i> True 3 1 2 GTK_FILL True 0 6 <i>The default selected directory</i> True 3 3 4 GTK_FILL True 0 6 Active 2 3 GTK_FILL True 0 6 Root GTK_FILL 300 True True 1 2 True True 0 True 0 0 True 2 True gtk-open False False True Browse... True False False 1 2 3 2 3 True True 0 True 0 0 True 2 True gtk-open False False True Browse... True False False 1 2 3 300 True True 1 2 2 3 False 1 False True 12 GTK_BUTTONBOX_END True True True gtk-close True 0 False 1 True Pattern editor True GTK_WIN_POS_CENTER True 12 12 300 300 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN True True True True True 6 GTK_BUTTONBOX_START True True True gtk-add True 0 True True True gtk-remove True 0 1 True True True gtk-edit True 0 2 True True True gtk-go-up True 0 3 True True True gtk-go-down True 0 4 True True True gtk-close True 0 False False 1 False 1 5 Add pattern True GTK_WIN_POS_CENTER_ON_PARENT GDK_WINDOW_TYPE_HINT_DIALOG False True 2 True 6 True 0 Pattern: False True True 1 False False 1 True GTK_BUTTONBOX_END True True True gtk-cancel True 0 True True True gtk-ok True 1 1 False GTK_PACK_END pyrenamer-0.6.0/data/Makefile.in0000644000175000017500000003445611064200175013426 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/pyrenamer.desktop.in.in.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = pyrenamer.desktop.in.in SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(gladedir)" \ "$(DESTDIR)$(schemadir)" desktopDATA_INSTALL = $(INSTALL_DATA) gladeDATA_INSTALL = $(INSTALL_DATA) schemaDATA_INSTALL = $(INSTALL_DATA) DATA = $(desktop_DATA) $(glade_DATA) $(schema_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ################################### ### Initialization ################################### EXTRA_DIST = pyrenamer.desktop.in.in.in $(glade_DATA) \ $(schema_in_files) DISTCLEANFILES = $(desktop_DATA) pyrenamer.desktop.in $(schema_DATA) desktop_in_files = pyrenamer.desktop.in.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop) ################################### ### Glade ################################### gladedir = $(pkgdatadir) glade_DATA = pyrenamer.glade schemadir = $(GCONF_SCHEMA_FILE_DIR) schema_in_files = pyrenamer.schemas.in schema_DATA = $(schema_in_files:.schemas.in=.schemas) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh pyrenamer.desktop.in.in: $(top_builddir)/config.status $(srcdir)/pyrenamer.desktop.in.in.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ done install-gladeDATA: $(glade_DATA) @$(NORMAL_INSTALL) test -z "$(gladedir)" || $(MKDIR_P) "$(DESTDIR)$(gladedir)" @list='$(glade_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(gladeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(gladedir)/$$f'"; \ $(gladeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(gladedir)/$$f"; \ done uninstall-gladeDATA: @$(NORMAL_UNINSTALL) @list='$(glade_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(gladedir)/$$f'"; \ rm -f "$(DESTDIR)$(gladedir)/$$f"; \ done install-schemaDATA: $(schema_DATA) @$(NORMAL_INSTALL) test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)" @list='$(schema_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(schemaDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemadir)/$$f'"; \ $(schemaDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemadir)/$$f"; \ done uninstall-schemaDATA: @$(NORMAL_UNINSTALL) @list='$(schema_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(schemadir)/$$f'"; \ rm -f "$(DESTDIR)$(schemadir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(gladedir)" "$(DESTDIR)$(schemadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-data-local install-desktopDATA \ install-gladeDATA install-schemaDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-desktopDATA uninstall-gladeDATA \ uninstall-local uninstall-schemaDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-desktopDATA install-dvi \ install-dvi-am install-exec install-exec-am install-gladeDATA \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-schemaDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-desktopDATA \ uninstall-gladeDATA uninstall-local uninstall-schemaDATA ################################### ### Desktop file ################################### @INTLTOOL_DESKTOP_RULE@ pyrenamer.desktop.in: pyrenamer.desktop.in.in sed \ -e s!\@RESOURCEDIR\@!$(datadir)/$(PACKAGE_NAME)! \ -e s!\@BINDIR\@!$(bindir)! \ < $< > $@ ################################### ### Gconf schemas ################################### @INTLTOOL_SCHEMAS_RULE@ install-data-local: install-schemas uninstall-local: uninstall-schemas install-schemas: $(schema_DATA) if test -z "$(DESTDIR)" ; then \ for p in $^ ; do \ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ $(GCONFTOOL) \ --makefile-install-rule \ $(top_builddir)/data/$$p; \ done \ fi uninstall-schemas: $(schema_DATA) if test -z "$(DESTDIR)" ; then \ for p in $^ ; do \ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ $(GCONFTOOL) \ --makefile-uninstall-rule \ $(top_builddir)/data/$$p; \ done \ fi # 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. .NOEXPORT: pyrenamer-0.6.0/intltool-update.in0000644000175000017500000007442611064200174014124 00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Updater # # Copyright (C) 2000-2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Maciej Stachowiak # Darin Adler ## Release information my $PROGRAM = "intltool-update"; my $VERSION = "0.37.1"; my $PACKAGE = "intltool"; ## Loaded modules use strict; use Getopt::Long; use Cwd; use File::Copy; use File::Find; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $DIST_ARG = 0; my $POT_ARG = 0; my $HEADERS_ARG = 0; my $MAINTAIN_ARG = 0; my $REPORT_ARG = 0; my $VERBOSE = 0; my $GETTEXT_PACKAGE = ""; my $OUTPUT_FILE = ""; my @languages; my %varhash = (); my %po_files_by_lang = (); # Regular expressions to categorize file types. # FIXME: Please check if the following is correct my $xml_support = "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) "ui|". # Bonobo specific - User Interface desc. files "lang|". # ? "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) "scm(?:\\.in)*|". # ? (Note: .in is not required) "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files "etspec|". # ? "server(?:\\.in)+|". # Bonobo specific "sheet(?:\\.in)+|". # ? "schemas(?:\\.in)+|". # GConf specific "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. "kbd(?:\\.in)+|". # GOK specific. "policy(?:\\.in)+"; # PolicyKit files my $ini_support = "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "caves(?:\\.in)+|". # GNOME Games specific "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "soundlist(?:\\.in)+|". # GNOME specific "keys(?:\\.in)+|". # GNOME Mime database specific "theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "service(?:\\.in)+"; # DBus specific my $buildin_gettext_support = "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; ## Always flush buffer when printing $| = 1; ## Sometimes the source tree will be rooted somewhere else. my $SRCDIR = $ENV{"srcdir"} || "."; my $POTFILES_in; $POTFILES_in = "<$SRCDIR/POTFILES.in"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "dist|d" => \$DIST_ARG, "pot|p" => \$POT_ARG, "headers|s" => \$HEADERS_ARG, "maintain|m" => \$MAINTAIN_ARG, "report|r" => \$REPORT_ARG, "verbose|x" => \$VERBOSE, "gettext-package|g=s" => \$GETTEXT_PACKAGE, "output-file|o=s" => \$OUTPUT_FILE, ) or &Console_WriteError_InvalidOption; &Console_Write_IntltoolHelp if $HELP_ARG; &Console_Write_IntltoolVersion if $VERSION_ARG; my $arg_count = ($DIST_ARG > 0) + ($POT_ARG > 0) + ($HEADERS_ARG > 0) + ($MAINTAIN_ARG > 0) + ($REPORT_ARG > 0); &Console_Write_IntltoolHelp if $arg_count > 1; my $PKGNAME = FindPackageName (); # --version and --help don't require a module name my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown"; if ($POT_ARG) { &GenerateHeaders; &GeneratePOTemplate; } elsif ($HEADERS_ARG) { &GenerateHeaders; } elsif ($MAINTAIN_ARG) { &FindLeftoutFiles; } elsif ($REPORT_ARG) { &GenerateHeaders; &GeneratePOTemplate; &Console_Write_CoverageReport; } elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) { my $lang = $ARGV[0]; ## Report error if the language file supplied ## to the command line is non-existent &Console_WriteError_NotExisting("$SRCDIR/$lang.po") if ! -s "$SRCDIR/$lang.po"; if (!$DIST_ARG) { print "Working, please wait..." if $VERBOSE; &GenerateHeaders; &GeneratePOTemplate; } &POFile_Update ($lang, $OUTPUT_FILE); &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); } else { &Console_Write_IntltoolHelp; } exit; ######### sub Console_Write_IntltoolVersion { print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. Copyright (C) 2000-2003 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. _EOF_ exit; } sub Console_Write_IntltoolHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... LANGCODE Updates PO template files and merge them with the translations. Mode of operation (only one is allowed): -p, --pot generate the PO template only -s, --headers generate the header files in POTFILES.in -m, --maintain search for left out files from POTFILES.in -r, --report display a status report for the module -d, --dist merge LANGCODE.po with existing PO template Extra options: -g, --gettext-package=NAME override PO template name, useful with --pot -o, --output-file=FILE write merged translation to FILE -x, --verbose display lots of feedback --help display this help and exit --version output version information and exit Examples of use: ${PROGRAM} --pot just create a new PO template ${PROGRAM} xy create new PO template and merge xy.po with it Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } sub echo_n { my $str = shift; my $ret = `echo "$str"`; $ret =~ s/\n$//; # do we need the "s" flag? return $ret; } sub POFile_DetermineType ($) { my $type = $_; my $gettext_type; my $xml_regex = "(?:" . $xml_support . ")"; my $ini_regex = "(?:" . $ini_support . ")"; my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; if ($type =~ /\[type: gettext\/([^\]].*)]/) { $gettext_type=$1; } elsif ($type =~ /schemas(\.in)+$/) { $gettext_type="schemas"; } elsif ($type =~ /glade2?(\.in)*$/) { $gettext_type="glade"; } elsif ($type =~ /scm(\.in)*$/) { $gettext_type="scheme"; } elsif ($type =~ /keys(\.in)+$/) { $gettext_type="keys"; } # bucket types elsif ($type =~ /$xml_regex$/) { $gettext_type="xml"; } elsif ($type =~ /$ini_regex$/) { $gettext_type="ini"; } elsif ($type =~ /$buildin_regex$/) { $gettext_type="buildin"; } else { $gettext_type="unknown"; } return "gettext\/$gettext_type"; } sub TextFile_DetermineEncoding ($) { my $gettext_code="ASCII"; # All files are ASCII by default my $filetype=`file $_ | cut -d ' ' -f 2`; if ($? eq "0") { if ($filetype =~ /^(ISO|UTF)/) { chomp ($gettext_code = $filetype); } elsif ($filetype =~ /^XML/) { $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 } } return $gettext_code; } sub isNotValidMissing { my ($file) = @_; return if $file =~ /^\{arch\}\/.*$/; return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; } sub FindLeftoutFiles { my (@buf_i18n_plain, @buf_i18n_xml, @buf_i18n_xml_unmarked, @buf_i18n_ini, @buf_potfiles, @buf_potfiles_ignore, @buf_allfiles, @buf_allfiles_sorted, @buf_potfiles_sorted, @buf_potfiles_ignore_sorted ); ## Search and find all translatable files find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, ".."; find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, "$SRCDIR/.." if "$SRCDIR" ne "."; open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; @buf_potfiles = grep !/^(#|\s*$)/, ; close POTFILES; foreach (@buf_potfiles) { s/^\[.*]\s*//; } print "Searching for missing translatable files...\n" if $VERBOSE; ## Check if we should ignore some found files, when ## comparing with POTFILES.in foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") { (-s "$SRCDIR/$ignore") or next; if ("$ignore" eq "POTFILES.ignore") { print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". "content of this file to POTFILES.skip.\n"; } print "Found $ignore: Ignoring files...\n" if $VERBOSE; open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n"; while () { push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; } close FILE; @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore); } foreach my $file (@buf_i18n_plain) { my $in_comment = 0; my $in_macro = 0; open FILE, "<$file"; while () { # Handle continued multi-line comment. if ($in_comment) { next unless s-.*\*/--; $in_comment = 0; } # Handle continued macro. if ($in_macro) { $in_macro = 0 unless /\\$/; next; } # Handle start of macro (or any preprocessor directive). if (/^\s*\#/) { $in_macro = 1 if /^([^\\]|\\.)*\\$/; next; } # Handle comments and quoted text. while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy { my $match = $1; if ($match eq "/*") { if (!s-/\*.*?\*/--) { s-/\*.*--; $in_comment = 1; } } elsif ($match eq "//") { s-//.*--; } else # ' or " { if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) { warn "mismatched quotes at line $. in $file\n"; s-$match.*--; } } } if (/\w\.GetString *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } ## C_ N_ Q_ and _ are the macros defined in gi8n.h if (/[CNQ]?_ *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml) { open FILE, "<$file"; while () { # FIXME: share the pattern matching code with intltool-extract if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_ini) { open FILE, "<$file"; while () { if (/_(.*)=/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml_unmarked) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } } @buf_allfiles_sorted = sort (@buf_allfiles); @buf_potfiles_sorted = sort (@buf_potfiles); my %in2; foreach (@buf_potfiles_sorted) { s#^$SRCDIR/../##; s#^$SRCDIR/##; $in2{$_} = 1; } foreach (@buf_potfiles_ignore_sorted) { s#^$SRCDIR/../##; s#^$SRCDIR/##; $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { my $dummy = $_; my $srcdir = $SRCDIR; $srcdir =~ s#^../##; $dummy =~ s#^$srcdir/../##; $dummy =~ s#^$srcdir/##; $dummy =~ s#_build/##; if (!exists($in2{$dummy})) { push @result, $dummy } } my @buf_potfiles_notexist; foreach (@buf_potfiles_sorted) { chomp (my $dummy = $_); if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy")) { push @buf_potfiles_notexist, $_; } } ## Save file with information about the files missing ## if any, and give information about this procedure. if (@result + @buf_potfiles_notexist > 0) { if (@result) { print "\n" if $VERBOSE; unlink "missing"; open OUT, ">missing"; print OUT @result; close OUT; warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; print STDERR @result, "\n"; warn "If some of these files are left out on purpose then please add them to\n". "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". "of left out files has been written in the current directory.\n"; } if (@buf_potfiles_notexist) { unlink "notexist"; open OUT, ">notexist"; print OUT @buf_potfiles_notexist; close OUT; warn "\n" if ($VERBOSE or @result); warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; warn @buf_potfiles_notexist, "\n"; warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n". "containing this list of absent files has been written in the current directory.\n"; } } ## If there is nothing to complain about, notify the user else { print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; } } sub Console_WriteError_InvalidOption { ## Handle invalid arguments print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } sub isProgramInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file --version >$devnull") == 0)); return 0; } sub isGNUGettextTool { my ($file) = @_; # Check that we are using GNU gettext tools if (isProgramInPath ($file)) { my $version = `$file --version`; return 1 if ($version =~ m/.*\(GNU .*\).*/); } return 0; } sub GenerateHeaders { my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract"; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! isProgramInPath ("$EXTRACT")) { print STDERR "\n *** The intltool-extract script wasn't found!" ."\n *** Without it, intltool-update can not generate files.\n"; exit; } else { open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; while () { chomp; next if /^\[\s*encoding/; ## Find xml files in POTFILES.in and generate the ## files with help from the extract script my $gettext_type= &POFile_DetermineType ($1); if (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[[^\[].*]\s*//; my $filename = "../$_"; if ($VERBOSE) { system ($EXTRACT, "--update", "--srcdir=$SRCDIR", "--type=$gettext_type", $filename); } else { system ($EXTRACT, "--update", "--type=$gettext_type", "--srcdir=$SRCDIR", "--quiet", $filename); } } } close FILE; } } # # Generate .pot file from POTFILES.in # sub GeneratePOTemplate { my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! isGNUGettextTool ("$XGETTEXT")) { print STDERR " *** GNU xgettext is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Building $MODULE.pot...\n" if $VERBOSE; open INFILE, $POTFILES_in; unlink "POTFILES.in.temp"; open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); my $gettext_support_nonascii = 0; # checks for GNU gettext >= 0.12 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; if ($? == 0) { $gettext_support_nonascii = 1; } else { # urge everybody to upgrade gettext print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". " strings. That means you should install a version of gettext\n". " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". " or have to let non-ASCII strings untranslated. (If there is any)\n"; } my $encoding = "ASCII"; my $forced_gettext_code; my @temp_headers; my $encoding_problem_is_reported = 0; while () { next if (/^#/ or /^\s*$/); chomp; my $gettext_code; if (/^\[\s*encoding:\s*(.*)\s*\]/) { $forced_gettext_code=$1; } elsif (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[.*]\s*//; print OUTFILE "../$_.h\n"; push @temp_headers, "../$_.h"; $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); } else { print OUTFILE "$SRCDIR/../$_\n"; $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); } next if (! $gettext_support_nonascii); if (defined $forced_gettext_code) { $encoding=$forced_gettext_code; } elsif (defined $gettext_code and "$encoding" ne "$gettext_code") { if ($encoding eq "ASCII") { $encoding=$gettext_code; } elsif ($gettext_code ne "ASCII") { # Only report once because the message is quite long if (! $encoding_problem_is_reported) { print STDERR "WARNING: You should use the same file encoding for all your project files,\n". " but $PROGRAM thinks that most of the source files are in\n". " $encoding encoding, while \"$_\" is (likely) in\n". " $gettext_code encoding. If you are sure that all translatable strings\n". " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". " line to POTFILES.in:\n\n". " [encoding: UTF-8]\n\n". " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". "(such warning message will only be reported once.)\n"; $encoding_problem_is_reported = 1; } } } } close OUTFILE; close INFILE; unlink "$MODULE.pot"; my @xgettext_argument=("$XGETTEXT", "--add-comments", "--directory\=.", "--default-domain\=$MODULE", "--flag\=g_strdup_printf:1:c-format", "--flag\=g_string_printf:2:c-format", "--flag\=g_string_append_printf:2:c-format", "--flag\=g_error_new:3:c-format", "--flag\=g_set_error:4:c-format", "--flag\=g_markup_printf_escaped:1:c-format", "--flag\=g_log:3:c-format", "--flag\=g_print:1:c-format", "--flag\=g_printerr:1:c-format", "--flag\=g_printf:1:c-format", "--flag\=g_fprintf:2:c-format", "--flag\=g_sprintf:2:c-format", "--flag\=g_snprintf:3:c-format", "--flag\=g_scanner_error:2:c-format", "--flag\=g_scanner_warn:2:c-format", "--output\=$MODULE\.pot", "--files-from\=\.\/POTFILES\.in\.temp"); my $XGETTEXT_KEYWORDS = &FindPOTKeywords; push @xgettext_argument, $XGETTEXT_KEYWORDS; my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS; push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; my $xgettext_command = join ' ', @xgettext_argument; # intercept xgettext error message print "Running $xgettext_command\n" if $VERBOSE; my $xgettext_error_msg = `$xgettext_command 2>\&1`; my $command_failed = $?; unlink "POTFILES.in.temp"; print "Removing generated header (.h) files..." if $VERBOSE; unlink foreach (@temp_headers); print "done.\n" if $VERBOSE; if (! $command_failed) { if (! -e "$MODULE.pot") { print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; } else { print "Wrote $MODULE.pot\n" if $VERBOSE; } } else { if ($xgettext_error_msg =~ /--from-code/) { # replace non-ASCII error message with a more useful one. print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". " string marked for translation. Please make sure that all strings marked\n". " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". " following line to POTFILES.in and rerun $PROGRAM:\n\n". " [encoding: UTF-8]\n\n"; } else { print STDERR "$xgettext_error_msg"; if (-e "$MODULE.pot") { # is this possible? print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". " Please consult error message above if there is any.\n"; } else { print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". " error message above if there is any.\n"; } } exit (1); } } sub POFile_Update { -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge"; my ($lang, $outfile) = @_; if (! isGNUGettextTool ("$MSGMERGE")) { print STDERR " *** GNU msgmerge is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; my $infile = "$SRCDIR/$lang.po"; $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); # I think msgmerge won't overwrite old file if merge is not successful system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); } sub Console_WriteError_NotExisting { my ($file) = @_; ## Report error if supplied language file is non-existing print STDERR "$PROGRAM: $file does not exist!\n"; print STDERR "Try '$PROGRAM --help' for more information.\n"; exit; } sub GatherPOFiles { my @po_files = glob ("./*.po"); @languages = map (&POFile_GetLanguage, @po_files); foreach my $lang (@languages) { $po_files_by_lang{$lang} = shift (@po_files); } } sub POFile_GetLanguage ($) { s/^(.*\/)?(.+)\.po$/$2/; return $_; } sub Console_Write_TranslationStatus { my ($lang, $output_file) = @_; my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; if (! isGNUGettextTool ("$MSGFMT")) { print STDERR " *** GNU msgfmt is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; if (! isGNUGettextTool ("$MSGFMT")) { print STDERR " *** GNU msgfmt is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } &GatherPOFiles; foreach my $lang (@languages) { print STDERR "$lang: "; &POFile_Update ($lang, ""); } print STDERR "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print STDERR "$lang: "; system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); } } sub SubstituteVariable { my ($str) = @_; # always need to rewind file whenever it has been accessed seek (CONF, 0, 0); # cache each variable. varhash is global to we can add # variables elsewhere. while () { if (/^(\w+)=(.*)$/) { ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; } } if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) { my $rest = $3; my $untouched = $1; my $sub = ""; # Ignore recursive definitions of variables $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; return SubstituteVariable ("$untouched$sub$rest"); } # We're using Perl backticks ` and "echo -n" here in order to # expand any shell escapes (such as backticks themselves) in every variable return echo_n ($str); } sub CONF_Handle_Open { my $base_dirname = getcwd(); $base_dirname =~ s@.*/@@; my ($conf_in, $src_dir); if ($base_dirname =~ /^po(-.+)?$/) { if (-f "Makevars") { my $makefile_source; local (*IN); open (IN, ") { if (/^top_builddir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; if (-f "$src_dir" . "/configure.ac") { $conf_in = "$src_dir" . "/configure.ac" . "\n"; } else { $conf_in = "$src_dir" . "/configure.in" . "\n"; } last; } } close IN; $conf_in || die "Cannot find top_builddir in Makevars."; } elsif (-f "$SRCDIR/../configure.ac") { $conf_in = "$SRCDIR/../configure.ac"; } elsif (-f "$SRCDIR/../configure.in") { $conf_in = "$SRCDIR/../configure.in"; } else { my $makefile_source; local (*IN); open (IN, ") { if (/^top_srcdir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; $conf_in = "$src_dir" . "/configure.in" . "\n"; last; } } close IN; $conf_in || die "Cannot find top_srcdir in Makefile."; } open (CONF, "<$conf_in"); } else { print STDERR "$PROGRAM: Unable to proceed.\n" . "Make sure to run this script inside the po directory.\n"; exit; } } sub FindPackageName { my $version; my $domain = &FindMakevarsDomain; my $name = $domain || "untitled"; &CONF_Handle_Open; my $conf_source; { local (*IN); open (IN, "<&CONF") || return $name; seek (IN, 0, 0); local $/; # slurp mode $conf_source = ; close IN; } # priority for getting package name: # 1. GETTEXT_PACKAGE # 2. first argument of AC_INIT (with >= 2 arguments) # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m # the \s makes this not work, why? if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } # \s makes this not work, why? $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; $name = $domain if $domain; $name = SubstituteVariable ($name); $name =~ s/^["'](.*)["']$/$1/; return $name if $name; } sub FindPOTKeywords { my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; my $varname = "XGETTEXT_OPTIONS"; my $make_source; { local (*IN); open (IN, "; close IN; } # unwrap lines split with a trailing \ $make_source =~ s/\\ $ \n/ /mxg; $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; return $keywords; } sub FindMakevarsDomain { my $domain = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; $domain =~ s/^\s+//; $domain =~ s/\s+$//; return $domain; } sub FindMakevarsBugAddress { my $address = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; $address =~ s/^\s+//; $address =~ s/\s+$//; return $address; } pyrenamer-0.6.0/config.guess0000755000175000017500000012703510722626717013002 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-03-06' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pyrenamer-0.6.0/Makefile.in0000644000175000017500000005027611064200176012514 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO config.guess config.sub install-sh \ missing mkinstalldirs py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = data doc images po src DISTCLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update EXTRA_DIST = \ intltool-extract.in \ intltool-merge.in \ intltool-update.in all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # 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. .NOEXPORT: pyrenamer-0.6.0/mkinstalldirs0000755000175000017500000000664711064200176013260 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2006-05-11.19 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pyrenamer-0.6.0/config.sub0000755000175000017500000007763110722626717012453 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-01-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pyrenamer-0.6.0/doc/0000777000175000017500000000000011064200212011255 500000000000000pyrenamer-0.6.0/doc/Makefile.am0000644000175000017500000000021610654337134013246 00000000000000man_MANS = pyrenamer.1 docdir = $(datadir)/doc/pyrenamer doc_DATA = treefilebrowser_example.py EXTRA_DIST = \ $(man_MANS) \ $(doc_DATA) pyrenamer-0.6.0/doc/Makefile.in0000644000175000017500000003113511064200175013251 00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" NROFF = nroff MANS = $(man_MANS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; docDATA_INSTALL = $(INSTALL_DATA) DATA = $(doc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONFTOOL = @GCONFTOOL@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(datadir)/doc/pyrenamer dvidir = @dvidir@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man_MANS = pyrenamer.1 doc_DATA = treefilebrowser_example.py EXTRA_DIST = \ $(man_MANS) \ $(doc_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(doc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ rm -f "$(DESTDIR)$(docdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-docDATA install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man1 install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docDATA uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-docDATA \ uninstall-man uninstall-man1 # 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. .NOEXPORT: pyrenamer-0.6.0/doc/treefilebrowser_example.py0000755000175000017500000000575711002070355016507 00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (C) 2006-2008 Adolfo González Blázquez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. If you find any bugs or have any suggestions email: code@infinicode.org """ """ This is an example on how to use treefilebrowser.py, which is a tree-like file browser, like the one found on Nautilus. """ import pygtk pygtk.require('2.0') import gtk from pyrenamer import treefilebrowser def make_buttons(list): buttonbox = gtk.HBox() buttonbox.set_spacing(10) for label, func in list: button = gtk.Button() button.set_label(label) button.connect("clicked", func) button.show() buttonbox.pack_start(button, expand=False, fill=False) buttonbox.show() return buttonbox tree = None def show_hidden(*args): tree.set_show_hidden(not tree.get_show_hidden()) def show_only_dirs(*args): tree.set_show_only_dirs(not tree.get_show_only_dirs()) def show_rows(*args): tree.set_rules_hint(not tree.get_rules_hint()) def quit(*args): gtk.main_quit() def selected(*args): print tree.get_selected() def expanded(obj, data): print "expanded", data def cursor(obj, data): print "cursor", data def main(): global tree root = '/' acti = '/home' print "Root: %s\nActive dir: %s" % (root, acti) tree = treefilebrowser.TreeFileBrowser(root) tree.set_active_dir(acti) tree.connect('row-expanded', expanded) tree.connect('cursor-changed', cursor) scrolled = tree.get_scrolled() buttonbox = make_buttons([("Toggle show hidden files", show_hidden), ("Toggle show only dirs", show_only_dirs), ("Toggle show rows background", show_rows), ("Selected", selected), ("Quit", quit)]) vbox = gtk.VBox() vbox.set_border_width(10) vbox.set_spacing(10) vbox.pack_start(scrolled, expand=True, fill=True) vbox.pack_start(buttonbox, expand=False, fill=False) vbox.show() # Create toplevel window to show it all. win = gtk.Window(gtk.WINDOW_TOPLEVEL) win.connect("delete_event", gtk.main_quit) win.add(vbox) win.show() win.resize(300, 500) # Run the Gtk+ main loop. gtk.main() if __name__ == "__main__": main()pyrenamer-0.6.0/doc/pyrenamer.10000644000175000017500000000167210657357777013327 00000000000000.TH PYRENAMER 1 .SH NAME pyRenamer \- Mass file renamer .SH SYNOPSIS .B pyrenamer .SH DESCRIPTION .B pyrenamer is a mass file renamer written in PyGTK. You can rename files using patterns, substitutions, insert or delete text, \& or even rename files manually. You can also rename images using their EXIF \& tags and music using their internal tags. .SH OPTIONS .TP .B "-h", "--help" Show summary of options. .TP .BI "-r, --root "rootdir Set root directory to rootdir. .SH HOMEPAGE http://www.infinicode.org/code/pyrenamer/ .SH "AUTHOR" This manual page was written by Adolfo Gonzalez Blazquez for \ the GNU/Linux system (but may be used by others)\&. Permission is granted to copy, \ distribute and/or modify this document under the terms of the GNU General Public License, \ Version 2 any later version published by the Free Software Foundation\&. .PP pyRenamer (C) 2007, Adolfo Gonzalez Blazquez pyrenamer-0.6.0/AUTHORS0000644000175000017500000000006110654337137011516 00000000000000Adolfo González Blázquez pyrenamer-0.6.0/images/0000777000175000017500000000000011064200213011756 500000000000000pyrenamer-0.6.0/images/pyrenamer.svg0000644000175000017500000032056511061514176014445 00000000000000 image/svg+xml A B pyrenamer-0.6.0/images/Makefile.am0000644000175000017500000000030710706077404013746 00000000000000pixmapsdir = $(datadir)/$(PACKAGE_NAME) pixmaps_DATA = \ pyrenamer.png \ pyrenamer.svg \ stop.png icondir = $(datadir)/pixmaps icon_DATA = pyrenamer.png EXTRA_DIST = $(pixmaps_DATA) $(icon_DATA)pyrenamer-0.6.0/images/stop.png0000644000175000017500000000102210706077164013403 00000000000000PNG  IHDR Vu\sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT(=ka;l&$2~!j@AXXezME@IPDAl6k̻~Xe2;p#{"yUliNBs\rm^x.͡KQj{YyDZ7~q.+̶&_+6p""MPg͚[IdvH7|k3ȩyOʹd;9p \aߓ`-k\Cc, Bcc#0S,E: iֻܼU Ñ: tmC*Ax@?IW7:lWav1E:mc~zmZ/+Fke1^^Z9IENDB`pyrenamer-0.6.0/images/pyrenamer.png0000644000175000017500000002770111061514031014414 00000000000000PNG  IHDR>asBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATxyUϩw-IgNgOHH$Q̨, 4m#l^uf訣Ψwg3Uq#dc3,av[z{sTK/DQ?뼧<9Dk1:zI8Fo/QNp1t G9QNp1t G9QNp1t G9QNp1t G9QN^QUD\%g׬^wm-H6H":lF?e&罫upq:3~8 ͫ{zz$hHNk=׬^st]ptӰhimXeZu kJ㈓؅v`>ƦMعsZkkV{m?>t*Pvq,IHDAf( h dD"8dCʋ{ضmZSkVaH3gt*-\@~<8?biG H0Dl͸԰9n^}V5y-gfv;F2 H$I> qI'<91!H#э DG,p/%JRUU͒K?-,FDnim?8it@o2 E%wRpEq־T"E&]Mz:.B%"XKk jQB,D hH%Ļ.:@{?G,8|m;Ȥ3d2UTey{ϧ͈TyyhN ?Fiic}'Ǖnb/"'nP.]JUy]#iB#c@#%v7<} B"DY {v*ҙ*/Y5Z,˪_62v4!@GռO?ĐR  Xx~u`:G,Q(|6G.Ri2 d k>$JyhNQI 1%3NE(~ኺoA cP7 x{TD)8p%tA*A).ʖf&-GOX|^gr` _+z/n b f93 R|@'LJI'ӤRiᤓNbZᮖs]mu\|\Jť(Y7f z~\|ghy,qy$dd!O.馪cS_6oQ?Y^^Zzݞ|`ī!w}vZxF\bh}d/-"h%ڷܸ,TlRRiIA>7n/mZlfGT/r\._P$:J;xb=y/[ZJikͺ8nqxh:LВm^7{؎mK/4~ǎg[D64H6Ϟ=g20OOo? Bw~f x /B@>P(P y B;︓Cq~D**.E%\sԚG;DpClyy6n&Z<-kVXikQd?.$vIzy]03vݵX8hGc+Rh±4btvvrJf8[TE-p>֛{HERyi,eH$ӖΒ'ʖ瞻hkk[Z[֬^66^U ׄcL%a,Ncc_%ڝn,DrJY(Q5Bi 9f#,EGݜ3?ьm۶M6;āٍ֚/['?)Yb"rhLk!s 2aWy9K_3A )#cIYyQ(Pof!bcvS8;Zw8tZ.>tURz-((܈ (E粒f@إv"P*Uŋ0Ob,etDvk_fW\%7GŝQ|!pI$]l߾ys*Y~rL~nim]z7+uhhdb` 5|_6 ~GT={cN̝SH`%x3ƅBoH6E径MH{8 ӑ1*o+ٶk+',: ߨ[sc4=s_]pb̖-֊]2eqɥTnˇ!fCUFY,N#7{:ϠD1f2qA^xE:-:M-M;Π1|eXs ̝ò'!+W]Zڭ[yq-a ;$4z|(-J:!CXܭeYzWWUNKDͶE矏:uŎ3hAS%'_R\>Xʕr)̞=]ko]SN.y.6@lamQ[~Ka#X*/QRBUU59s7w'Mnw3z-eE(G)e!ADPJKkqғ8ih-͟[zPَhtHie%p}Jje;۷~_ߓL&KU׫?n.Z 4~}4pV+`"TBR)RTPo۶mDZ) r9饯W^~:eN{キ 8xlzl[xˏAWo3f͚Yx ?>xVZYn~WJXE==ԡҰbc_MхӟKz+Q$D"ej~B= S;w.KO^gAXxFRQi/ 7XU+oEXd1 _X5k֔J[%W2%aSP<8w~'zApϜ1q3w<̑O7L'6F>_UKU++k~ :KhSCz fE"ovɧ_໘aO55̙3C_Vig6`ɧ̜s&W^~Y{<6ftbSKd=sy]=eW_@$I7MGkڜX 4CƇXޏW^y^xbޗ_ʻXϛϲeKy-e_s>y%kҬt6A  o饭%CCuFV\ɣ Y)d"I*2NV1m /x駭F}wp6r`*`˖xXxQܣO O"G??qWY͛=nXDD2=F?x1Զwֈ۱Y3*6V1CY yKl[ fرbSvmx2`NwFNvq-nd T;CB~jɍRo6nÇ3n\]7 >l-tji&)_M//@$]>unb%AXVd˓313eYN>|5tLkL@oO/w斟f˖p ?v#QqXFouS dE:H߾]LȀ.-k?\\i3 ӣ3ѩK.챬D"¿|̝;d3M~,@@,nd2ՈΣ(IUЛtx ̝773V1wqO}ou\ycciY~- _g\R36F~` Btpttt jҊh)?U*c0tk΍芞 Xիo:ƿhG<#C.MnjVh}8|>ɿ] ~ gu)~K|t~{;86 UNUM'Ql/7P[f:^t&b5wůUth,a FnMO? !|>շjt(цKchSȹBp{좶Ըƥ`VLX'NȊdpiKv^q[niPZƱqzx) ?3g)S؏u6._y]v1,ToySIHs^ɉP5wi͈vj؏i<_?s9bcxU/G >w,#ԓjQq~[ g?>DKDrE޷P#e7ydoq}sfρCF@Qk u̠8o>8y5uL>}NaGKzf.pxUmKoo==A8=k׬ez4t:͹+-2#@6"z6|~t5'c%DIKcs}on BşCkz/W ڡq_  eK锘WE~CԲAzUM }U~VIgJP"\bl4!+g!: Zi0,B$3=}Ϯg7G߳{=uJvwkGc{; v u^~Pp?/P}P(``hGot³?+i J$Qu*\zOZ]]WՈ?_hDe5eHB ƪ >vbu=t<砒if^p5OMώ)>%մĤXHfk3ƴ~X86Lzwe)Ej_clվR is78P3ÏcPկ[JMaVNAFº%1?Xn$ ==_m NA<+]C{~d=/S!]"V":3KfG;{pCT%\Ob50T}#w1`ןU|i&obŹ^SJL oa (7OiX;1}W.kSp_Y" {&ݏu d0?gުO0?i FBqr EZ6Q54ׇc6 =̽#$ݽW-?;ydr8k,>sϱ5g.m jX8-iIw.ivׁpd2E"peϚ.ћۻ OFp6 /8HBj>ͬ+-pH(u]p/tt&kxNN;J\!O?&0q.V]=s:v#]j$SijjjEdb9.=)VpoO]Kc.,jppd2y֭є2IDATopOT|DŽ<|g;vRTIpaXq3PS#@f|pDRrS:ZAyo-R(i)$U>kfɥfd@|\z|7PV2$*FyBIt HA*Ygf b)/xLKR^ ,PEJ#57?Woy7%ݓlUBK)m0tas9`¾G;[rig$`~5&axQ<};@v Oۦv1|2iadCjW1 B+ە#ͧt( 5y1 P P`%?m,fz7kLKD ? e5.K3B58 v 9lZRxuT>!t ~mL VuD`[|w./u>msW×kS\y3ezYU=T5~6z,,zp0 Ata\ZȂ=}ɟ".b#;X+'o*-x1SNN񳗰ːj\5!hڞx^jɅLhX\iDIzE$B2qm{`-/&\Ekț (B_xs㝗qZ>U+d'Iݬ&Mwfm`R~r㾓mkN!onɤ{%؂ЇDUIzhj<qϑ,_ɤe%"6n,wu'kʁnzM7:z|6'S2y|L_4OW'9J8f-$0 )?`dA qhPv4I_'bs]O?3J}/ЃZG ᥮ϟθΫIr^ w?a#!/T ޷D(pv܏oVJCjwcwccOg3m9_JiY\}_iG ( F2P'L"9S2 SƄRL"\ˆignjz/Ʌʠ΀Tuv;NAo>D\ GyԸ| ^@`j0\Z0 h]ǔtI*!P$,%HZd{HFQ-1 >,YX $jTZ(5*o3Wf+H.2ާhWJeaQUԱ:h;(hAM;ZkݿEv_@Wpx=.I%*}1 P 4x @cM;MB Gzm>rZy7 @ R*T>~p@ׯ<^9z-}K8HBoHJa/V:'~ЊSExuaBP # Kenneth Christiansen # Darin Adler # # Proper XML UTF-8'ification written by Cyrille Chepelov # ## Release information my $PROGRAM = "intltool-merge"; my $PACKAGE = "intltool"; my $VERSION = "0.37.1"; ## Loaded modules use strict; use Getopt::Long; use Text::Wrap; use File::Basename; my $must_end_tag = -1; my $last_depth = -1; my $translation_depth = -1; my @tag_stack = (); my @entered_tag = (); my @translation_strings = (); my $leading_space = ""; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $BA_STYLE_ARG = 0; my $XML_STYLE_ARG = 0; my $KEYS_STYLE_ARG = 0; my $DESKTOP_STYLE_ARG = 0; my $SCHEMAS_STYLE_ARG = 0; my $RFC822DEB_STYLE_ARG = 0; my $QUOTED_STYLE_ARG = 0; my $QUOTEDXML_STYLE_ARG = 0; my $QUIET_ARG = 0; my $PASS_THROUGH_ARG = 0; my $UTF8_ARG = 0; my $MULTIPLE_OUTPUT = 0; my $cache_file; ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "quiet|q" => \$QUIET_ARG, "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility "ba-style|b" => \$BA_STYLE_ARG, "xml-style|x" => \$XML_STYLE_ARG, "keys-style|k" => \$KEYS_STYLE_ARG, "desktop-style|d" => \$DESKTOP_STYLE_ARG, "schemas-style|s" => \$SCHEMAS_STYLE_ARG, "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, "quoted-style" => \$QUOTED_STYLE_ARG, "quotedxml-style" => \$QUOTEDXML_STYLE_ARG, "pass-through|p" => \$PASS_THROUGH_ARG, "utf8|u" => \$UTF8_ARG, "multiple-output|m" => \$MULTIPLE_OUTPUT, "cache|c=s" => \$cache_file ) or &error; my $PO_DIR; my $FILE; my $OUTFILE; my %po_files_by_lang = (); my %translations = (); my $iconv = $ENV{"ICONV"} || "iconv"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); sub isProgramInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file -l >$devnull") == 0)); return 0; } if (! isProgramInPath ("$iconv")) { print STDERR " *** iconv is not found on this system!\n". " *** Without it, intltool-merge can not convert encodings.\n"; exit; } # Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; # XML quoted string contents my $q = "[^\\\"]*"; ## Check for options. if ($VERSION_ARG) { &print_version; } elsif ($HELP_ARG) { &print_help; } elsif ($BA_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &ba_merge_translations; &finalize; } elsif ($XML_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &xml_merge_output; &finalize; } elsif ($KEYS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &keys_merge_translations; &finalize; } elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &desktop_merge_translations; &finalize; } elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &schemas_merge_translations; &finalize; } elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) { &preparation; &print_message; &rfc822deb_merge_translations; &finalize; } elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; "ed_merge_translations($QUOTEDXML_STYLE_ARG); &finalize; } else { &print_help; } exit; ## Sub for printing release information sub print_version { print <<_EOF_; ${PROGRAM} (${PACKAGE}) ${VERSION} Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2001 Eazel, 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. _EOF_ exit; } ## Sub for printing usage information sub print_help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE Generates an output file that includes some localized attributes from an untranslated source file. Mandatory options: (exactly one must be specified) -b, --ba-style includes translations in the bonobo-activation style -d, --desktop-style includes translations in the desktop style -k, --keys-style includes translations in the keys style -s, --schemas-style includes translations in the schemas style -r, --rfc822deb-style includes translations in the RFC822 style --quoted-style includes translations in the quoted string style --quotedxml-style includes translations in the quoted xml string style -x, --xml-style includes translations in the standard xml style Other options: -u, --utf8 convert all strings to UTF-8 before merging (default for everything except RFC822 style) -p, --pass-through deprecated, does nothing and issues a warning -m, --multiple-output output one localized file per locale, instead of a single file containing all localized elements -c, --cache=FILE specify cache file name (usually \$top_builddir/po/.intltool-merge-cache) -q, --quiet suppress most messages --help display this help and exit --version output version information and exit Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub print_error { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub print_message { print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; } sub preparation { $PO_DIR = $ARGV[0]; $FILE = $ARGV[1]; $OUTFILE = $ARGV[2]; &gather_po_files; &get_translation_database; } # General-purpose code for looking up translations in .po files sub po_file2lang { my ($tmp) = @_; $tmp =~ s/^.*\/(.*)\.po$/$1/; return $tmp; } sub gather_po_files { if (my $linguas = $ENV{"LINGUAS"}) { for my $lang (split / /, $linguas) { my $po_file = $PO_DIR . "/" . $lang . ".po"; if (-e $po_file) { $po_files_by_lang{$lang} = $po_file; } } } else { if (open LINGUAS_FILE, "$PO_DIR/LINGUAS") { while () { next if /^#/; for my $lang (split) { chomp ($lang); my $po_file = $PO_DIR . "/" . $lang . ".po"; if (-e $po_file) { $po_files_by_lang{$lang} = $po_file; } } } close LINGUAS_FILE; } else { for my $po_file (glob "$PO_DIR/*.po") { $po_files_by_lang{po_file2lang($po_file)} = $po_file; } } } } sub get_local_charset { my ($encoding) = @_; my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias"; # seek character encoding aliases in charset.alias (glib) if (open CHARSET_ALIAS, $alias_file) { while () { next if /^\#/; return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) } close CHARSET_ALIAS; } # if not found, return input string return $encoding; } sub get_po_encoding { my ($in_po_file) = @_; my $encoding = ""; open IN_PO_FILE, $in_po_file or die; while () { ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) { $encoding = $1; last; } } close IN_PO_FILE; if (!$encoding) { print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; $encoding = "ISO-8859-1"; } system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); if ($?) { $encoding = get_local_charset($encoding); } return $encoding } sub utf8_sanity_check { print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; $UTF8_ARG = 1; } sub get_translation_database { if ($cache_file) { &get_cached_translation_database; } else { &create_translation_database; } } sub get_newest_po_age { my $newest_age; foreach my $file (values %po_files_by_lang) { my $file_age = -M $file; $newest_age = $file_age if !$newest_age || $file_age < $newest_age; } $newest_age = 0 if !$newest_age; return $newest_age; } sub create_cache { print "Generating and caching the translation database\n" unless $QUIET_ARG; &create_translation_database; open CACHE, ">$cache_file" || die; print CACHE join "\x01", %translations; close CACHE; } sub load_cache { print "Found cached translation database\n" unless $QUIET_ARG; my $contents; open CACHE, "<$cache_file" || die; { local $/; $contents = ; } close CACHE; %translations = split "\x01", $contents; } sub get_cached_translation_database { my $cache_file_age = -M $cache_file; if (defined $cache_file_age) { if ($cache_file_age <= &get_newest_po_age) { &load_cache; return; } print "Found too-old cached translation database\n" unless $QUIET_ARG; } &create_cache; } sub create_translation_database { for my $lang (keys %po_files_by_lang) { my $po_file = $po_files_by_lang{$lang}; if ($UTF8_ARG) { my $encoding = get_po_encoding ($po_file); if (lc $encoding eq "utf-8") { open PO_FILE, "<$po_file"; } else { print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; } } else { open PO_FILE, "<$po_file"; } my $nextfuzzy = 0; my $inmsgid = 0; my $inmsgstr = 0; my $msgid = ""; my $msgstr = ""; while () { $nextfuzzy = 1 if /^#, fuzzy/; if (/^msgid "((\\.|[^\\]+)*)"/ ) { $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; $msgid = ""; $msgstr = ""; if ($nextfuzzy) { $inmsgid = 0; } else { $msgid = unescape_po_string($1); $inmsgid = 1; } $inmsgstr = 0; $nextfuzzy = 0; } if (/^msgstr "((\\.|[^\\]+)*)"/) { $msgstr = unescape_po_string($1); $inmsgstr = 1; $inmsgid = 0; } if (/^"((\\.|[^\\]+)*)"/) { $msgid .= unescape_po_string($1) if $inmsgid; $msgstr .= unescape_po_string($1) if $inmsgstr; } } $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; } } sub finalize { } sub unescape_one_sequence { my ($sequence) = @_; return "\\" if $sequence eq "\\\\"; return "\"" if $sequence eq "\\\""; return "\n" if $sequence eq "\\n"; return "\r" if $sequence eq "\\r"; return "\t" if $sequence eq "\\t"; return "\b" if $sequence eq "\\b"; return "\f" if $sequence eq "\\f"; return "\a" if $sequence eq "\\a"; return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 return $sequence; } sub unescape_po_string { my ($string) = @_; $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; return $string; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/<//g; s/&/&/g; return $_; } # entity_encode: (string) # # Encode the given string to XML format (encode '<' etc). sub entity_encode { my ($pre_encoded) = @_; my @list_of_chars = unpack ('C*', $pre_encoded); # with UTF-8 we only encode minimalistic return join ('', map (&entity_encode_int_minimalist, @list_of_chars)); } sub entity_encode_int_minimalist { return """ if $_ == 34; return "&" if $_ == 38; return "'" if $_ == 39; return "<" if $_ == 60; return ">" if $_ == 62; return chr $_; } sub entity_encoded_translation { my ($lang, $string) = @_; my $translation = $translations{$lang, $string}; return $string if !$translation; return entity_encode ($translation); } ## XML (bonobo-activation specific) merge code sub ba_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; # Binmode so that selftest works ok if using a native Win32 Perl... binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) { print OUTPUT $1; my $node = $2 . "\n"; my @strings = (); $_ = $node; while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { push @strings, entity_decode($3); } print OUTPUT; my %langs; for my $string (@strings) { for my $lang (keys %po_files_by_lang) { $langs{$lang} = 1 if $translations{$lang, $string}; } } for my $lang (sort keys %langs) { $_ = $node; s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; print OUTPUT; } } print OUTPUT $source; close OUTPUT; } ## XML (non-bonobo-activation) merge code # Process tag attributes # Only parameter is a HASH containing attributes -> values mapping sub getAttributeString { my $sub = shift; my $do_translate = shift || 0; my $language = shift || ""; my $result = ""; my $translate = shift; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; if ($do_translate && $key =~ /^_/) { $key =~ s|^_||g; if ($language) { # Handle translation my $decode_string = entity_decode($string); my $translation = $translations{$language, $decode_string}; if ($translation) { $translation = entity_encode($translation); $string = $translation; } $$translate = 2; } else { $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate } } $result .= " $key=$quote$string$quote"; } return $result; } # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; if ($singlelang) { my $oldMO = $MULTIPLE_OUTPUT; $MULTIPLE_OUTPUT = 1; traverse($fh, $type, $rest, $language, $spacepreserve); $MULTIPLE_OUTPUT = $oldMO; } else { traverse($fh, $type, $rest, $language, $spacepreserve); } $index += 2; } } sub isWellFormedXmlFragment { my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $fragment = shift; return 0 if (!$fragment); $fragment = "$fragment"; my $xp = new XML::Parser(Style => 'Tree'); my $tree = 0; eval { $tree = $xp->parse($fragment); }; return $tree; } sub traverse { my $fh = shift; my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if (!$nodename) { if ($content =~ /^[\s]*$/) { $leading_space .= $content; } print $fh $content; } else { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); print $fh "<$nodename", $outattr; if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup || $translate == 2) { my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { $translation = $lookup if (!$translation); print $fh " xml:lang=\"", $language, "\"" if $language; print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; return; # this means there will be no same translation with xml:lang="$language"... # if we want them both, just remove this "return" } else { print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $lookup; } print $fh ""; } } else { print $fh "/>"; } for my $lang (sort keys %po_files_by_lang) { if ($MULTIPLE_OUTPUT && $lang ne "$language") { next; } if ($lang) { # Handle translation # my $translate = 0; my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); if ($translate && !$translation) { $translation = $lookup; } if ($translation || $translate) { print $fh "\n"; $leading_space =~ s/.*\n//g; print $fh $leading_space; print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; } } } } else { my $count = scalar(@all); if ($count > 0) { print $fh ">"; my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } print $fh ""; } else { print $fh "/>"; } } } } sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } sub readXml { my $filename = shift || return; if(!-f $filename) { die "ERROR Cannot find filename: $filename\n"; } my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); my $tree = $xp->parsefile($filename); # Hello thereHowdydo # would be: # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, # 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub print_header { my $infile = shift; my $fh = shift; my $source; if(!-f $infile) { die "ERROR Cannot find filename: $infile\n"; } print $fh qq{\n}; { local $/; open DOCINPUT, "<${FILE}" or die; $source = ; close DOCINPUT; } if ($source =~ /()/s) { print $fh "$1\n"; } elsif ($source =~ /(]*>)/s) { print $fh "$1\n"; } } sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } sub xml_merge_output { my $source; if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree, $lang); close OUTPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } if ( ! -d "C" ) { mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n"; } open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED C/$OUTFILE\n" unless $QUIET_ARG; } else { open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED $OUTFILE\n" unless $QUIET_ARG; } } sub keys_merge_translation { my ($lang) = @_; if ( ! -d $lang && $MULTIPLE_OUTPUT) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n"; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; if (!$MULTIPLE_OUTPUT) { print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { my $non_translated_line = $_; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $_ = $non_translated_line; s/(\w+)=.*/$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } sub keys_merge_translations { if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { keys_merge_translation ($lang); } keys_merge_translation ("C"); } else { keys_merge_translation ("."); } } sub desktop_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/${1}[$lang]=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub schemas_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; # FIXME: support attribute translations # Empty nodes never need translation, so unmark all of them. # For example, <_foo/> is just replaced by . $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; while ($source =~ s/ (.*?) (\s+)((\s*) (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) <\/locale>) //sx) { print OUTPUT $1; my $locale_start_spaces = $2 ? $2 : ''; my $default_spaces = $4 ? $4 : ''; my $short_spaces = $7 ? $7 : ''; my $long_spaces = $10 ? $10 : ''; my $locale_end_spaces = $13 ? $13 : ''; my $c_default_block = $3 ? $3 : ''; my $default_string = $6 ? $6 : ''; my $short_string = $9 ? $9 : ''; my $long_string = $12 ? $12 : ''; print OUTPUT "$locale_start_spaces$c_default_block"; $default_string =~ s/\s+/ /g; $default_string = entity_decode($default_string); $short_string =~ s/\s+/ /g; $short_string = entity_decode($short_string); $long_string =~ s/\s+/ /g; $long_string = entity_decode($long_string); for my $lang (sort keys %po_files_by_lang) { my $default_translation = $translations{$lang, $default_string}; my $short_translation = $translations{$lang, $short_string}; my $long_translation = $translations{$lang, $long_string}; next if (!$default_translation && !$short_translation && !$long_translation); print OUTPUT "\n$locale_start_spaces"; print OUTPUT "$default_spaces"; if ($default_translation) { $default_translation = entity_encode($default_translation); print OUTPUT "$default_translation"; } print OUTPUT "$short_spaces"; if ($short_translation) { $short_translation = entity_encode($short_translation); print OUTPUT "$short_translation"; } print OUTPUT "$long_spaces"; if ($long_translation) { $long_translation = entity_encode($long_translation); print OUTPUT "$long_translation"; } print OUTPUT "$locale_end_spaces"; } } print OUTPUT $source; close OUTPUT; } sub rfc822deb_merge_translations { my %encodings = (); for my $lang (keys %po_files_by_lang) { $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); } my $source; $Text::Wrap::huge = 'overflow'; $Text::Wrap::break = qr/\n|\s(?=\S)/; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) { my $sep = $1; my $non_translated_line = $3.$4; my $string = $5; my $underscore = length($2); next if $underscore eq 0 && $non_translated_line =~ /^#/; # Remove [] dummy strings my $stripped = $string; $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; $stripped =~ s/\[\s[^\[\]]*\]$//; $non_translated_line .= $stripped; print OUTPUT $sep.$non_translated_line; if ($underscore) { my @str_list = rfc822deb_split($underscore, $string); for my $lang (sort keys %po_files_by_lang) { my $is_translated = 1; my $str_translated = ''; my $first = 1; for my $str (@str_list) { my $translation = $translations{$lang, $str}; if (!$translation) { $is_translated = 0; last; } # $translation may also contain [] dummy # strings, mostly to indicate an empty string $translation =~ s/\[\s[^\[\]]*\]$//; if ($first) { if ($underscore eq 2) { $str_translated .= $translation; } else { $str_translated .= Text::Tabs::expand($translation) . "\n"; } } else { if ($underscore eq 2) { $str_translated .= ', ' . $translation; } else { $str_translated .= Text::Tabs::expand( Text::Wrap::wrap(' ', ' ', $translation)) . "\n .\n"; } } $first = 0; # To fix some problems with Text::Wrap::wrap $str_translated =~ s/(\n )+\n/\n .\n/g; } next unless $is_translated; $str_translated =~ s/\n \.\n$//; $str_translated =~ s/\s+$//; $_ = $non_translated_line; s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; print OUTPUT; } } } print OUTPUT "\n"; close OUTPUT; close INPUT; } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub quoted_translation { my ($xml_mode, $lang, $string) = @_; $string = entity_decode($string) if $xml_mode; $string =~ s/\\\"/\"/g; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $translation = entity_encode($translation) if $xml_mode; $translation =~ s/\"/\\\"/g; return $translation } sub quoted_merge_translations { my ($xml_mode) = @_; if (!$MULTIPLE_OUTPUT) { print "Quoted only supports Multiple Output.\n"; exit(1); } for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . "ed_translation($xml_mode, $lang, $1) . "\""/ge; print OUTPUT; } close OUTPUT; close INPUT; } } pyrenamer-0.6.0/missing0000755000175000017500000002557711064200175012053 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: