[shacrypt] push by Nightgunner5 - * Makefile.am, configure.ac, configure, config.guess, config.sub,... on 2010-02-21 19:22 GMT

6 views
Skip to first unread message

shac...@googlecode.com

unread,
Feb 21, 2010, 2:23:44 PM2/21/10
to shac...@googlegroups.com
Revision: 8141069c32
Author: Nightgunner5
Date: Sun Feb 21 11:21:39 2010
Log: * Makefile.am, configure.ac, configure, config.guess, config.sub,
aclocal.m4, config.h.in, compile:
./configure now supports Windows (MinGW32) automatically.

Changed the bug report email address to something more sensible.

Third party .c files are now compiled in the third-party folder
to make compiling less confusing.

* shacrypt.glade, glade.sed, gui.c, glade.c, glade-helper.c:
The GUI version can now be compiled by using the --enable-gui
option on ./configure.

glade.h is now created using a SED script, not a C program.

* tests/t2.sh, tests/t3.sh, tests/t4.sh, test-helper.c:
Converted the tests to use test-helper instead of dd (which is
not available by default on MinGW32)

* license.txt:
Removed because COPYING already contains the same content.
http://code.google.com/p/shacrypt/source/detail?r=8141069c32

Added:
/compile
/config.guess
/config.sub
/glade.sed
/gui.c
/shacrypt-gui.rc
/test-helper.c
Deleted:
/glade-helper.c
/glade.c
/license.txt
/shacrypt-gtk.rc
Modified:
/ChangeLog
/Makefile.am
/Makefile.in
/aclocal.m4
/commandline.c
/config.h.in
/configure
/configure.ac
/shacrypt.glade
/tests/t2.sh
/tests/t3.sh
/tests/t4.sh

=======================================
--- /dev/null
+++ /compile Sun Feb 21 11:21:39 2010
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-10-06.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tro...@cygnus.com>.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+# 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 <bug-au...@gnu.org> or send patches to
+# <automake...@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-au...@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
=======================================
--- /dev/null
+++ /config.guess Sun Feb 21 11:21:39 2010
@@ -0,0 +1,1501 @@
+#! /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, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# 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 (context
+# diff format) to <config-...@gnu.org> and include a 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.
+#
+# You can get the latest version of this script from:
+#
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+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 <config-...@gnu.org>."
+
+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, 2006, 2007, 2008 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.
+# (gh...@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 -q __ELF__
+ 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*:*:*)
+ # ak...@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 ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed
-e 's/[^.]*//'`
+ exit ;;
+ 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:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-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 <stdio.h> /* 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 <sys/systemcfg.h>
+
+ 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:*:[456])
+ 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 <stdlib.h>
+ #include <unistd.h>
+
+ 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 -q __LP64__
+ 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 <unistd.h>
+ 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*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-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 ;;
+ 8664:Windows_NT:*)
+ echo x86_64-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 ;;
+ 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 -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ 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 ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ 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:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) ||
defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) ||
defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ 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 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-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 ${UNAME_MACHINE}-unknown-linux-gnu
+ 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)
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /config.sub Sun Feb 21 11:21:39 2010
@@ -0,0 +1,1705 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# 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 <config-...@gnu.org>. Submit a context
+# diff and a properly formatted GNU 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.
+
+# You can get the latest version of this script from:
+#
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# 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 <config-...@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 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* | \
+ kopensolaris*-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 | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -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 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | 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 \
+ | ubicom32 \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # 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-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | 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-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | 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-* | tile-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # 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
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ 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
+ ;;
+ cr16)
+ basic_machine=cr16-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
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ 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
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ 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
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ 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
+ ;;
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /glade.sed Sun Feb 21 11:21:39 2010
@@ -0,0 +1,34 @@
+#!/bin/sed -f
+
+# SHACrypt graphical user interface (compile-time helper)
+#
+# SHACrypt - Encrypt files using cryptographic hash functions
+# Copyright (C) 2009 LlamaSlayers
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+1i\
+#ifndef _SHACRYPT_GLADE_H_
+1i\
+#define _SHACRYPT_GLADE_H_
+1i\
+const char* shacrypt_glade =
+s/\\/\\\\/g
+s/"/\\"/g
+s/^.*$/"&\\n"/g
+$a\
+;
+$a\
+#endif
+
=======================================
--- /dev/null
+++ /gui.c Sun Feb 21 11:21:39 2010
@@ -0,0 +1,1168 @@
+/**
+ * SHACrypt graphical user interface
+ *
+ * SHACrypt - Encrypt files using cryptographic hash functions
+ * Copyright (C) 2009 LlamaSlayers
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ * @since 1.2.1
+ * @version 1.2.2
+ */
+
+#include <gtk/gtk.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+#include <stdio.h>
+#include <string.h>
+#include "shacrypt.h"
+#include "glade.h"
+#include "shacrypt-icon.h"
+
+static const char identifier[3] = "\xA7\x09\xC3";
+
+GtkBuilder* builder;
+
+/* Encryption */
+G_MODULE_EXPORT void button_pressed_encrypt( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step1;
+ step1 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step1" )
);
+
+ gtk_widget_show( step1 );
+
+ g_free( step1 );
+}
+
+G_MODULE_EXPORT void encrypt_step1_cancel( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step1;
+ step1 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step1" )
);
+
+ gtk_widget_hide( step1 );
+
+ g_free( step1 );
+}
+
+G_MODULE_EXPORT void encrypt_step1_ok( GtkWidget* button, gpointer data ) {
+ // Make sure there's actually a file selected.
+ GtkFileChooser* file;
+
+ file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_e1_select" ) );
+
+ if ( gtk_file_chooser_get_filename( file ) == NULL ) {
+ g_free( file );
+ return;
+ }
+
+ g_free( file );
+
+ // This part of the reset is here because Glade won't let me set
default values.
+ GtkToggleButton* sha1;
+ GtkToggleButton* sha224;
+ GtkToggleButton* sha256;
+ GtkToggleButton* sha384;
+ GtkToggleButton* sha512;
+ GtkToggleButton* md5;
+ GtkToggleButton* cubehash;
+ GtkToggleButton* whirlpool;
+ GtkToggleButton* randomseed;
+ GtkWidget* seed;
+
+ sha1 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha1" ) );
+ sha224 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha224" ) );
+ sha256 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha256" ) );
+ sha384 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha384" ) );
+ sha512 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha512" ) );
+ md5 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_md5" ) );
+ cubehash = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_cubehash" ) );
+ whirlpool = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_whirlpool" ) );
+ randomseed = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "radio_e2_randomseed_off" ) );
+ seed = GTK_WIDGET( gtk_builder_get_object(
builder, "hscale_e2_randomseed" ) );
+
+ gtk_toggle_button_set_active( sha1, TRUE );
+ gtk_toggle_button_set_active( sha224, FALSE );
+ gtk_toggle_button_set_active( sha256, FALSE );
+ gtk_toggle_button_set_active( sha384, FALSE );
+ gtk_toggle_button_set_active( sha512, FALSE );
+ gtk_toggle_button_set_active( md5, FALSE );
+ gtk_toggle_button_set_active( cubehash, FALSE );
+ gtk_toggle_button_set_active( whirlpool, FALSE );
+ gtk_toggle_button_set_active( randomseed, TRUE );
+ gtk_widget_set_sensitive( seed, FALSE );
+ gtk_range_set_value( GTK_RANGE( seed ), 20.0 );
+
+ g_free( sha1 );
+ g_free( sha224 );
+ g_free( sha256 );
+ g_free( sha384 );
+ g_free( sha512 );
+ g_free( md5 );
+ g_free( cubehash );
+ g_free( whirlpool );
+ g_free( randomseed );
+ g_free( seed );
+
+ // Now on to the actual displaying part.
+ GtkWidget* step1;
+ GtkWidget* step2;
+
+ step1 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step1" )
);
+ step2 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step2" )
);
+
+ gtk_widget_show( step2 );
+ gtk_widget_hide( step1 );
+
+ g_free( step1 );
+ g_free( step2 );
+}
+
+/* Password scoring method adapted from
+ * http://www.geekwisdom.com/js/passwordmeter.js
+ */
+G_MODULE_EXPORT void encrypt_step2_passchange( GtkEntry* button, gpointer
data ) {
+ GtkProgressBar* meter;
+
+ meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
+
+ int len = gtk_entry_get_text_length( button );
+ const char* pass = gtk_entry_get_text( button );
+
+ if ( len == 0 ) {
+ gtk_progress_bar_set_fraction( meter, 0.0 );
+ gtk_progress_bar_set_text( meter, "Enter a password." );
+
+ g_free( meter );
+
+ return;
+ }
+
+ int score, i,
+ lower = 0,
+ upper = 0,
+ num = 0,
+ symb = 0;
+
+ // Total length
+ if ( len > 15 ) {
+ score = 18;
+ } else if ( len > 7 ) {
+ score = 12;
+ } else if ( len > 4 ) {
+ score = 6;
+ } else {
+ score = 3;
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ if ( pass[i] >= 'a' && pass[i] <= 'z' )
+ lower++;
+ else if ( pass[i] >= 'A' && pass[i] <= 'Z' )
+ upper++;
+ else if ( pass[i] >= '0' && pass[i] <= '9' )
+ num++;
+ else
+ symb++;
+ }
+
+ // Letters
+ if ( lower || upper )
+ score += 1;
+ if ( lower && upper )
+ score += 2;
+ if ( lower + upper > 1 )
+ score += 2;
+ if ( lower > 1 && upper > 1 )
+ score += 2;
+
+ // Numbers
+ if ( num == 1 )
+ score += 5;
+ if ( num > 1 )
+ score += 7;
+
+ // Symbols
+ if ( symb == 1 )
+ score += 5;
+ if ( symb > 1 )
+ score += 7;
+
+ // Combinations
+ if ( ( upper || lower ) && num )
+ score++;
+ if ( upper && lower )
+ score++;
+ if ( ( upper || lower ) && num && symb )
+ score += 2;
+ if ( upper && lower && num && symb )
+ score += 2;
+
+ gtk_progress_bar_set_fraction( meter, score / 45.0 );
+ if ( score == 45 )
+ gtk_progress_bar_set_text( meter, "Excellent" );
+ else if ( score > 39 )
+ gtk_progress_bar_set_text( meter, "Secure" );
+ else if ( score > 24 )
+ gtk_progress_bar_set_text( meter, "Good" );
+ else if ( score > 9 )
+ gtk_progress_bar_set_text( meter, "Ok" );
+ else
+ gtk_progress_bar_set_text( meter, "Bad" );
+
+ g_free( meter );
+}
+
+G_MODULE_EXPORT unsigned char encrypt_step2_get_algos() {
+ unsigned char algos = '\0';
+
+ GtkToggleButton* sha1;
+ GtkToggleButton* sha224;
+ GtkToggleButton* sha256;
+ GtkToggleButton* sha384;
+ GtkToggleButton* sha512;
+ GtkToggleButton* md5;
+ GtkToggleButton* cubehash;
+ GtkToggleButton* whirlpool;
+
+ sha1 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha1" ) );
+ sha224 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha224" ) );
+ sha256 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha256" ) );
+ sha384 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha384" ) );
+ sha512 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha512" ) );
+ md5 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_md5" ) );
+ cubehash = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_cubehash" ) );
+ whirlpool = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_whirlpool" ) );
+
+ if ( gtk_toggle_button_get_active( sha1 ) )
+ algos |= '\x01';
+ if ( gtk_toggle_button_get_active( sha224 ) )
+ algos |= '\x02';
+ if ( gtk_toggle_button_get_active( sha256 ) )
+ algos |= '\x04';
+ if ( gtk_toggle_button_get_active( sha384 ) )
+ algos |= '\x08';
+ if ( gtk_toggle_button_get_active( sha512 ) )
+ algos |= '\x10';
+ if ( gtk_toggle_button_get_active( md5 ) )
+ algos |= '\x20';
+ if ( gtk_toggle_button_get_active( cubehash ) )
+ algos |= '\x40';
+ if ( gtk_toggle_button_get_active( whirlpool ) )
+ algos |= '\x80';
+
+ g_free( sha1 );
+ g_free( sha224 );
+ g_free( sha256 );
+ g_free( sha384 );
+ g_free( sha512 );
+ g_free( md5 );
+ g_free( cubehash );
+ g_free( whirlpool );
+
+ return algos;
+}
+
+G_MODULE_EXPORT void encrypt_step2_check_hashalgo( GtkWidget* button,
gpointer data ) {
+ int seedlen = SHACrypt_GetLength( encrypt_step2_get_algos() );
+ if ( !seedlen ) {
+ GtkToggleButton* sha1;
+ sha1 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha1" ) );
+
+ gtk_toggle_button_set_active( sha1, TRUE );
+
+ seedlen = 20;
+ }
+
+ GtkToggleButton* randomseed;
+ GtkWidget* seed;
+
+ randomseed = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "radio_e2_randomseed_off" ) );
+ seed = GTK_WIDGET( gtk_builder_get_object(
builder, "hscale_e2_randomseed" ) );
+
+ if ( gtk_toggle_button_get_active( randomseed ) ) {
+ gtk_widget_set_sensitive( seed, FALSE );
+
+ gtk_range_set_value( GTK_RANGE( seed ), (gdouble)seedlen );
+ } else {
+ gtk_widget_set_sensitive( seed, TRUE );
+ }
+
+ g_free( randomseed );
+ g_free( seed );
+}
+
+G_MODULE_EXPORT void encrypt_step3() {
+ GtkWindow* step3;
+ GtkEntry* pass;
+ GtkFileChooser* file;
+ GtkProgressBar* progress;
+ GtkRange* seedlen;
+
+ step3 = GTK_WINDOW( gtk_builder_get_object( builder, "encrypt_step3" )
);
+ pass = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
+ file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_e1_select" ) );
+ progress = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e3_progress" ) );
+ seedlen = GTK_RANGE( gtk_builder_get_object(
builder, "hscale_e2_randomseed" ) );
+
+ gtk_progress_bar_set_text( progress, NULL );
+ gtk_window_set_deletable( step3, FALSE );
+
+ FILE* f;
+ FILE* o;
+ unsigned long i, n,
+ size;
+ SHACrypt_Context s;
+ unsigned char algos = encrypt_step2_get_algos();
+ static char fbuf[256] = {0},
+ obuf[256] = {0},
+ tmp[1024] = {0};
+ char* filename;
+
+ filename = gtk_file_chooser_get_filename( file );
+ g_free( file );
+
+ n = (int)gtk_range_get_value( seedlen );
+ g_free( seedlen );
+
+ f = fopen( filename, "rb" );
+
+ sprintf( tmp, "%s.shacrypt", filename );
+
+ i = 0;
+ while ( ( o = fopen( tmp, "rb" ) ) != NULL ) {
+ g_free( o );
+ i++;
+ sprintf( tmp, "%s_%lu.shacrypt", filename, i );
+ }
+
+ o = fopen( tmp, "wb" );
+
+ g_free( tmp );
+ g_free( filename );
+
+ for ( i = 0; i < n; i++ )
+ fbuf[i] = g_random_int_range( 0, 255 );
+
+ SHACrypt_Init( &s, (char*)gtk_entry_get_text( pass ),
gtk_entry_get_text_length( pass ), algos, fbuf, n );
+ g_free( pass );
+
+ fwrite( identifier, 1, 3, o ); // Identifier
+ fwrite( "\2\0", 1, 2, o ); // Format version
+ fputc( (unsigned char)(n - 1), o ); // Random seed length
+ fwrite( fbuf, 1, n, o ); // Random seed
+ fputc( algos, o ); // Hash alogithms used
+
+ fseek( f, 0, SEEK_END );
+ size = ftell( f );
+ fseek( f, 0, SEEK_SET );
+
+ i = 0;
+
+ /* Do the actual encryption */
+ while ( ( n = fread( fbuf, 1, 256, f ) ) > 0 ) {
+ i += n;
+
+ gtk_progress_bar_set_fraction( progress, (double)i / size );
+
+ SHACrypt_Process( &s, fbuf, obuf, n );
+
+ fwrite( obuf, 1, n, o );
+ }
+
+ fclose( f );
+ fclose( o );
+
+ g_free( f );
+ g_free( o );
+ g_free( fbuf );
+ g_free( obuf );
+
+ GtkEntry* pass1;
+ GtkEntry* pass2;
+ GtkProgressBar* meter;
+
+ pass1 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
+ pass2 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password2" ) );
+ meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
+
+ gtk_entry_set_text( pass1, "" );
+ gtk_entry_set_text( pass2, "" );
+ gtk_progress_bar_set_text( meter, "Enter a password" );
+ gtk_progress_bar_set_fraction( meter, 0.0 );
+
+ g_free( pass1 );
+ g_free( pass2 );
+ g_free( meter );
+
+ gtk_progress_bar_set_text( progress, "Done!" );
+ gtk_window_set_deletable( step3, TRUE );
+
+ g_free( progress );
+ g_free( step3 );
+}
+
+G_MODULE_EXPORT void encrypt_step2_ok( GtkWidget* button, gpointer data ) {
+ GtkNotebook* tabs;
+ GtkEntry* pass1;
+ GtkEntry* pass2;
+
+ tabs = GTK_NOTEBOOK( gtk_builder_get_object(
builder, "notebook_e2_tabs" ) );
+ pass1 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
+ pass2 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password2" ) );
+
+ if ( !gtk_entry_get_text_length( pass1 ) ) {
+ gtk_notebook_set_current_page( tabs, 0 );
+ gtk_widget_grab_focus( GTK_WIDGET( pass1 ) );
+
+ g_free( pass1 );
+ g_free( pass2 );
+ g_free( tabs );
+
+ return;
+ }
+
+ if ( !gtk_entry_get_text_length( pass2 ) ) {
+ gtk_notebook_set_current_page( tabs, 0 );
+ gtk_widget_grab_focus( GTK_WIDGET( pass2 ) );
+
+ g_free( pass1 );
+ g_free( pass2 );
+ g_free( tabs );
+
+ return;
+ }
+
+ g_free( tabs );
+
+ if ( strcmp( gtk_entry_get_text( pass1 ), gtk_entry_get_text( pass2 )
) == 0 ) {
+ GtkWidget* step2;
+ GtkWidget* step3;
+
+ step2 = GTK_WIDGET( gtk_builder_get_object(
builder, "encrypt_step2" ) );
+ step3 = GTK_WIDGET( gtk_builder_get_object(
builder, "encrypt_step3" ) );
+
+ gtk_widget_show( step3 );
+ gtk_widget_hide( step2 );
+
+ g_free( step2 );
+ g_free( step3 );
+
+ g_thread_create( (GThreadFunc)encrypt_step3, NULL, FALSE, NULL );
+ } else {
+ GtkProgressBar* meter;
+
+ meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
+
+ gtk_progress_bar_set_text( meter, "Passwords do not match!" );
+
+ g_free( meter );
+ }
+
+ g_free( pass1 );
+ g_free( pass2 );
+}
+
+G_MODULE_EXPORT void encrypt_step2_cancel( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step2;
+ GtkEntry* pass1;
+ GtkEntry* pass2;
+ GtkProgressBar* meter;
+
+ step2 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step2" )
);
+ pass1 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
+ pass2 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password2" ) );
+ meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
+
+ gtk_widget_hide( step2 );
+
+ gtk_entry_set_text( pass1, "" );
+ gtk_entry_set_text( pass2, "" );
+ gtk_progress_bar_set_text( meter, "Enter a password" );
+ gtk_progress_bar_set_fraction( meter, 0.0 );
+
+ g_free( step2 );
+ g_free( pass1 );
+ g_free( pass2 );
+ g_free( meter );
+}
+
+/* Decryption */
+G_MODULE_EXPORT void button_pressed_decrypt( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step1;
+ step1 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step1" )
);
+
+ gtk_widget_show( step1 );
+
+ g_free( step1 );
+}
+
+G_MODULE_EXPORT void decrypt_step1_ok( GtkWidget* button, gpointer data ) {
+ GtkFileChooser* file;
+
+ file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_d1_select" ) );
+
+ // Make sure there's actually a file selected.
+ if ( gtk_file_chooser_get_filename( file ) == NULL ) {
+ g_free( file );
+ return;
+ }
+
+ // Make sure it's an SHACrypt file.
+ FILE* f;
+ char fbuf[5];
+
+ f = fopen( gtk_file_chooser_get_filename( file ), "rb" );
+ g_free( file );
+
+ if ( f == NULL || fread( fbuf, 1, 5, f ) != 5 )
+ strcpy( fbuf, "fail." ); // Make sure we have all 5 bytes set.
+
+ if ( f != NULL ) {
+ fclose( f );
+
+ g_free( f );
+ }
+
+ if ( strncmp( fbuf, identifier, 3 ) != 0 || fbuf[3] < '\1' || fbuf[3]
> '\2' || fbuf[4] != '\0' ) {
+ g_free( fbuf );
+
+ GtkWidget* invalid_file;
+
+ invalid_file = GTK_WIDGET( gtk_builder_get_object(
builder, "decrypt_step1_error_notshacrypt" ) );
+
+ gtk_widget_show( invalid_file );
+
+ g_free( invalid_file );
+
+ return;
+ }
+
+ GtkWidget* step1;
+ GtkWidget* step2;
+
+ step1 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step1" )
);
+ step2 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step2" )
);
+
+ gtk_widget_show( step2 );
+ gtk_widget_hide( step1 );
+
+ g_free( step1 );
+ g_free( step2 );
+}
+
+G_MODULE_EXPORT void decrypt_step1_cancel( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step1;
+ step1 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step1" )
);
+
+ gtk_widget_hide( step1 );
+
+ g_free( step1 );
+}
+
+G_MODULE_EXPORT void decrypt_step1_error_ok( GtkWidget* button, gpointer
data ) {
+ GtkWidget* error;
+ error = GTK_WIDGET( gtk_builder_get_object(
builder, "decrypt_step1_error_notshacrypt" ) );
+
+ gtk_widget_hide( error );
+
+ g_free( error );
+}
+
+G_MODULE_EXPORT void decrypt_step3() {
+ GtkWindow* step3;
+ GtkEntry* pass;
+ GtkFileChooser* file;
+ GtkProgressBar* progress;
+
+ step3 = GTK_WINDOW( gtk_builder_get_object( builder, "decrypt_step3" )
);
+ pass = GTK_ENTRY( gtk_builder_get_object( builder, "field_d2_password"
) );
+ file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_d1_select" ) );
+ progress = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_d3_progress" ) );
+
+ gtk_progress_bar_set_text( progress, NULL );
+ gtk_window_set_deletable( step3, FALSE );
+
+ FILE* f;
+ FILE* o;
+ unsigned long i, size, n;
+ SHACrypt_Context s;
+ unsigned char algos = '\0',
+ randlen = '\0';
+ static char fbuf[256] = {0},
+ obuf[256] = {0};
+ char** filename = g_strsplit( gtk_file_chooser_get_filename( file
), ".", -1 );
+ char* filename_prefix;
+ char* filename_suffix;
+ char* tmp;
+
+ g_free( file );
+
+ f = fopen( g_strjoinv( ".", filename ), "rb" );
+
+ i = g_strv_length( filename );
+
+ if ( i == 2 ) {
+ filename_suffix = "";
+ filename_prefix = g_strdup( filename[0] );
+ } else {
+ n = strlen( filename[i - 1] ) + strlen( filename[i - 2] ) + 2;
+
+ filename_suffix = g_strconcat( ".", filename[i - 2], NULL );
+
+ tmp = g_strjoinv( ".", filename );
+ filename_prefix = g_strndup( tmp, strlen( tmp ) - n );
+ g_free( tmp );
+ }
+ g_strfreev( filename );
+
+ tmp = g_strdup_printf( "%s%s", filename_prefix, filename_suffix );
+
+
+ i = 0;
+ while ( fopen( tmp, "rb" ) != NULL ) {
+ g_free( tmp );
+ i++;
+ tmp = g_strdup_printf( "%s_%lu%s", filename_prefix, i,
filename_suffix );
+ }
+
+ o = fopen( tmp, "wb" );
+
+ g_free( tmp );
+ g_free( filename_prefix );
+ g_free( filename_suffix );
+
+ fread( fbuf, 1, 5, f );
+
+ if ( fbuf[3] == '\1' ) {
+ randlen = '\x13';
+ fread( fbuf, 1, 20, f );
+ algos = '\x01';
+ }
+ if ( fbuf[3] == '\2' ) {
+ randlen = fgetc( f );
+ fread( fbuf, 1, (int)randlen + 1, f );
+ algos = fgetc( f );
+ }
+
+ SHACrypt_Init( &s, g_strdup( gtk_entry_get_text( pass ) ),
gtk_entry_get_text_length( pass ), algos, fbuf, (int)randlen + 1 );
+
+ gtk_entry_set_text( pass, "" );
+
+ g_free( pass );
+
+ i = ftell( f );
+ fseek( f, 0, SEEK_END );
+ size = ftell( f ) - i;
+ fseek( f, i, SEEK_SET );
+
+ i = 0;
+ /* Do the actual encryption */
+ while ( ( n = fread( fbuf, 1, 256, f ) ) > 0 ) {
+ i += n;
+
+ gtk_progress_bar_set_fraction( progress, (double)i / size );
+
+ SHACrypt_Process( &s, fbuf, obuf, n );
+
+ fwrite( obuf, 1, n, o );
+ }
+
+ fclose( f );
+ fclose( o );
+
+ g_free( f );
+ g_free( o );
+ g_free( fbuf );
+ g_free( obuf );
+
+ gtk_progress_bar_set_text( progress, "Done!" );
+ gtk_window_set_deletable( step3, TRUE );
+
+ g_free( progress );
+ g_free( step3 );
+}
+
+G_MODULE_EXPORT void decrypt_step2_ok( GtkWidget* button, gpointer data ) {
+ GtkEntry* pass;
+
+ pass = GTK_ENTRY( gtk_builder_get_object( builder, "field_d2_password"
) );
+
+ if ( !gtk_entry_get_text_length( pass ) ) {
+ gtk_widget_grab_focus( GTK_WIDGET( pass ) );
+
+ g_free( pass );
+
+ return;
+ }
+ g_free( pass );
+
+ GtkWidget* step2;
+ GtkWidget* step3;
+
+ step2 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step2" )
);
+ step3 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step3" )
);
+
+ gtk_widget_show( step3 );
+ gtk_widget_hide( step2 );
+
+ g_free( step2 );
+ g_free( step3 );
+
+ g_thread_create( (GThreadFunc)decrypt_step3, NULL, FALSE, NULL );
+}
+
+G_MODULE_EXPORT void decrypt_step2_cancel( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step2;
+ GtkEntry* pass;
+
+ step2 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step2" )
);
+ pass = GTK_ENTRY( gtk_builder_get_object( builder, "field_d2_password"
) );
+
+ gtk_widget_hide( step2 );
+ gtk_entry_set_text( pass, "" );
+
+ g_free( step2 );
+ g_free( pass );
+}
+
+/* Asymmetric */
+G_MODULE_EXPORT void button_pressed_asymmetric( GtkWidget* button,
gpointer data ) {
+ GtkWidget* step1;
+ step1 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1" ) );
+
+ gtk_widget_show( step1 );
+
+ g_free( step1 );
+}
+
+G_MODULE_EXPORT void asymmetric_step1_cancel( GtkWidget* button, gpointer
data ) {
+ GtkWidget* step1;
+ step1 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1" ) );
+
+ gtk_widget_hide( step1 );
+
+ g_free( step1 );
+}
+
+G_MODULE_EXPORT void asymmetric_step1_ok( GtkWidget* button, gpointer data
) {
+ GtkFileChooser* file;
+
+ file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_a1_select" ) );
+
+ // Make sure there's actually a file selected.
+ if ( gtk_file_chooser_get_filename( file ) == NULL ) {
+ g_free( file );
+ return;
+ }
+
+ // Make sure it's an SHACrypt file.
+ FILE* f;
+ char fbuf[5];
+
+ f = fopen( gtk_file_chooser_get_filename( file ), "rb" );
+ g_free( file );
+
+ if ( f == NULL || fread( fbuf, 1, 5, f ) != 5 )
+ strcpy( fbuf, "fail." ); // Make sure we have all 5 bytes set.
+
+ if ( f != NULL ) {
+ fclose( f );
+
+ g_free( f );
+ }
+
+ if ( strncmp( fbuf, identifier, 3 ) != 0 || fbuf[3] < '\1' || fbuf[3]
> '\2' || fbuf[4] != '\0' ) {
+ g_free( fbuf );
+
+ GtkWidget* invalid_file;
+
+ invalid_file = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1_error_notshacrypt" ) );
+
+ gtk_widget_show( invalid_file );
+
+ g_free( invalid_file );
+
+ return;
+ }
+
+ // Now on to the actual displaying part.
+ GtkWidget* step1;
+ GtkWidget* step2;
+
+ step1 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1" ) );
+ step2 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step2" ) );
+
+ gtk_widget_show( step2 );
+ gtk_widget_hide( step1 );
+
+ g_free( step1 );
+ g_free( step2 );
+}
+
+/* Password scoring method adapted from
+ * http://www.geekwisdom.com/js/passwordmeter.js
+ */
+G_MODULE_EXPORT void asymmetric_step2_passchange( GtkEntry* button,
gpointer data ) {
+ GtkProgressBar* meter;
+
+ meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_a2_pass_strength" ) );
+
+ int len = gtk_entry_get_text_length( button );
+ const char* pass = gtk_entry_get_text( button );
+
+ if ( len == 0 ) {
+ gtk_progress_bar_set_fraction( meter, 0.0 );
+ gtk_progress_bar_set_text( meter, "Enter a password." );
+
+ g_free( meter );
+
+ return;
+ }
+
+ int score, i,
+ lower = 0,
+ upper = 0,
+ num = 0,
+ symb = 0;
+
+ // Total length
+ if ( len > 15 ) {
+ score = 18;
+ } else if ( len > 7 ) {
+ score = 12;
+ } else if ( len > 4 ) {
+ score = 6;
+ } else {
+ score = 3;
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ if ( pass[i] >= 'a' && pass[i] <= 'z' )
+ lower++;
+ else if ( pass[i] >= 'A' && pass[i] <= 'Z' )
+ upper++;
+ else if ( pass[i] >= '0' && pass[i] <= '9' )
+ num++;
+ else
+ symb++;
+ }
+
+ // Letters
+ if ( lower || upper )
+ score += 1;
+ if ( lower && upper )
+ score += 2;
+ if ( lower + upper > 1 )
+ score += 2;
+ if ( lower > 1 && upper > 1 )
+ score += 2;
+
+ // Numbers
+ if ( num == 1 )
+ score += 5;
+ if ( num > 1 )
+ score += 7;
+
+ // Symbols
+ if ( symb == 1 )
+ score += 5;
+ if ( symb > 1 )
+ score += 7;
+
+ // Combinations
+ if ( ( upper || lower ) && num )
+ score++;
+ if ( upper && lower )
+ score++;
+ if ( ( upper || lower ) && num && symb )
+ score += 2;
+ if ( upper && lower && num && symb )
+ score += 2;
+
+ gtk_progress_bar_set_fraction( meter, score / 45.0 );
+ if ( score == 45 )
+ gtk_progress_bar_set_text( meter, "Excellent" );
+ else if ( score > 39 )
+ gtk_progress_bar_set_text( meter, "Secure" );
+ else if ( score > 24 )
+ gtk_progress_bar_set_text( meter, "Good" );
+ else if ( score > 9 )
+ gtk_progress_bar_set_text( meter, "Ok" );
+ else
+ gtk_progress_bar_set_text( meter, "Bad" );
+
+ g_free( meter );
+}
+
+G_MODULE_EXPORT void asymmetric_step3() {
+ GtkWindow* step3;
+ GtkEntry* pass;
+ GtkFileChooser* file;
+ GtkProgressBar* progress;
+
+ step3 = GTK_WINDOW( gtk_builder_get_object(
builder, "asymmetric_step3" ) );
+ pass = GTK_ENTRY( gtk_builder_get_object(
builder, "field_a2_password1" ) );
+ file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_a1_select" ) );
+ progress = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_a3_progress" ) );
+
+ gtk_progress_bar_set_text( progress, NULL );
+ gtk_window_set_deletable( step3, FALSE );
+
+ FILE* f;
+ FILE* o;
+ unsigned long i, size, n;
+ SHACrypt_Context s;
+ unsigned char algos = '\0',
+ randlen = '\0';
+ static char fbuf[256] = {0},
+ obuf[256] = {0};
+ char* filename = gtk_file_chooser_get_filename( file );
+ char* tmp;
+
+ g_free( file );
+
+ f = fopen( filename, "rb" );
+
+ filename = g_strndup( filename, strlen( filename ) - 9 );
+
+ tmp = g_strdup_printf( "%s_1.shacrypt", filename );
+
+ i = 1;
+ while ( fopen( tmp, "rb" ) != NULL ) {
+ g_free( tmp );
+ i++;
+ tmp = g_strdup_printf( "%s_%lu.shacrypt", filename, i );
+ }
+
+ o = fopen( tmp, "wb" );
+
+ g_free( tmp );
+ g_free( filename );
+
+ fread( fbuf, 1, 5, f );
+
+ if ( fbuf[3] == '\1' ) {
+ randlen = '\x13';
+ fread( fbuf, 1, 20, f );
+ algos = '\x01';
+ }
+ if ( fbuf[3] == '\2' ) {
+ randlen = fgetc( f );
+ fread( fbuf, 1, (int)randlen + 1, f );
+ algos = fgetc( f );
+ }
+
+ fwrite( identifier, 1, 3, o );
+ fwrite( "\2\0", 1, 2, o );
+ fputc( randlen, o );
+ fwrite( fbuf, 1, (int)randlen + 1, o );
+ fputc( algos, o );
+
+ SHACrypt_Init( &s, g_strdup( gtk_entry_get_text( pass ) ),
gtk_entry_get_text_length( pass ), algos, fbuf, (int)randlen + 1 );
+
+ gtk_entry_set_text( pass, "" );
+
+ g_free( pass );
+
+ i = ftell( f );
+ fseek( f, 0, SEEK_END );
+ size = ftell( f ) - i;
+ fseek( f, i, SEEK_SET );
+
+ i = 0;
+ /* Do the actual encryption */
+ while ( ( n = fread( fbuf, 1, 256, f ) ) > 0 ) {
+ i += n;
+
+ gtk_progress_bar_set_fraction( progress, (double)i / size );
+
+ SHACrypt_Process( &s, fbuf, obuf, n );
+
+ fwrite( obuf, 1, n, o );
+ }
+
+ fclose( f );
+ fclose( o );
+
+ g_free( f );
+ g_free( o );
+ g_free( fbuf );
+ g_free( obuf );
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /shacrypt-gui.rc Sun Feb 21 11:21:39 2010
@@ -0,0 +1,21 @@
+1 ICON "padlock.ico"
+1 VERSIONINFO
+FILEVERSION 1,2,1,0
+PRODUCTVERSION 1,2,1,0
+FILEOS 0x00040004L
+FILETYPE 0x00000001L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "04090000"
+ BEGIN
+ VALUE "FileVersion", "1.2.1\0"
+ VALUE "CompanyName", "LlamaSlayers\0"
+ VALUE "InternalName", "shacrypt\0"
+ VALUE "LegalCopyright", "Copyright 2009 LlamaSlayers\0"
+ VALUE "FileDescription", "SHA1 enCRYPTion program\0"
+ VALUE "ProductName", "SHACrypt\0"
+ VALUE "ProductVersion", "1.2.1\0"
+ END
+ END
+END
=======================================
--- /dev/null
+++ /test-helper.c Sun Feb 21 11:21:39 2010
@@ -0,0 +1,38 @@
+/**
+ * SHACrypt test helper - Generates random data
+ *
+ * SHACrypt - Encrypt files using cryptographic hash functions
+ * Copyright (C) 2009-10 LlamaSlayers
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ * @since 1.2.2
+ * @version 1.2.2
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "shacrypt.h"
+
+int main( int argc, char **argv ) {
+ FILE *rand = fopen( argv[1], "wb" );
+ char data[1024] = {0};
+ SHACrypt_GenRand( data, 1024 );
+ fwrite( "\0", 1, 1, rand );
+ fwrite( data, 1, 1000, rand );
+ fclose( rand );
+
+ return 0;
+}
=======================================
--- /glade-helper.c Sun Nov 15 14:25:05 2009
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * SHACrypt graphical user interface (compile-time helper)
- *
- * SHACrypt - Encrypt files using cryptographic hash functions
- * Copyright (C) 2009 LlamaSlayers
- *
- * 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- * @since 1.2.1
- * @version 1.2.1
- */
-#include <stdio.h>
-#include <stdlib.h>
-
-int main( int argc, char** argv ) {
- FILE* glade;
- FILE* out;
-
- glade = fopen( "shacrypt.glade", "r" );
-
- if ( !glade ) {
- perror( "Could not open glade file" );
- exit( 1 );
- }
-
- out = fopen( "glade.h", "w" );
-
- if ( !out ) {
- perror( "Could not open header file" );
- exit( 1 );
- }
-
- fwrite( "#ifndef _SHACRYPT_GLADE_H_\n#define _SHACRYPT_GLADE_H_\nconst
char* shacrypt_glade = \"", 1, 84, out );
-
- int c;
-
- while ( 1 ) {
- c = fgetc( glade );
-
- if ( c == EOF )
- break;
- if ( c == '\n' || c == '\r' ) {
- fwrite( "\\n\"\n\"", 1, 5, out );
- continue;
- }
- if ( c == '"' || c == '\\' )
- fputc( '\\', out );
-
- fputc( c, out );
- }
-
- fwrite( "\";\n#endif\n", 1, 10, out );
-
- return 0;
-}
=======================================
--- /glade.c Sun Nov 15 14:25:05 2009
+++ /dev/null
@@ -1,1168 +0,0 @@
-/**
- * SHACrypt graphical user interface
- *
- * SHACrypt - Encrypt files using cryptographic hash functions
- * Copyright (C) 2009 LlamaSlayers
- *
- * 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 3 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, see <http://www.gnu.org/licenses/>.
- *
- * @since 1.2.1
- * @version 1.2.1
- */
-
-#include <gtk/gtk.h>
-#include <gdk-pixbuf/gdk-pixdata.h>
-#include <stdio.h>
-#include <string.h>
-#include "shacrypt.h"
-#include "glade.h"
-#include "shacrypt-icon.h"
-
-static const char identifier[3] = "\xA7\x09\xC3";
-
-GtkBuilder* builder;
-
-/* Encryption */
-G_MODULE_EXPORT void button_pressed_encrypt( GtkWidget* button, gpointer
data ) {
- GtkWidget* step1;
- step1 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step1" )
);
-
- gtk_widget_show( step1 );
-
- g_free( step1 );
-}
-
-G_MODULE_EXPORT void encrypt_step1_cancel( GtkWidget* button, gpointer
data ) {
- GtkWidget* step1;
- step1 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step1" )
);
-
- gtk_widget_hide( step1 );
-
- g_free( step1 );
-}
-
-G_MODULE_EXPORT void encrypt_step1_ok( GtkWidget* button, gpointer data ) {
- // Make sure there's actually a file selected.
- GtkFileChooser* file;
-
- file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_e1_select" ) );
-
- if ( gtk_file_chooser_get_filename( file ) == NULL ) {
- g_free( file );
- return;
- }
-
- g_free( file );
-
- // This part of the reset is here because Glade won't let me set
default values.
- GtkToggleButton* sha1;
- GtkToggleButton* sha224;
- GtkToggleButton* sha256;
- GtkToggleButton* sha384;
- GtkToggleButton* sha512;
- GtkToggleButton* md5;
- GtkToggleButton* cubehash;
- GtkToggleButton* whirlpool;
- GtkToggleButton* randomseed;
- GtkWidget* seed;
-
- sha1 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha1" ) );
- sha224 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha224" ) );
- sha256 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha256" ) );
- sha384 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha384" ) );
- sha512 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha512" ) );
- md5 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_md5" ) );
- cubehash = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_cubehash" ) );
- whirlpool = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_whirlpool" ) );
- randomseed = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "radio_e2_randomseed_off" ) );
- seed = GTK_WIDGET( gtk_builder_get_object(
builder, "hscale_e2_randomseed" ) );
-
- gtk_toggle_button_set_active( sha1, TRUE );
- gtk_toggle_button_set_active( sha224, FALSE );
- gtk_toggle_button_set_active( sha256, FALSE );
- gtk_toggle_button_set_active( sha384, FALSE );
- gtk_toggle_button_set_active( sha512, FALSE );
- gtk_toggle_button_set_active( md5, FALSE );
- gtk_toggle_button_set_active( cubehash, FALSE );
- gtk_toggle_button_set_active( whirlpool, FALSE );
- gtk_toggle_button_set_active( randomseed, TRUE );
- gtk_widget_set_sensitive( seed, FALSE );
- gtk_range_set_value( GTK_RANGE( seed ), 20.0 );
-
- g_free( sha1 );
- g_free( sha224 );
- g_free( sha256 );
- g_free( sha384 );
- g_free( sha512 );
- g_free( md5 );
- g_free( cubehash );
- g_free( whirlpool );
- g_free( randomseed );
- g_free( seed );
-
- // Now on to the actual displaying part.
- GtkWidget* step1;
- GtkWidget* step2;
-
- step1 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step1" )
);
- step2 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step2" )
);
-
- gtk_widget_show( step2 );
- gtk_widget_hide( step1 );
-
- g_free( step1 );
- g_free( step2 );
-}
-
-/* Password scoring method adapted from
- * http://www.geekwisdom.com/js/passwordmeter.js
- */
-G_MODULE_EXPORT void encrypt_step2_passchange( GtkEntry* button, gpointer
data ) {
- GtkProgressBar* meter;
-
- meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
-
- int len = gtk_entry_get_text_length( button );
- const char* pass = gtk_entry_get_text( button );
-
- if ( len == 0 ) {
- gtk_progress_bar_set_fraction( meter, 0.0 );
- gtk_progress_bar_set_text( meter, "Enter a password." );
-
- g_free( meter );
-
- return;
- }
-
- int score, i,
- lower = 0,
- upper = 0,
- num = 0,
- symb = 0;
-
- // Total length
- if ( len > 15 ) {
- score = 18;
- } else if ( len > 7 ) {
- score = 12;
- } else if ( len > 4 ) {
- score = 6;
- } else {
- score = 3;
- }
-
- for ( i = 0; i < len; i++ ) {
- if ( pass[i] >= 'a' && pass[i] <= 'z' )
- lower++;
- else if ( pass[i] >= 'A' && pass[i] <= 'Z' )
- upper++;
- else if ( pass[i] >= '0' && pass[i] <= '9' )
- num++;
- else
- symb++;
- }
-
- // Letters
- if ( lower || upper )
- score += 1;
- if ( lower && upper )
- score += 2;
- if ( lower + upper > 1 )
- score += 2;
- if ( lower > 1 && upper > 1 )
- score += 2;
-
- // Numbers
- if ( num == 1 )
- score += 5;
- if ( num > 1 )
- score += 7;
-
- // Symbols
- if ( symb == 1 )
- score += 5;
- if ( symb > 1 )
- score += 7;
-
- // Combinations
- if ( ( upper || lower ) && num )
- score++;
- if ( upper && lower )
- score++;
- if ( ( upper || lower ) && num && symb )
- score += 2;
- if ( upper && lower && num && symb )
- score += 2;
-
- gtk_progress_bar_set_fraction( meter, score / 45.0 );
- if ( score == 45 )
- gtk_progress_bar_set_text( meter, "Excellent" );
- else if ( score > 39 )
- gtk_progress_bar_set_text( meter, "Secure" );
- else if ( score > 24 )
- gtk_progress_bar_set_text( meter, "Good" );
- else if ( score > 9 )
- gtk_progress_bar_set_text( meter, "Ok" );
- else
- gtk_progress_bar_set_text( meter, "Bad" );
-
- g_free( meter );
-}
-
-G_MODULE_EXPORT unsigned char encrypt_step2_get_algos() {
- unsigned char algos = '\0';
-
- GtkToggleButton* sha1;
- GtkToggleButton* sha224;
- GtkToggleButton* sha256;
- GtkToggleButton* sha384;
- GtkToggleButton* sha512;
- GtkToggleButton* md5;
- GtkToggleButton* cubehash;
- GtkToggleButton* whirlpool;
-
- sha1 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha1" ) );
- sha224 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha224" ) );
- sha256 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha256" ) );
- sha384 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha384" ) );
- sha512 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha512" ) );
- md5 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_md5" ) );
- cubehash = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_cubehash" ) );
- whirlpool = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_whirlpool" ) );
-
- if ( gtk_toggle_button_get_active( sha1 ) )
- algos |= '\x01';
- if ( gtk_toggle_button_get_active( sha224 ) )
- algos |= '\x02';
- if ( gtk_toggle_button_get_active( sha256 ) )
- algos |= '\x04';
- if ( gtk_toggle_button_get_active( sha384 ) )
- algos |= '\x08';
- if ( gtk_toggle_button_get_active( sha512 ) )
- algos |= '\x10';
- if ( gtk_toggle_button_get_active( md5 ) )
- algos |= '\x20';
- if ( gtk_toggle_button_get_active( cubehash ) )
- algos |= '\x40';
- if ( gtk_toggle_button_get_active( whirlpool ) )
- algos |= '\x80';
-
- g_free( sha1 );
- g_free( sha224 );
- g_free( sha256 );
- g_free( sha384 );
- g_free( sha512 );
- g_free( md5 );
- g_free( cubehash );
- g_free( whirlpool );
-
- return algos;
-}
-
-G_MODULE_EXPORT void encrypt_step2_check_hashalgo( GtkWidget* button,
gpointer data ) {
- int seedlen = SHACrypt_GetLength( encrypt_step2_get_algos() );
- if ( !seedlen ) {
- GtkToggleButton* sha1;
- sha1 = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "check_e2_sha1" ) );
-
- gtk_toggle_button_set_active( sha1, TRUE );
-
- seedlen = 20;
- }
-
- GtkToggleButton* randomseed;
- GtkWidget* seed;
-
- randomseed = GTK_TOGGLE_BUTTON( gtk_builder_get_object(
builder, "radio_e2_randomseed_off" ) );
- seed = GTK_WIDGET( gtk_builder_get_object(
builder, "hscale_e2_randomseed" ) );
-
- if ( gtk_toggle_button_get_active( randomseed ) ) {
- gtk_widget_set_sensitive( seed, FALSE );
-
- gtk_range_set_value( GTK_RANGE( seed ), (gdouble)seedlen );
- } else {
- gtk_widget_set_sensitive( seed, TRUE );
- }
-
- g_free( randomseed );
- g_free( seed );
-}
-
-G_MODULE_EXPORT void encrypt_step3() {
- GtkWindow* step3;
- GtkEntry* pass;
- GtkFileChooser* file;
- GtkProgressBar* progress;
- GtkRange* seedlen;
-
- step3 = GTK_WINDOW( gtk_builder_get_object( builder, "encrypt_step3" )
);
- pass = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
- file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_e1_select" ) );
- progress = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e3_progress" ) );
- seedlen = GTK_RANGE( gtk_builder_get_object(
builder, "hscale_e2_randomseed" ) );
-
- gtk_progress_bar_set_text( progress, NULL );
- gtk_window_set_deletable( step3, FALSE );
-
- FILE* f;
- FILE* o;
- unsigned long i, n,
- size;
- SHACrypt_Context s;
- unsigned char algos = encrypt_step2_get_algos();
- static char fbuf[256] = {0},
- obuf[256] = {0},
- tmp[1024] = {0};
- char* filename;
-
- filename = gtk_file_chooser_get_filename( file );
- g_free( file );
-
- n = (int)gtk_range_get_value( seedlen );
- g_free( seedlen );
-
- f = fopen( filename, "rb" );
-
- sprintf( tmp, "%s.shacrypt", filename );
-
- i = 0;
- while ( ( o = fopen( tmp, "rb" ) ) != NULL ) {
- g_free( o );
- i++;
- sprintf( tmp, "%s_%lu.shacrypt", filename, i );
- }
-
- o = fopen( tmp, "wb" );
-
- g_free( tmp );
- g_free( filename );
-
- for ( i = 0; i < n; i++ )
- fbuf[i] = g_random_int_range( 0, 255 );
-
- SHACrypt_Init( &s, (char*)gtk_entry_get_text( pass ),
gtk_entry_get_text_length( pass ), algos, fbuf, n );
- g_free( pass );
-
- fwrite( identifier, 1, 3, o ); // Identifier
- fwrite( "\2\0", 1, 2, o ); // Format version
- fputc( (unsigned char)(n - 1), o ); // Random seed length
- fwrite( fbuf, 1, n, o ); // Random seed
- fputc( algos, o ); // Hash alogithms used
-
- fseek( f, 0, SEEK_END );
- size = ftell( f );
- fseek( f, 0, SEEK_SET );
-
- i = 0;
-
- /* Do the actual encryption */
- while ( ( n = fread( fbuf, 1, 256, f ) ) > 0 ) {
- i += n;
-
- gtk_progress_bar_set_fraction( progress, (double)i / size );
-
- SHACrypt_Process( &s, fbuf, obuf, n );
-
- fwrite( obuf, 1, n, o );
- }
-
- fclose( f );
- fclose( o );
-
- g_free( f );
- g_free( o );
- g_free( fbuf );
- g_free( obuf );
-
- GtkEntry* pass1;
- GtkEntry* pass2;
- GtkProgressBar* meter;
-
- pass1 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
- pass2 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password2" ) );
- meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
-
- gtk_entry_set_text( pass1, "" );
- gtk_entry_set_text( pass2, "" );
- gtk_progress_bar_set_text( meter, "Enter a password" );
- gtk_progress_bar_set_fraction( meter, 0.0 );
-
- g_free( pass1 );
- g_free( pass2 );
- g_free( meter );
-
- gtk_progress_bar_set_text( progress, "Done!" );
- gtk_window_set_deletable( step3, TRUE );
-
- g_free( progress );
- g_free( step3 );
-}
-
-G_MODULE_EXPORT void encrypt_step2_ok( GtkWidget* button, gpointer data ) {
- GtkNotebook* tabs;
- GtkEntry* pass1;
- GtkEntry* pass2;
-
- tabs = GTK_NOTEBOOK( gtk_builder_get_object(
builder, "notebook_e2_tabs" ) );
- pass1 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
- pass2 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password2" ) );
-
- if ( !gtk_entry_get_text_length( pass1 ) ) {
- gtk_notebook_set_current_page( tabs, 0 );
- gtk_widget_grab_focus( GTK_WIDGET( pass1 ) );
-
- g_free( pass1 );
- g_free( pass2 );
- g_free( tabs );
-
- return;
- }
-
- if ( !gtk_entry_get_text_length( pass2 ) ) {
- gtk_notebook_set_current_page( tabs, 0 );
- gtk_widget_grab_focus( GTK_WIDGET( pass2 ) );
-
- g_free( pass1 );
- g_free( pass2 );
- g_free( tabs );
-
- return;
- }
-
- g_free( tabs );
-
- if ( strcmp( gtk_entry_get_text( pass1 ), gtk_entry_get_text( pass2 )
) == 0 ) {
- GtkWidget* step2;
- GtkWidget* step3;
-
- step2 = GTK_WIDGET( gtk_builder_get_object(
builder, "encrypt_step2" ) );
- step3 = GTK_WIDGET( gtk_builder_get_object(
builder, "encrypt_step3" ) );
-
- gtk_widget_show( step3 );
- gtk_widget_hide( step2 );
-
- g_free( step2 );
- g_free( step3 );
-
- g_thread_create( (GThreadFunc)encrypt_step3, NULL, FALSE, NULL );
- } else {
- GtkProgressBar* meter;
-
- meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
-
- gtk_progress_bar_set_text( meter, "Passwords do not match!" );
-
- g_free( meter );
- }
-
- g_free( pass1 );
- g_free( pass2 );
-}
-
-G_MODULE_EXPORT void encrypt_step2_cancel( GtkWidget* button, gpointer
data ) {
- GtkWidget* step2;
- GtkEntry* pass1;
- GtkEntry* pass2;
- GtkProgressBar* meter;
-
- step2 = GTK_WIDGET( gtk_builder_get_object( builder, "encrypt_step2" )
);
- pass1 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password1" ) );
- pass2 = GTK_ENTRY( gtk_builder_get_object(
builder, "field_e2_password2" ) );
- meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_e2_pass_strength" ) );
-
- gtk_widget_hide( step2 );
-
- gtk_entry_set_text( pass1, "" );
- gtk_entry_set_text( pass2, "" );
- gtk_progress_bar_set_text( meter, "Enter a password" );
- gtk_progress_bar_set_fraction( meter, 0.0 );
-
- g_free( step2 );
- g_free( pass1 );
- g_free( pass2 );
- g_free( meter );
-}
-
-/* Decryption */
-G_MODULE_EXPORT void button_pressed_decrypt( GtkWidget* button, gpointer
data ) {
- GtkWidget* step1;
- step1 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step1" )
);
-
- gtk_widget_show( step1 );
-
- g_free( step1 );
-}
-
-G_MODULE_EXPORT void decrypt_step1_ok( GtkWidget* button, gpointer data ) {
- GtkFileChooser* file;
-
- file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_d1_select" ) );
-
- // Make sure there's actually a file selected.
- if ( gtk_file_chooser_get_filename( file ) == NULL ) {
- g_free( file );
- return;
- }
-
- // Make sure it's an SHACrypt file.
- FILE* f;
- char fbuf[5];
-
- f = fopen( gtk_file_chooser_get_filename( file ), "rb" );
- g_free( file );
-
- if ( f == NULL || fread( fbuf, 1, 5, f ) != 5 )
- strcpy( fbuf, "fail." ); // Make sure we have all 5 bytes set.
-
- if ( f != NULL ) {
- fclose( f );
-
- g_free( f );
- }
-
- if ( strncmp( fbuf, identifier, 3 ) != 0 || fbuf[3] < '\1' || fbuf[3]
> '\2' || fbuf[4] != '\0' ) {
- g_free( fbuf );
-
- GtkWidget* invalid_file;
-
- invalid_file = GTK_WIDGET( gtk_builder_get_object(
builder, "decrypt_step1_error_notshacrypt" ) );
-
- gtk_widget_show( invalid_file );
-
- g_free( invalid_file );
-
- return;
- }
-
- GtkWidget* step1;
- GtkWidget* step2;
-
- step1 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step1" )
);
- step2 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step2" )
);
-
- gtk_widget_show( step2 );
- gtk_widget_hide( step1 );
-
- g_free( step1 );
- g_free( step2 );
-}
-
-G_MODULE_EXPORT void decrypt_step1_cancel( GtkWidget* button, gpointer
data ) {
- GtkWidget* step1;
- step1 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step1" )
);
-
- gtk_widget_hide( step1 );
-
- g_free( step1 );
-}
-
-G_MODULE_EXPORT void decrypt_step1_error_ok( GtkWidget* button, gpointer
data ) {
- GtkWidget* error;
- error = GTK_WIDGET( gtk_builder_get_object(
builder, "decrypt_step1_error_notshacrypt" ) );
-
- gtk_widget_hide( error );
-
- g_free( error );
-}
-
-G_MODULE_EXPORT void decrypt_step3() {
- GtkWindow* step3;
- GtkEntry* pass;
- GtkFileChooser* file;
- GtkProgressBar* progress;
-
- step3 = GTK_WINDOW( gtk_builder_get_object( builder, "decrypt_step3" )
);
- pass = GTK_ENTRY( gtk_builder_get_object( builder, "field_d2_password"
) );
- file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_d1_select" ) );
- progress = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_d3_progress" ) );
-
- gtk_progress_bar_set_text( progress, NULL );
- gtk_window_set_deletable( step3, FALSE );
-
- FILE* f;
- FILE* o;
- unsigned long i, size, n;
- SHACrypt_Context s;
- unsigned char algos = '\0',
- randlen = '\0';
- static char fbuf[256] = {0},
- obuf[256] = {0};
- char** filename = g_strsplit( gtk_file_chooser_get_filename( file
), ".", -1 );
- char* filename_prefix;
- char* filename_suffix;
- char* tmp;
-
- g_free( file );
-
- f = fopen( g_strjoinv( ".", filename ), "rb" );
-
- i = g_strv_length( filename );
-
- if ( i == 2 ) {
- filename_suffix = "";
- filename_prefix = g_strdup( filename[0] );
- } else {
- n = strlen( filename[i - 1] ) + strlen( filename[i - 2] ) + 2;
-
- filename_suffix = g_strconcat( ".", filename[i - 2], NULL );
-
- tmp = g_strjoinv( ".", filename );
- filename_prefix = g_strndup( tmp, strlen( tmp ) - n );
- g_free( tmp );
- }
- g_strfreev( filename );
-
- tmp = g_strdup_printf( "%s%s", filename_prefix, filename_suffix );
-
-
- i = 0;
- while ( fopen( tmp, "rb" ) != NULL ) {
- g_free( tmp );
- i++;
- tmp = g_strdup_printf( "%s_%lu%s", filename_prefix, i,
filename_suffix );
- }
-
- o = fopen( tmp, "wb" );
-
- g_free( tmp );
- g_free( filename_prefix );
- g_free( filename_suffix );
-
- fread( fbuf, 1, 5, f );
-
- if ( fbuf[3] == '\1' ) {
- randlen = '\x13';
- fread( fbuf, 1, 20, f );
- algos = '\x01';
- }
- if ( fbuf[3] == '\2' ) {
- randlen = fgetc( f );
- fread( fbuf, 1, (int)randlen + 1, f );
- algos = fgetc( f );
- }
-
- SHACrypt_Init( &s, g_strdup( gtk_entry_get_text( pass ) ),
gtk_entry_get_text_length( pass ), algos, fbuf, (int)randlen + 1 );
-
- gtk_entry_set_text( pass, "" );
-
- g_free( pass );
-
- i = ftell( f );
- fseek( f, 0, SEEK_END );
- size = ftell( f ) - i;
- fseek( f, i, SEEK_SET );
-
- i = 0;
- /* Do the actual encryption */
- while ( ( n = fread( fbuf, 1, 256, f ) ) > 0 ) {
- i += n;
-
- gtk_progress_bar_set_fraction( progress, (double)i / size );
-
- SHACrypt_Process( &s, fbuf, obuf, n );
-
- fwrite( obuf, 1, n, o );
- }
-
- fclose( f );
- fclose( o );
-
- g_free( f );
- g_free( o );
- g_free( fbuf );
- g_free( obuf );
-
- gtk_progress_bar_set_text( progress, "Done!" );
- gtk_window_set_deletable( step3, TRUE );
-
- g_free( progress );
- g_free( step3 );
-}
-
-G_MODULE_EXPORT void decrypt_step2_ok( GtkWidget* button, gpointer data ) {
- GtkEntry* pass;
-
- pass = GTK_ENTRY( gtk_builder_get_object( builder, "field_d2_password"
) );
-
- if ( !gtk_entry_get_text_length( pass ) ) {
- gtk_widget_grab_focus( GTK_WIDGET( pass ) );
-
- g_free( pass );
-
- return;
- }
- g_free( pass );
-
- GtkWidget* step2;
- GtkWidget* step3;
-
- step2 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step2" )
);
- step3 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step3" )
);
-
- gtk_widget_show( step3 );
- gtk_widget_hide( step2 );
-
- g_free( step2 );
- g_free( step3 );
-
- g_thread_create( (GThreadFunc)decrypt_step3, NULL, FALSE, NULL );
-}
-
-G_MODULE_EXPORT void decrypt_step2_cancel( GtkWidget* button, gpointer
data ) {
- GtkWidget* step2;
- GtkEntry* pass;
-
- step2 = GTK_WIDGET( gtk_builder_get_object( builder, "decrypt_step2" )
);
- pass = GTK_ENTRY( gtk_builder_get_object( builder, "field_d2_password"
) );
-
- gtk_widget_hide( step2 );
- gtk_entry_set_text( pass, "" );
-
- g_free( step2 );
- g_free( pass );
-}
-
-/* Asymmetric */
-G_MODULE_EXPORT void button_pressed_asymmetric( GtkWidget* button,
gpointer data ) {
- GtkWidget* step1;
- step1 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1" ) );
-
- gtk_widget_show( step1 );
-
- g_free( step1 );
-}
-
-G_MODULE_EXPORT void asymmetric_step1_cancel( GtkWidget* button, gpointer
data ) {
- GtkWidget* step1;
- step1 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1" ) );
-
- gtk_widget_hide( step1 );
-
- g_free( step1 );
-}
-
-G_MODULE_EXPORT void asymmetric_step1_ok( GtkWidget* button, gpointer data
) {
- GtkFileChooser* file;
-
- file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_a1_select" ) );
-
- // Make sure there's actually a file selected.
- if ( gtk_file_chooser_get_filename( file ) == NULL ) {
- g_free( file );
- return;
- }
-
- // Make sure it's an SHACrypt file.
- FILE* f;
- char fbuf[5];
-
- f = fopen( gtk_file_chooser_get_filename( file ), "rb" );
- g_free( file );
-
- if ( f == NULL || fread( fbuf, 1, 5, f ) != 5 )
- strcpy( fbuf, "fail." ); // Make sure we have all 5 bytes set.
-
- if ( f != NULL ) {
- fclose( f );
-
- g_free( f );
- }
-
- if ( strncmp( fbuf, identifier, 3 ) != 0 || fbuf[3] < '\1' || fbuf[3]
> '\2' || fbuf[4] != '\0' ) {
- g_free( fbuf );
-
- GtkWidget* invalid_file;
-
- invalid_file = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1_error_notshacrypt" ) );
-
- gtk_widget_show( invalid_file );
-
- g_free( invalid_file );
-
- return;
- }
-
- // Now on to the actual displaying part.
- GtkWidget* step1;
- GtkWidget* step2;
-
- step1 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step1" ) );
- step2 = GTK_WIDGET( gtk_builder_get_object(
builder, "asymmetric_step2" ) );
-
- gtk_widget_show( step2 );
- gtk_widget_hide( step1 );
-
- g_free( step1 );
- g_free( step2 );
-}
-
-/* Password scoring method adapted from
- * http://www.geekwisdom.com/js/passwordmeter.js
- */
-G_MODULE_EXPORT void asymmetric_step2_passchange( GtkEntry* button,
gpointer data ) {
- GtkProgressBar* meter;
-
- meter = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_a2_pass_strength" ) );
-
- int len = gtk_entry_get_text_length( button );
- const char* pass = gtk_entry_get_text( button );
-
- if ( len == 0 ) {
- gtk_progress_bar_set_fraction( meter, 0.0 );
- gtk_progress_bar_set_text( meter, "Enter a password." );
-
- g_free( meter );
-
- return;
- }
-
- int score, i,
- lower = 0,
- upper = 0,
- num = 0,
- symb = 0;
-
- // Total length
- if ( len > 15 ) {
- score = 18;
- } else if ( len > 7 ) {
- score = 12;
- } else if ( len > 4 ) {
- score = 6;
- } else {
- score = 3;
- }
-
- for ( i = 0; i < len; i++ ) {
- if ( pass[i] >= 'a' && pass[i] <= 'z' )
- lower++;
- else if ( pass[i] >= 'A' && pass[i] <= 'Z' )
- upper++;
- else if ( pass[i] >= '0' && pass[i] <= '9' )
- num++;
- else
- symb++;
- }
-
- // Letters
- if ( lower || upper )
- score += 1;
- if ( lower && upper )
- score += 2;
- if ( lower + upper > 1 )
- score += 2;
- if ( lower > 1 && upper > 1 )
- score += 2;
-
- // Numbers
- if ( num == 1 )
- score += 5;
- if ( num > 1 )
- score += 7;
-
- // Symbols
- if ( symb == 1 )
- score += 5;
- if ( symb > 1 )
- score += 7;
-
- // Combinations
- if ( ( upper || lower ) && num )
- score++;
- if ( upper && lower )
- score++;
- if ( ( upper || lower ) && num && symb )
- score += 2;
- if ( upper && lower && num && symb )
- score += 2;
-
- gtk_progress_bar_set_fraction( meter, score / 45.0 );
- if ( score == 45 )
- gtk_progress_bar_set_text( meter, "Excellent" );
- else if ( score > 39 )
- gtk_progress_bar_set_text( meter, "Secure" );
- else if ( score > 24 )
- gtk_progress_bar_set_text( meter, "Good" );
- else if ( score > 9 )
- gtk_progress_bar_set_text( meter, "Ok" );
- else
- gtk_progress_bar_set_text( meter, "Bad" );
-
- g_free( meter );
-}
-
-G_MODULE_EXPORT void asymmetric_step3() {
- GtkWindow* step3;
- GtkEntry* pass;
- GtkFileChooser* file;
- GtkProgressBar* progress;
-
- step3 = GTK_WINDOW( gtk_builder_get_object(
builder, "asymmetric_step3" ) );
- pass = GTK_ENTRY( gtk_builder_get_object(
builder, "field_a2_password1" ) );
- file = GTK_FILE_CHOOSER( gtk_builder_get_object(
builder, "file_a1_select" ) );
- progress = GTK_PROGRESS_BAR( gtk_builder_get_object(
builder, "progressbar_a3_progress" ) );
-
- gtk_progress_bar_set_text( progress, NULL );
- gtk_window_set_deletable( step3, FALSE );
-
- FILE* f;
- FILE* o;
- unsigned long i, size, n;
- SHACrypt_Context s;
- unsigned char algos = '\0',
- randlen = '\0';
- static char fbuf[256] = {0},
- obuf[256] = {0};
- char* filename = gtk_file_chooser_get_filename( file );
- char* tmp;
-
- g_free( file );
-
- f = fopen( filename, "rb" );
-
- filename = g_strndup( filename, strlen( filename ) - 9 );
-
- tmp = g_strdup_printf( "%s_1.shacrypt", filename );
-
- i = 1;
- while ( fopen( tmp, "rb" ) != NULL ) {
- g_free( tmp );
- i++;
- tmp = g_strdup_printf( "%s_%lu.shacrypt", filename, i );
- }
-
- o = fopen( tmp, "wb" );
-
- g_free( tmp );
- g_free( filename );
-
- fread( fbuf, 1, 5, f );
-
- if ( fbuf[3] == '\1' ) {
- randlen = '\x13';
- fread( fbuf, 1, 20, f );
- algos = '\x01';
- }
- if ( fbuf[3] == '\2' ) {
- randlen = fgetc( f );
- fread( fbuf, 1, (int)randlen + 1, f );
- algos = fgetc( f );
- }
-
- fwrite( identifier, 1, 3, o );
- fwrite( "\2\0", 1, 2, o );
- fputc( randlen, o );
- fwrite( fbuf, 1, (int)randlen + 1, o );
- fputc( algos, o );
-
- SHACrypt_Init( &s, g_strdup( gtk_entry_get_text( pass ) ),
gtk_entry_get_text_length( pass ), algos, fbuf, (int)randlen + 1 );
-
- gtk_entry_set_text( pass, "" );
-
- g_free( pass );
-
- i = ftell( f );
- fseek( f, 0, SEEK_END );
- size = ftell( f ) - i;
- fseek( f, i, SEEK_SET );
-
- i = 0;
- /* Do the actual encryption */
- while ( ( n = fread( fbuf, 1, 256, f ) ) > 0 ) {
- i += n;
-
- gtk_progress_bar_set_fraction( progress, (double)i / size );
-
- SHACrypt_Process( &s, fbuf, obuf, n );
-
- fwrite( obuf, 1, n, o );
- }
-
- fclose( f );
- fclose( o );
-
- g_free( f );
- g_free( o );
- g_free( fbuf );
- g_free( obuf );
***The diff for this file has been truncated for email.***
=======================================
--- /license.txt Thu Oct 22 16:06:58 2009
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. 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
-them 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 prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. 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.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey 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;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If 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 convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU 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 that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- 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.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-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.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- 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
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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 3 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, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program 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, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or
school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU 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 Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
=======================================
--- /shacrypt-gtk.rc Sun Nov 15 14:25:05 2009
+++ /dev/null
@@ -1,21 +0,0 @@
-1 ICON "padlock.ico"
-1 VERSIONINFO
-FILEVERSION 1,2,1,0
-PRODUCTVERSION 1,2,1,0
-FILEOS 0x00040004L
-FILETYPE 0x00000001L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "04090000"
- BEGIN
- VALUE "FileVersion", "1.2.1\0"
- VALUE "CompanyName", "LlamaSlayers\0"
- VALUE "InternalName", "shacrypt\0"
- VALUE "LegalCopyright", "Copyright 2009 LlamaSlayers\0"
- VALUE "FileDescription", "SHA1 enCRYPTion program\0"
- VALUE "ProductName", "SHACrypt\0"
- VALUE "ProductVersion", "1.2.1\0"
- END
- END
-END
=======================================
--- /ChangeLog Sat Feb 20 11:49:56 2010
+++ /ChangeLog Sun Feb 21 11:21:39 2010
@@ -1,3 +1,27 @@
+2010-02-21 Nightgunner5 <nightg...@llamaslayers.net>
+
+ * Makefile.am, configure.ac, configure, config.guess, config.sub,
+ aclocal.m4, config.h.in, compile:
+ ./configure now supports Windows (MinGW32) automatically.
+
+ Changed the bug report email address to something more sensible.
+
+ Third party .c files are now compiled in the third-party folder
+ to make compiling less confusing.
+
+ * shacrypt.glade, glade.sed, gui.c, glade.c, glade-helper.c:
+ The GUI version can now be compiled by using the --enable-gui
+ option on ./configure.
+
+ glade.h is now created using a SED script, not a C program.
+
+ * tests/t2.sh, tests/t3.sh, tests/t4.sh, test-helper.c:
+ Converted the tests to use test-helper instead of dd (which is
+ not available by default on MinGW32)
+
+ * license.txt:
+ Removed because COPYING already contains the same content.
+
2010-02-20 Nightgunner5 <nightg...@llamaslayers.net>

* tests/t1.sh, tests/t2.sh, tests/t3.sh, tests/t4.sh, tests.php,
=======================================
--- /Makefile.am Sat Feb 20 11:49:56 2010
+++ /Makefile.am Sun Feb 21 11:21:39 2010
@@ -1,16 +1,37 @@
## Process this file with automake to produce Makefile.in
third_party_hashfuncs = third-party/sha1.c third-party/sha2.c
third-party/md5c.c third-party/cubehash.c third-party/whirlpool.c

+EXTRA_PROGRAMS = shacrypt-gui
+EXTRA_DIST = tests test-helper.c third-party shacrypt.glade
+
+include_HEADERS = shacrypt.h
+
lib_LIBRARIES = libshacrypt.a
libshacrypt_a_SOURCES = shacrypt.h shacrypt.c $(third_party_hashfuncs)
-
-bin_PROGRAMS = shacrypt
-shacrypt_SOURCES = commandline.c
+libshacrypt_a_CFLAGS = $(DWINDOWS)
+
+bin_PROGRAMS = shacrypt $(GUI)
+shacrypt_SOURCES = commandline.c shacrypt.h
shacrypt_LDADD = libshacrypt.a

-TESTS = tests/t1.sh tests/t2.sh tests/t3.sh tests/t4.sh
-XFAIL_TESTS = tests/t1.sh
-
-EXTRA_DIST = tests
+BUILT_SOURCES = glade.h
+CLEANFILES = glade.h
+
+glade.h: shacrypt.glade glade.sed Makefile
+ $(SED) -f glade.sed -e 's/[@]VERSION[@]/$(VERSION)/g' < shacrypt.glade >
glade.h
+
+shacrypt_gui_SOURCES = gui.c shacrypt.h shacrypt-icon.h
+nodist_shacrypt_gui_SOURCES = glade.h
+shacrypt_gui_LDADD = libshacrypt.a $(GUI_LIBS)
+shacrypt_gui_CFLAGS = $(GUI_CFLAGS) $(MWINDOWS)
+
+# For systems without dd and/or
+# /dev/urandom and/or /dev/zero
+check_PROGRAMS = test-helper
+test_helper_SOURCES = test-helper.c shacrypt.h
+test_helper_LDADD = libshacrypt.a
+
+TESTS = $(TESTS_CLI)
+XFAIL_TESTS = tests/t1.sh

dist_man_MANS = shacrypt.1
=======================================
--- /Makefile.in Sat Feb 20 11:49:56 2010
+++ /Makefile.in Sun Feb 21 11:21:39 2010
@@ -16,6 +16,7 @@
@SET_MAKE@


+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -33,12 +34,17 @@
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-bin_PROGRAMS = shacrypt$(EXEEXT)
+build_triplet = @build@
+host_triplet = @host@
+EXTRA_PROGRAMS = shacrypt-gui$(EXEEXT)
+bin_PROGRAMS = shacrypt$(EXEEXT) $(GUI)
+check_PROGRAMS = test-helper$(EXEEXT)
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- depcomp install-sh missing
+DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
+ $(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
+ ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
+ install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -70,20 +76,37 @@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)"
LIBRARIES = $(lib_LIBRARIES)
AR = ar
ARFLAGS = cru
libshacrypt_a_AR = $(AR) $(ARFLAGS)
libshacrypt_a_LIBADD =
-am__objects_1 = sha1.$(OBJEXT) sha2.$(OBJEXT) md5c.$(OBJEXT) \
- cubehash.$(OBJEXT) whirlpool.$(OBJEXT)
-am_libshacrypt_a_OBJECTS = shacrypt.$(OBJEXT) $(am__objects_1)
+am__dirstamp = $(am__leading_dot)dirstamp
+am__objects_1 = third-party/libshacrypt_a-sha1.$(OBJEXT) \
+ third-party/libshacrypt_a-sha2.$(OBJEXT) \
+ third-party/libshacrypt_a-md5c.$(OBJEXT) \
+ third-party/libshacrypt_a-cubehash.$(OBJEXT) \
+ third-party/libshacrypt_a-whirlpool.$(OBJEXT)
+am_libshacrypt_a_OBJECTS = libshacrypt_a-shacrypt.$(OBJEXT) \
+ $(am__objects_1)
libshacrypt_a_OBJECTS = $(am_libshacrypt_a_OBJECTS)
PROGRAMS = $(bin_PROGRAMS)
am_shacrypt_OBJECTS = commandline.$(OBJEXT)
shacrypt_OBJECTS = $(am_shacrypt_OBJECTS)
shacrypt_DEPENDENCIES = libshacrypt.a
+am_shacrypt_gui_OBJECTS = shacrypt_gui-gui.$(OBJEXT)
+nodist_shacrypt_gui_OBJECTS =
+shacrypt_gui_OBJECTS = $(am_shacrypt_gui_OBJECTS) \
+ $(nodist_shacrypt_gui_OBJECTS)
+am__DEPENDENCIES_1 =
+shacrypt_gui_DEPENDENCIES = libshacrypt.a $(am__DEPENDENCIES_1)
+shacrypt_gui_LINK = $(CCLD) $(shacrypt_gui_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+am_test_helper_OBJECTS = test-helper.$(OBJEXT)
+test_helper_OBJECTS = $(am_test_helper_OBJECTS)
+test_helper_DEPENDENCIES = libshacrypt.a
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -92,8 +115,15 @@
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libshacrypt_a_SOURCES) $(shacrypt_SOURCES)
-DIST_SOURCES = $(libshacrypt_a_SOURCES) $(shacrypt_SOURCES)
+SOURCES = $(libshacrypt_a_SOURCES) $(shacrypt_SOURCES) \
+ $(shacrypt_gui_SOURCES) $(nodist_shacrypt_gui_SOURCES) \
+ $(test_helper_SOURCES)
+DIST_SOURCES = $(libshacrypt_a_SOURCES) $(shacrypt_SOURCES) \
+ $(shacrypt_gui_SOURCES) $(test_helper_SOURCES)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man_MANS)
+HEADERS = $(include_HEADERS)
ETAGS = etags
CTAGS = ctags
am__tty_colors = \
@@ -105,7 +135,7 @@
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
-DIST_ARCHIVES = $(distdir).tar.gz
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
@@ -118,17 +148,22 @@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+COMMANDLINE = @COMMANDLINE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DWINDOWS = @DWINDOWS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
+GUI = @GUI@
+GUI_CFLAGS = @GUI_CFLAGS@
+GUI_LIBS = @GUI_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -140,6 +175,7 @@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MWINDOWS = @MWINDOWS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -149,10 +185,15 @@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+TESTS_CLI = @TESTS_CLI@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@@ -165,14 +206,22 @@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
+build = @build@
build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+host = @host@
host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
@@ -197,14 +246,25 @@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
third_party_hashfuncs = third-party/sha1.c third-party/sha2.c
third-party/md5c.c third-party/cubehash.c third-party/whirlpool.c
+EXTRA_DIST = tests test-helper.c third-party shacrypt.glade
+include_HEADERS = shacrypt.h
lib_LIBRARIES = libshacrypt.a
libshacrypt_a_SOURCES = shacrypt.h shacrypt.c $(third_party_hashfuncs)
-shacrypt_SOURCES = commandline.c
+libshacrypt_a_CFLAGS = $(DWINDOWS)
+shacrypt_SOURCES = commandline.c shacrypt.h
shacrypt_LDADD = libshacrypt.a
-TESTS = tests/t1.sh tests/t2.sh tests/t3.sh tests/t4.sh
+BUILT_SOURCES = glade.h
+CLEANFILES = glade.h
+shacrypt_gui_SOURCES = gui.c shacrypt.h shacrypt-icon.h
+nodist_shacrypt_gui_SOURCES = glade.h
+shacrypt_gui_LDADD = libshacrypt.a $(GUI_LIBS)
+shacrypt_gui_CFLAGS = $(GUI_CFLAGS) $(MWINDOWS)
+test_helper_SOURCES = test-helper.c shacrypt.h
+test_helper_LDADD = libshacrypt.a
+TESTS = $(TESTS_CLI)
XFAIL_TESTS = tests/t1.sh
-EXTRA_DIST = tests
-all: config.h
+dist_man_MANS = shacrypt.1
+all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-am

.SUFFIXES:
@@ -292,6 +352,24 @@

clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+third-party/$(am__dirstamp):
+ @$(MKDIR_P) third-party
+ @: > third-party/$(am__dirstamp)
+third-party/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) third-party/$(DEPDIR)
+ @: > third-party/$(DEPDIR)/$(am__dirstamp)
+third-party/libshacrypt_a-sha1.$(OBJEXT): third-party/$(am__dirstamp) \
+ third-party/$(DEPDIR)/$(am__dirstamp)
+third-party/libshacrypt_a-sha2.$(OBJEXT): third-party/$(am__dirstamp) \
+ third-party/$(DEPDIR)/$(am__dirstamp)
+third-party/libshacrypt_a-md5c.$(OBJEXT): third-party/$(am__dirstamp) \
+ third-party/$(DEPDIR)/$(am__dirstamp)
+third-party/libshacrypt_a-cubehash.$(OBJEXT): \
+ third-party/$(am__dirstamp) \
+ third-party/$(DEPDIR)/$(am__dirstamp)
+third-party/libshacrypt_a-whirlpool.$(OBJEXT): \
+ third-party/$(am__dirstamp) \
+ third-party/$(DEPDIR)/$(am__dirstamp)
libshacrypt.a: $(libshacrypt_a_OBJECTS) $(libshacrypt_a_DEPENDENCIES)
-rm -f libshacrypt.a
$(libshacrypt_a_AR) libshacrypt.a $(libshacrypt_a_OBJECTS)
$(libshacrypt_a_LIBADD)
@@ -333,107 +411,211 @@

clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+clean-checkPROGRAMS:
+ -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
shacrypt$(EXEEXT): $(shacrypt_OBJECTS) $(shacrypt_DEPENDENCIES)
@rm -f shacrypt$(EXEEXT)
$(LINK) $(shacrypt_OBJECTS) $(shacrypt_LDADD) $(LIBS)
+shacrypt-gui$(EXEEXT): $(shacrypt_gui_OBJECTS) $(shacrypt_gui_DEPENDENCIES)
+ @rm -f shacrypt-gui$(EXEEXT)
+ $(shacrypt_gui_LINK) $(shacrypt_gui_OBJECTS) $(shacrypt_gui_LDADD) $(LIBS)
+test-helper$(EXEEXT): $(test_helper_OBJECTS) $(test_helper_DEPENDENCIES)
+ @rm -f test-helper$(EXEEXT)
+ $(LINK) $(test_helper_OBJECTS) $(test_helper_LDADD) $(LIBS)

mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f third-party/libshacrypt_a-cubehash.$(OBJEXT)
+ -rm -f third-party/libshacrypt_a-md5c.$(OBJEXT)
+ -rm -f third-party/libshacrypt_a-sha1.$(OBJEXT)
+ -rm -f third-party/libshacrypt_a-sha2.$(OBJEXT)
+ -rm -f third-party/libshacrypt_a-whirlpool.$(OBJEXT)

distclean-compile:
-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commandline.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cubehash.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5c.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shacrypt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whirlpool.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/libshacrypt_a-shacrypt.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@./$(DEPDIR)/shacrypt_gui-gui.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-helper.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@third-party/$(DEPDIR)/libshacrypt_a-cubehash.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@third-party/$(DEPDIR)/libshacrypt_a-md5c.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@third-party/$(DEPDIR)/libshacrypt_a-sha1.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@third-party/$(DEPDIR)/libshacrypt_a-sha2.Po@am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Po@am__quote@

.c.o:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o
$@ $<
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|
\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@
$< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no
@AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<

.c.obj:
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o
$@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|
\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@
`$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no
@AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-sha1.o: third-party/sha1.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.o -MD -MP -MF
$(DEPDIR)/sha1.Tpo -c -o sha1.o `test -f 'third-party/sha1.c' ||
echo '$(srcdir)/'`third-party/sha1.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha1.c'
object='sha1.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+libshacrypt_a-shacrypt.o: shacrypt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
libshacrypt_a-shacrypt.o -MD -MP -MF $(DEPDIR)/libshacrypt_a-shacrypt.Tpo
-c -o libshacrypt_a-shacrypt.o `test -f 'shacrypt.c' ||
echo '$(srcdir)/'`shacrypt.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libshacrypt_a-shacrypt.Tpo
$(DEPDIR)/libshacrypt_a-shacrypt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shacrypt.c'
object='libshacrypt_a-shacrypt.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.o `test
-f 'third-party/sha1.c' || echo '$(srcdir)/'`third-party/sha1.c
-
-sha1.obj: third-party/sha1.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha1.obj -MD -MP -MF
$(DEPDIR)/sha1.Tpo -c -o sha1.obj `if test -f 'third-party/sha1.c'; then
$(CYGPATH_W) 'third-party/sha1.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha1.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sha1.Tpo $(DEPDIR)/sha1.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha1.c'
object='sha1.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
libshacrypt_a-shacrypt.o `test -f 'shacrypt.c' ||
echo '$(srcdir)/'`shacrypt.c
+
+libshacrypt_a-shacrypt.obj: shacrypt.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
libshacrypt_a-shacrypt.obj -MD -MP -MF $(DEPDIR)/libshacrypt_a-shacrypt.Tpo
-c -o libshacrypt_a-shacrypt.obj `if test -f 'shacrypt.c'; then
$(CYGPATH_W) 'shacrypt.c'; else $(CYGPATH_W) '$(srcdir)/shacrypt.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libshacrypt_a-shacrypt.Tpo
$(DEPDIR)/libshacrypt_a-shacrypt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='shacrypt.c'
object='libshacrypt_a-shacrypt.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha1.obj `if test
-f 'third-party/sha1.c'; then $(CYGPATH_W) 'third-party/sha1.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha1.c'; fi`
-
-sha2.o: third-party/sha2.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha2.o -MD -MP -MF
$(DEPDIR)/sha2.Tpo -c -o sha2.o `test -f 'third-party/sha2.c' ||
echo '$(srcdir)/'`third-party/sha2.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sha2.Tpo $(DEPDIR)/sha2.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha2.c'
object='sha2.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
libshacrypt_a-shacrypt.obj `if test -f 'shacrypt.c'; then
$(CYGPATH_W) 'shacrypt.c'; else $(CYGPATH_W) '$(srcdir)/shacrypt.c'; fi`
+
+third-party/libshacrypt_a-sha1.o: third-party/sha1.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-sha1.o -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-sha1.Tpo -c -o
third-party/libshacrypt_a-sha1.o `test -f 'third-party/sha1.c' ||
echo '$(srcdir)/'`third-party/sha1.c
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-sha1.Tpo
third-party/$(DEPDIR)/libshacrypt_a-sha1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha1.c'
object='third-party/libshacrypt_a-sha1.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha2.o `test
-f 'third-party/sha2.c' || echo '$(srcdir)/'`third-party/sha2.c
-
-sha2.obj: third-party/sha2.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sha2.obj -MD -MP -MF
$(DEPDIR)/sha2.Tpo -c -o sha2.obj `if test -f 'third-party/sha2.c'; then
$(CYGPATH_W) 'third-party/sha2.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha2.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sha2.Tpo $(DEPDIR)/sha2.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha2.c'
object='sha2.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-sha1.o `test -f 'third-party/sha1.c' ||
echo '$(srcdir)/'`third-party/sha1.c
+
+third-party/libshacrypt_a-sha1.obj: third-party/sha1.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-sha1.obj -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-sha1.Tpo -c -o
third-party/libshacrypt_a-sha1.obj `if test -f 'third-party/sha1.c'; then
$(CYGPATH_W) 'third-party/sha1.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha1.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-sha1.Tpo
third-party/$(DEPDIR)/libshacrypt_a-sha1.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha1.c'
object='third-party/libshacrypt_a-sha1.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sha2.obj `if test
-f 'third-party/sha2.c'; then $(CYGPATH_W) 'third-party/sha2.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha2.c'; fi`
-
-md5c.o: third-party/md5c.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5c.o -MD -MP -MF
$(DEPDIR)/md5c.Tpo -c -o md5c.o `test -f 'third-party/md5c.c' ||
echo '$(srcdir)/'`third-party/md5c.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5c.Tpo $(DEPDIR)/md5c.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/md5c.c'
object='md5c.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-sha1.obj `if test -f 'third-party/sha1.c'; then
$(CYGPATH_W) 'third-party/sha1.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha1.c'; fi`
+
+third-party/libshacrypt_a-sha2.o: third-party/sha2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-sha2.o -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-sha2.Tpo -c -o
third-party/libshacrypt_a-sha2.o `test -f 'third-party/sha2.c' ||
echo '$(srcdir)/'`third-party/sha2.c
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-sha2.Tpo
third-party/$(DEPDIR)/libshacrypt_a-sha2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha2.c'
object='third-party/libshacrypt_a-sha2.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5c.o `test
-f 'third-party/md5c.c' || echo '$(srcdir)/'`third-party/md5c.c
-
-md5c.obj: third-party/md5c.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT md5c.obj -MD -MP -MF
$(DEPDIR)/md5c.Tpo -c -o md5c.obj `if test -f 'third-party/md5c.c'; then
$(CYGPATH_W) 'third-party/md5c.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/md5c.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5c.Tpo $(DEPDIR)/md5c.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/md5c.c'
object='md5c.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-sha2.o `test -f 'third-party/sha2.c' ||
echo '$(srcdir)/'`third-party/sha2.c
+
+third-party/libshacrypt_a-sha2.obj: third-party/sha2.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-sha2.obj -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-sha2.Tpo -c -o
third-party/libshacrypt_a-sha2.obj `if test -f 'third-party/sha2.c'; then
$(CYGPATH_W) 'third-party/sha2.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha2.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-sha2.Tpo
third-party/$(DEPDIR)/libshacrypt_a-sha2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/sha2.c'
object='third-party/libshacrypt_a-sha2.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o md5c.obj `if test
-f 'third-party/md5c.c'; then $(CYGPATH_W) 'third-party/md5c.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/md5c.c'; fi`
-
-cubehash.o: third-party/cubehash.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cubehash.o -MD -MP
-MF $(DEPDIR)/cubehash.Tpo -c -o cubehash.o `test
-f 'third-party/cubehash.c' || echo '$(srcdir)/'`third-party/cubehash.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cubehash.Tpo $(DEPDIR)/cubehash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/cubehash.c'
object='cubehash.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-sha2.obj `if test -f 'third-party/sha2.c'; then
$(CYGPATH_W) 'third-party/sha2.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/sha2.c'; fi`
+
+third-party/libshacrypt_a-md5c.o: third-party/md5c.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-md5c.o -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-md5c.Tpo -c -o
third-party/libshacrypt_a-md5c.o `test -f 'third-party/md5c.c' ||
echo '$(srcdir)/'`third-party/md5c.c
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-md5c.Tpo
third-party/$(DEPDIR)/libshacrypt_a-md5c.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/md5c.c'
object='third-party/libshacrypt_a-md5c.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cubehash.o `test
-f 'third-party/cubehash.c' || echo '$(srcdir)/'`third-party/cubehash.c
-
-cubehash.obj: third-party/cubehash.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cubehash.obj -MD -MP
-MF $(DEPDIR)/cubehash.Tpo -c -o cubehash.obj `if test
-f 'third-party/cubehash.c'; then $(CYGPATH_W) 'third-party/cubehash.c';
else $(CYGPATH_W) '$(srcdir)/third-party/cubehash.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/cubehash.Tpo $(DEPDIR)/cubehash.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/cubehash.c'
object='cubehash.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-md5c.o `test -f 'third-party/md5c.c' ||
echo '$(srcdir)/'`third-party/md5c.c
+
+third-party/libshacrypt_a-md5c.obj: third-party/md5c.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-md5c.obj -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-md5c.Tpo -c -o
third-party/libshacrypt_a-md5c.obj `if test -f 'third-party/md5c.c'; then
$(CYGPATH_W) 'third-party/md5c.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/md5c.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-md5c.Tpo
third-party/$(DEPDIR)/libshacrypt_a-md5c.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/md5c.c'
object='third-party/libshacrypt_a-md5c.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cubehash.obj `if
test -f 'third-party/cubehash.c'; then
$(CYGPATH_W) 'third-party/cubehash.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/cubehash.c'; fi`
-
-whirlpool.o: third-party/whirlpool.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT whirlpool.o -MD -MP
-MF $(DEPDIR)/whirlpool.Tpo -c -o whirlpool.o `test
-f 'third-party/whirlpool.c' || echo '$(srcdir)/'`third-party/whirlpool.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/whirlpool.Tpo
$(DEPDIR)/whirlpool.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/whirlpool.c'
object='whirlpool.o' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-md5c.obj `if test -f 'third-party/md5c.c'; then
$(CYGPATH_W) 'third-party/md5c.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/md5c.c'; fi`
+
+third-party/libshacrypt_a-cubehash.o: third-party/cubehash.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-cubehash.o -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-cubehash.Tpo -c -o
third-party/libshacrypt_a-cubehash.o `test -f 'third-party/cubehash.c' ||
echo '$(srcdir)/'`third-party/cubehash.c
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-cubehash.Tpo
third-party/$(DEPDIR)/libshacrypt_a-cubehash.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/cubehash.c'
object='third-party/libshacrypt_a-cubehash.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o whirlpool.o `test
-f 'third-party/whirlpool.c' || echo '$(srcdir)/'`third-party/whirlpool.c
-
-whirlpool.obj: third-party/whirlpool.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT whirlpool.obj -MD -MP
-MF $(DEPDIR)/whirlpool.Tpo -c -o whirlpool.obj `if test
-f 'third-party/whirlpool.c'; then $(CYGPATH_W) 'third-party/whirlpool.c';
else $(CYGPATH_W) '$(srcdir)/third-party/whirlpool.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/whirlpool.Tpo
$(DEPDIR)/whirlpool.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/whirlpool.c'
object='whirlpool.obj' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-cubehash.o `test -f 'third-party/cubehash.c' ||
echo '$(srcdir)/'`third-party/cubehash.c
+
+third-party/libshacrypt_a-cubehash.obj: third-party/cubehash.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-cubehash.obj -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-cubehash.Tpo -c -o
third-party/libshacrypt_a-cubehash.obj `if test
-f 'third-party/cubehash.c'; then $(CYGPATH_W) 'third-party/cubehash.c';
else $(CYGPATH_W) '$(srcdir)/third-party/cubehash.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-cubehash.Tpo
third-party/$(DEPDIR)/libshacrypt_a-cubehash.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/cubehash.c'
object='third-party/libshacrypt_a-cubehash.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o whirlpool.obj `if
test -f 'third-party/whirlpool.c'; then
$(CYGPATH_W) 'third-party/whirlpool.c'; else
$(CYGPATH_W) '$(srcdir)/third-party/whirlpool.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-cubehash.obj `if test
-f 'third-party/cubehash.c'; then $(CYGPATH_W) 'third-party/cubehash.c';
else $(CYGPATH_W) '$(srcdir)/third-party/cubehash.c'; fi`
+
+third-party/libshacrypt_a-whirlpool.o: third-party/whirlpool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-whirlpool.o -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Tpo -c -o
third-party/libshacrypt_a-whirlpool.o `test -f 'third-party/whirlpool.c' ||
echo '$(srcdir)/'`third-party/whirlpool.c
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Tpo
third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/whirlpool.c'
object='third-party/libshacrypt_a-whirlpool.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-whirlpool.o `test -f 'third-party/whirlpool.c' ||
echo '$(srcdir)/'`third-party/whirlpool.c
+
+third-party/libshacrypt_a-whirlpool.obj: third-party/whirlpool.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -MT
third-party/libshacrypt_a-whirlpool.obj -MD -MP -MF
third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Tpo -c -o
third-party/libshacrypt_a-whirlpool.obj `if test
-f 'third-party/whirlpool.c'; then $(CYGPATH_W) 'third-party/whirlpool.c';
else $(CYGPATH_W) '$(srcdir)/third-party/whirlpool.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv)
third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Tpo
third-party/$(DEPDIR)/libshacrypt_a-whirlpool.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='third-party/whirlpool.c'
object='third-party/libshacrypt_a-whirlpool.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(libshacrypt_a_CFLAGS) $(CFLAGS) -c -o
third-party/libshacrypt_a-whirlpool.obj `if test
-f 'third-party/whirlpool.c'; then $(CYGPATH_W) 'third-party/whirlpool.c';
else $(CYGPATH_W) '$(srcdir)/third-party/whirlpool.c'; fi`
+
+shacrypt_gui-gui.o: gui.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(shacrypt_gui_CFLAGS) $(CFLAGS) -MT
shacrypt_gui-gui.o -MD -MP -MF $(DEPDIR)/shacrypt_gui-gui.Tpo -c -o
shacrypt_gui-gui.o `test -f 'gui.c' || echo '$(srcdir)/'`gui.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shacrypt_gui-gui.Tpo
$(DEPDIR)/shacrypt_gui-gui.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gui.c'
object='shacrypt_gui-gui.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(shacrypt_gui_CFLAGS) $(CFLAGS) -c -o
shacrypt_gui-gui.o `test -f 'gui.c' || echo '$(srcdir)/'`gui.c
+
+shacrypt_gui-gui.obj: gui.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(shacrypt_gui_CFLAGS) $(CFLAGS) -MT
shacrypt_gui-gui.obj -MD -MP -MF $(DEPDIR)/shacrypt_gui-gui.Tpo -c -o
shacrypt_gui-gui.obj `if test -f 'gui.c'; then $(CYGPATH_W) 'gui.c'; else
$(CYGPATH_W) '$(srcdir)/gui.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/shacrypt_gui-gui.Tpo
$(DEPDIR)/shacrypt_gui-gui.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gui.c'
object='shacrypt_gui-gui.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(shacrypt_gui_CFLAGS) $(CFLAGS) -c -o
shacrypt_gui-gui.obj `if test -f 'gui.c'; then $(CYGPATH_W) 'gui.c'; else
$(CYGPATH_W) '$(srcdir)/gui.c'; fi`
+install-man1: $(dist_man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+ done
+
+uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(includedir)" && rm -f $$files

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -580,6 +762,19 @@
else :; fi

distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list
>/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man'
replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list |
sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the
man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them"
>&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -621,7 +816,6 @@
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)
@@ -649,6 +843,7 @@

dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c
>$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)

# This target untars the dist file and tries a VPATH configuration. Then
@@ -727,14 +922,17 @@
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) config.h
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) config.h
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \
+ for dir
in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)";
do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: install-am
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -751,22 +949,26 @@
mostlyclean-generic:

clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f
$(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f third-party/$(DEPDIR)/$(am__dirstamp)
+ -rm -f third-party/$(am__dirstamp)

maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am

-clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \
- mostlyclean-am
+clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-libLIBRARIES mostlyclean-am

distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR)
+ -rm -rf ./$(DEPDIR) third-party/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags
@@ -783,7 +985,7 @@

info-am:

-install-data-am:
+install-data-am: install-includeHEADERS install-man

install-dvi: install-dvi-am

@@ -799,7 +1001,7 @@

install-info-am:

-install-man:
+install-man: install-man1

install-pdf: install-pdf-am

@@ -814,7 +1016,7 @@
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR)
+ -rm -rf ./$(DEPDIR) third-party/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

@@ -830,28 +1032,36 @@

ps-am:

-uninstall-am: uninstall-binPROGRAMS uninstall-libLIBRARIES
-
-.MAKE: all check-am install-am install-strip
+uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
+ uninstall-libLIBRARIES uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: all check check-am install install-am install-strip

.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
- clean clean-binPROGRAMS clean-generic clean-libLIBRARIES ctags \
- dist dist-all dist-bzip2 dist-gzip dist-lzma dist-shar \
- dist-tarZ dist-xz dist-zip distcheck distclean \
- distclean-compile distclean-generic distclean-hdr \
+ clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-libLIBRARIES ctags dist dist-all dist-bzip2 dist-gzip \
+ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
+ distclean distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS 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-libLIBRARIES install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-libLIBRARIES
+ install-html-am install-includeHEADERS install-info \
+ install-info-am install-libLIBRARIES 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-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-includeHEADERS uninstall-libLIBRARIES uninstall-man \
+ uninstall-man1


+glade.h: shacrypt.glade glade.sed Makefile
+ $(SED) -f glade.sed -e 's/[@]VERSION[@]/$(VERSION)/g' < shacrypt.glade >
glade.h
+
# 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:
=======================================
--- /aclocal.m4 Sat Feb 20 11:49:56 2010
+++ /aclocal.m4 Sun Feb 21 11:21:39 2010
@@ -19,6 +19,165 @@
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'.])])

+# pkg.m4 - Macros to locate and utilise pkg-config. -*-
Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <sc...@netsplit.com>.
+#
+# 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])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search
path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in
search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+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 "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _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 --print-errors "$2"
2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[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 <http://pkg-config.freedesktop.org/>.])],
+ [$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, 2008 Free Software
Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -639,6 +798,41 @@
rm -f confinc confmf
])

+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 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 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
# Fake the existence of programs that GNU maintainers use. -*- Autoconf
-*-

# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
=======================================
--- /commandline.c Sat Feb 20 11:49:56 2010
+++ /commandline.c Sun Feb 21 11:21:39 2010
@@ -135,7 +135,7 @@

n = SHACrypt_GetRand( algos, fbuf );
if ( n < 0 ) {
- fprintf( stderr, "Warning: Could not connect to random number
generating device. Using weaker time-based random number generator." );
+ fprintf( stderr, "Warning: Could not connect to random number
generating device. Using weaker time-based random number generator.\n" );
n = -n;
}

=======================================
--- /config.h.in Sat Feb 20 11:49:56 2010
+++ /config.h.in Sun Feb 21 11:21:39 2010
@@ -37,6 +37,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
/* Name of package */
#undef PACKAGE

=======================================
--- /configure Sat Feb 20 11:49:56 2010
+++ /configure Sun Feb 21 11:21:39 2010
@@ -2,7 +2,7 @@
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for SHACrypt 1.2.2.
#
-# Report bugs to <bugs+s...@llamaslayers.net>.
+# Report bugs to <shac...@googlegroups.com>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -233,10 +233,10 @@
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-au...@gnu.org and
-$0: bugs+s...@llamaslayers.net about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+$0: shac...@googlegroups.com about your system, including
+$0: any error possibly output before this message. Then
+$0: install a modern shell, or manually run the script
+$0: under such a shell if you do have one."
fi
exit 1
fi
@@ -556,7 +556,7 @@
PACKAGE_TARNAME='shacrypt'
PACKAGE_VERSION='1.2.2'
PACKAGE_STRING='SHACrypt 1.2.2'
-PACKAGE_BUGREPORT='bugs+s...@llamaslayers.net'
+PACKAGE_BUGREPORT='shac...@googlegroups.com'
PACKAGE_URL='http://shacrypt.googlecode.com/'

ac_unique_file="commandline.c"
@@ -631,10 +631,29 @@
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+MWINDOWS
+DWINDOWS
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+TESTS_CLI
+COMMANDLINE
+GUI_LIBS
+GUI_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+GUI
LIBOBJS
EGREP
GREP
CPP
+SED
RANLIB
OBJEXT
EXEEXT
@@ -684,6 +703,9 @@
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_gui
+enable_commandline
+with_windows
enable_dependency_tracking
'
ac_precious_vars='build_alias
@@ -694,7 +716,12 @@
LDFLAGS
LIBS
CPPFLAGS
-CPP'
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+GUI_CFLAGS
+GUI_LIBS'


# Initialize some variables set by options.
@@ -1297,6 +1324,10 @@
--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
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

@@ -1310,9 +1341,17 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as
--enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-gui build the GTK-based graphical user interface
+ --disable-commandline don't build the command line program
--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-windows use this if your build target is Windows
+ [default=check]
+
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
@@ -1322,11 +1361,18 @@
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ GUI_CFLAGS C compiler flags for GUI, overriding pkg-config
+ GUI_LIBS linker flags for GUI, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

-Report bugs to <bugs+s...@llamaslayers.net>.
+Report bugs to <shac...@googlegroups.com>.
SHACrypt home page: <http://shacrypt.googlecode.com/>.
_ACEOF
ac_status=$?
@@ -1552,9 +1598,9 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with
the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
( cat <<\_ASBOX
-## --------------------------------------------- ##
-## Report this to bugs+s...@llamaslayers.net ##
-## --------------------------------------------- ##
+## ---------------------------------------- ##
+## Report this to shac...@googlegroups.com ##
+## ---------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@@ -3053,8 +3099,204 @@
RANLIB="$ac_cv_prog_RANLIB"
fi

-
-# Checks for libraries.
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc
understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... "
>&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands
-c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" =
set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not
truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_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
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out"
2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_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_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+

# Checks for header files.

@@ -3581,8 +3823,250 @@
done


-am__api_version='1.11'
-
+# Options
+# Check whether --enable-gui was given.
+if test "${enable_gui+set}" = set; then :
+ enableval=$enable_gui;
+else
+ enable_gui=no
+fi
+
+# Check whether --enable-commandline was given.
+if test "${enable_commandline+set}" = set; then :
+ enableval=$enable_commandline;
+else
+ enable_commandline=yes
+fi
+
+
+# Check whether --with-windows was given.
+if test "${with_windows+set}" = set; then :
+ withval=$with_windows;
+else
+ with_windows=check
+fi
+
+
+# Check options
+
+
+
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found
$as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found
$as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not
prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host
triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ 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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least
version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... "
>&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+if test "$enable_gui" != "no"; then :
+ GUI='shacrypt-gui$(EXEEXT)'
+
+ pkg_modules="gtk+-2.0 gmodule-2.0 gthread-2.0"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUI" >&5
+$as_echo_n "checking for GUI... " >&6; }
+
+if test -n "$GUI_CFLAGS"; then
+ pkg_cv_GUI_CFLAGS="$GUI_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"\$pkg_modules\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GUI_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$GUI_LIBS"; then
+ pkg_cv_GUI_LIBS="$GUI_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists
--print-errors \"\$pkg_modules\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GUI_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null`
+else
+ pkg_failed=yes
+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
+ GUI_PKG_ERRORS=`$PKG_CONFIG --short-errors
--print-errors "$pkg_modules" 2>&1`
+ else
+ GUI_PKG_ERRORS=`$PKG_CONFIG --print-errors "$pkg_modules" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GUI_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements ($pkg_modules) were not met:
+
+$GUI_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 GUI_CFLAGS
+and GUI_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make
sure it
+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 GUI_CFLAGS
+and GUI_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ GUI_CFLAGS=$pkg_cv_GUI_CFLAGS
+ GUI_LIBS=$pkg_cv_GUI_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+
+
+fi
+if test "$enable_commandline" == "yes"; then :
+ COMMANDLINE='shacrypt'
+
+ TESTS_CLI='tests/t1.sh tests/t2.sh tests/t3.sh tests/t4.sh'
+
+fi
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
for ac_t in install-sh install.sh shtool; do
@@ -3606,6 +4090,95 @@
ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.


+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias
failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias
failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+if test "$with_windows" == "check"; then :
+
+ if test "$host_os" == "mingw32"; then :
+ with_windows=yes
+else
+ with_windows=no
+fi
+fi
+if test "$with_windows" == "yes"; then :
+ DWINDOWS='-DWINDOWS'
+
+ MWINDOWS='-mwindows'
+
+fi
+
+# Create the Makefile
+am__api_version='1.11'
+
# 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:
@@ -3761,9 +4334,6 @@
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" |
sed "$ac_script"`

-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
@@ -4271,7 +4841,6 @@



-
ac_config_files="$ac_config_files Makefile"

cat >confcache <<\_ACEOF
@@ -4855,7 +5424,7 @@
Configuration commands:
$config_commands

-Report bugs to <bugs+s...@llamaslayers.net>.
+Report bugs to <shac...@googlegroups.com>.
SHACrypt home page: <http://shacrypt.googlecode.com/>."

_ACEOF
=======================================
--- /configure.ac Sat Feb 20 11:49:56 2010
+++ /configure.ac Sun Feb 21 11:21:39 2010
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.65])
-AC_INIT([SHACrypt], [1.2.2], [bugs+s...@llamaslayers.net], [shacrypt],
[http://shacrypt.googlecode.com/])
+AC_INIT([SHACrypt], [1.2.2], [shac...@googlegroups.com], [shacrypt],
[http://shacrypt.googlecode.com/])
AC_COPYRIGHT([SHACrypt is licensed under the GPL, version 3 or higher.])
AC_CONFIG_SRCDIR([commandline.c])
AC_CONFIG_HEADERS([config.h])
@@ -9,8 +9,8 @@
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
-
-# Checks for libraries.
+AM_PROG_CC_C_O
+AC_PROG_SED

# Checks for header files.
AC_CHECK_HEADERS([limits.h stdint.h stdlib.h string.h])
@@ -23,7 +23,39 @@
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset])

-AM_INIT_AUTOMAKE
-
+# Options
+AC_ARG_ENABLE([gui], [AS_HELP_STRING([--enable-gui],
+ [build the GTK-based graphical user interface])],
+ [], [enable_gui=no])
+AC_ARG_ENABLE([commandline], [AS_HELP_STRING([--disable-commandline],
+ [don't build the command line program])],
+ [], [enable_commandline=yes])
+AC_ARG_WITH([windows], [AS_HELP_STRING([--with-windows],
+ [use this if your build target is Windows @<:@default=check@:>@])],
+ [], [with_windows=check])
+
+# Check options
+AS_IF([test "$enable_gui" != "no"],
+ [AC_SUBST([GUI], ['shacrypt-gui$(EXEEXT)'])
+ pkg_modules="gtk+-2.0 gmodule-2.0 gthread-2.0"
+ PKG_CHECK_MODULES([GUI], [$pkg_modules])
+ AC_SUBST([GUI_CFLAGS])
+ AC_SUBST([GUI_LIBS])],
+ [])
+AS_IF([test "$enable_commandline" == "yes"],
+ [AC_SUBST([COMMANDLINE], ['shacrypt'])
+ AC_SUBST([TESTS_CLI], ['tests/t1.sh tests/t2.sh tests/t3.sh
tests/t4.sh'])],
+ [])
+AS_IF([test "$with_windows" == "check"],
+ [AC_CANONICAL_HOST
+ AS_IF([test "$host_os" == "mingw32"],
+ [with_windows=yes], [with_windows=no])],
+ [])
+AS_IF([test "$with_windows" == "yes"],
+ [AC_SUBST([DWINDOWS], ['-DWINDOWS'])
+ AC_SUBST([MWINDOWS], ['-mwindows'])])
+
+# Create the Makefile
+AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects -Wall])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
=======================================
--- /shacrypt.glade Sun Nov 15 14:25:05 2009
+++ /shacrypt.glade Sun Feb 21 11:21:39 2010
@@ -22,7 +22,7 @@
<object class="GtkLabel" id="label_welcome">
<property name="visible">True</property>
<property name="label" translatable="yes">Welcome to
-SHACrypt 1.2.1</property>
+SHACrypt @VERSION@</property>
<property name="justify">center</property>
<attributes>
<attribute name="size" value="25000"/>
=======================================
--- /tests/t2.sh Sat Feb 20 11:49:56 2010
+++ /tests/t2.sh Sun Feb 21 11:21:39 2010
@@ -9,8 +9,7 @@

echo "Test 2: Encryption of random data"

-dd if=/dev/zero of=tests/rand2.tmp bs=1 count=1 &> /dev/null
-dd if=/dev/urandom of=tests/rand2.tmp bs=1K count=1 oflag=append &>
/dev/null
+./test-helper tests/rand2.tmp

./shacrypt e test tests/rand2.tmp tests/f2.tmp
result=$?
=======================================
--- /tests/t3.sh Sat Feb 20 11:49:56 2010
+++ /tests/t3.sh Sun Feb 21 11:21:39 2010
@@ -9,8 +9,7 @@

echo "Test 3: Encryption and decryption of random data"

-dd if=/dev/zero of=tests/rand3.tmp bs=1 count=1 &> /dev/null
-dd if=/dev/urandom of=tests/rand3.tmp bs=1K count=1 oflag=append &>
/dev/null
+./test-helper tests/rand3.tmp

./shacrypt e test tests/rand3.tmp tests/f3a.tmp
./shacrypt d test tests/f3a.tmp tests/f3b.tmp
=======================================
--- /tests/t4.sh Sat Feb 20 11:49:56 2010
+++ /tests/t4.sh Sun Feb 21 11:21:39 2010
@@ -11,8 +11,7 @@

echo "Test 4: Real asymmetric crypt"

-dd if=/dev/zero of=tests/rand4.tmp bs=1 count=1 &> /dev/null
-dd if=/dev/urandom of=tests/rand4.tmp bs=1K count=1 oflag=append &>
/dev/null
+./test-helper tests/rand4.tmp

./shacrypt e test tests/rand4.tmp tests/f4a.tmp
./shacrypt a tset tests/f4a.tmp tests/f4b.tmp
Reply all
Reply to author
Forward
0 new messages