From bd7295ab20d6ee2a7acbf82f1a9cdc702935551b Mon Sep 17 00:00:00 2001 From: Kacper Wysocki Date: Mon, 14 Jun 2010 12:09:37 +0200 Subject: [PATCH] patch up to cpm-0.25-beta1 --- Makefile.in | 88 +- anonymize/cpm2anonymous.pl | 2 +- config.h | 53 +- config.h.in | 45 +- configuration.c | 11 +- configuration.h | 4 +- configure | 5538 ++++++++++++++++------------- configure.in | 239 +- control.in | 2 + cpm.c | 45 +- cpm.h | 13 +- docs/README | 45 +- docs/cpm.1.gz | Bin 2196 -> 2286 bytes docs/cpm.pod | 195 + docs/cpm.txt | 9 +- general.c | 76 +- general.h | 16 +- gpg.c | 51 +- gpg.h | 2 +- interface_cli.c | 24 +- interface_cli.h | 2 +- interface_gui.c | 307 +- interface_gui.h | 3 +- interface_keys.c | 28 +- interface_keys.h | 2 +- interface_utf8.c | 13 +- interface_utf8.h | 2 +- interface_xml.c | 81 +- interface_xml.h | 2 +- listhandler.c | 3 +- listhandler.h | 2 +- memory.c | 2 +- memory.h | 2 +- options.c | 130 +- options.h | 2 +- patternparser.c | 21 +- patternparser.h | 2 +- po/de_DE.mo | Bin 21505 -> 22668 bytes po/de_DE.po | 520 +-- resource.c | 2 +- resource.h | 2 +- security.c | 169 +- security.h | 18 +- share/cpm/convert2cpm.sh | 2 +- share/cpm/csv2cpm.pl | 2 +- share/cpm/general/convert.sh | 2 +- share/cpm/import.sh | 2 +- share/cpm/passwordsafe/convert.pl | 2 +- share/cpm/pms/convert.pl | 2 +- share/cpm/pms/convert.sh | 2 +- string.c | 2 +- string.h | 2 +- tests/encrypt-result.txt | 2 +- tests/environment-result.txt | 9 - tests/testxml.pl | 2 +- wrapper/cpm-wrapper | 10 +- xml.c | 25 +- xml.h | 2 +- zlib.c | 9 +- zlib.h | 2 +- 60 files changed, 4894 insertions(+), 2958 deletions(-) create mode 100644 docs/cpm.pod diff --git a/Makefile.in b/Makefile.in index 4eac4ab..bd14a8b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -10,9 +10,9 @@ CC=@CC@ # I used to have -Werror here but this breaks the warning which I must have # with lib GpgMe. :-( -CFLAGS=@CFLAGS@ @CPPFLAGS@ @DEFS@ @LIBGPGME_CFLAGS@ @LIBXML_CFLAGS@ -std=c89 -pedantic -Wall -DLOCALEDIR='"@prefix@/share/locale"' @CDK_VERSION_DEF@ +CFLAGS=@CFLAGS@ @CPPFLAGS@ @DEFS@ @LIBGPGME_CFLAGS@ @LIBNCURSES_CFLAGS@ @LIBXML_CFLAGS@ -std=c99 -Wall -Wformat=2 -DLOCALEDIR='"@prefix@/share/locale"' @CDK_VERSION_DEF@ INSTALL=@INSTALL@ -LDFLAGS=@LDFLAGS@ @LIBS@ @LIBGPGME_LIBS@ @LIBXML_LIBS@ +LDFLAGS=@LDFLAGS@ @LIBS@ @LIBGPGME_LIBS@ @LIBNCURSES_LIBS@ @LIBXML_LIBS@ SHELL=@SHELL@ DEBIAN_RELEASE=1 DEBIAN_BINARY=@PACKAGE_NAME@-@PACKAGE_VERSION@-$(DEBIAN_RELEASE)_i386.deb @@ -37,10 +37,10 @@ OBJECTS=cpm.o configuration.o general.o gpg.o interface_cli.o interface_gui.o in # build rules .c.o: - $(CC) $(CFLAGS) -c $< + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< .o: - $(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@ + $(CC) $^ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ # ############################################################################## @@ -52,7 +52,7 @@ all: dependencies cpm # ############################################################################## # run the tests .PHONY: check -check: cpm gettext check_backup check_clisearch check_compress check_configtest check_decrypt check_encrypt check_environment check_garbage check_gettext check_searchpattern +check: permissions cpm gettext check_backup check_clisearch check_compress check_configtest check_decrypt check_encrypt check_environment check_garbage check_gettext check_searchpattern OK=\t\t\t\tok ERROR=\t\t\t\tfailed @@ -226,13 +226,14 @@ check_environment: @echo -n "Testing environment "; \ rm -f check-environment.log; \ $(GPG_ENV) ./cpm --config=tests/cpmrc-crypt-tests --testrun=environment > check-environment.log 2>&1 || exit 1; \ - diff --brief check-environment.log tests/environment-result.txt > /dev/null; \ + egrep -e "(^general: |^alpha |^numeric |^filename |^path )#[0-9]+: " check-environment.log > check-environment-2.log || exit 1; \ + diff --brief check-environment-2.log tests/environment-result.txt > /dev/null; \ if [ $${?} -ne 0 ]; then \ echo -e "$(ERROR)"; \ exit 1; \ else \ echo -e "$(OK)"; \ - rm -f check-environment.log; \ + rm -f check-environment.log check-environment-2.log; \ fi .PHONY: check_garbage @@ -256,8 +257,8 @@ check_garbage: .PHONY: check_gettext check_gettext: @echo -n "Testing gettext 1 "; \ - INSTALLED=`locale -a | grep -c "^de_DE$$"`; \ - if [ $${INSTALLED} -ne 1 ]; then \ + INSTALLED=`locale -a | grep -c "^de_DE"`; \ + if [ $${INSTALLED} -eq 0 ]; then \ echo -e "$(ERROR)"; \ exit 1; \ else \ @@ -265,7 +266,8 @@ check_gettext: fi @echo -n "Testing gettext 2 "; \ rm -f check-gettext.log; \ - $(GPG_ENV) LANG=de_DE ./cpm --version | tail --lines=1 > check-gettext.log 2>&1 || exit 1; \ + LANGUAGE=`locale -a | grep "^de_DE" | head --lines=1`; \ + $(GPG_ENV) LANG=$${LANGUAGE} ./cpm --version | tail --lines=1 > check-gettext.log 2>&1 || exit 1; \ diff --brief check-gettext.log tests/gettext-result.txt > /dev/null; \ if [ $${?} -ne 0 ]; then \ echo -e "$(ERROR)"; \ @@ -322,7 +324,7 @@ debug: cpm dependencies: @rm -f Makefile.dep; \ for FILE in $(OBJECTS); do \ - $(CC) $(CFLAGS) -MM $${FILE%%.o}.c >> Makefile.dep; \ + $(CC) $(CFLAGS) $(CPPFLAGS) -MM $${FILE%%.o}.c >> Makefile.dep; \ done @@ -340,17 +342,15 @@ gettext: gettext_compile .PHONY: gettext_compile gettext_compile: gettext_translate + cd po; \ + tail --lines=+18 de_DE.po > current.txt; \ + tail --lines=+18 de_DE_new.po > new.txt; \ + diff -u current.txt new.txt cd po; msgfmt --check --statistics --strict de_DE.po --output=de_DE.mo cd po; \ mkdir -p ./de/LC_MESSAGES; \ cp de_DE.mo ./de/LC_MESSAGES/cpm.mo -# diff fails -# cd po; \ -# tail --lines=+18 de_DE.po > current.txt; \ -# tail --lines=+18 de_DE_new.po > new.txt; \ -# diff -u current.txt new.txt - # ############################################################################## # make new gettext file @@ -376,9 +376,12 @@ gettext_update: # install everything .PHONY: install install: cpm gettext - $(INSTALL) -D --mode=4755 --owner=root --group=root @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@ - $(INSTALL) -D --mode=644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@PACKAGE_NAME@.mo - $(INSTALL) -D --mode=644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz + $(INSTALL) -d $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(localedir)/de/LC_MESSAGES + $(INSTALL) -d $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m 4755 -o 0 -g 0 @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@ $(INSTALL) -m 644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@PACKAGE_NAME@.mo + $(INSTALL) -m 644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz + # ############################################################################## @@ -386,22 +389,44 @@ install: cpm gettext .PHONY: man man: - txt2man -s 1 -r "@PACKAGE_NAME@ @PACKAGE_VERSION@" -v "User Commands" -t "cpm" -T ../docs/cpm.txt | gzip -9 > ../docs/cpm.1.gz + txt2man -s 1 -r "@PACKAGE_NAME@ @PACKAGE_VERSION@" -v "User Commands" -t "cpm" -T ../docs/cpm.txt > /tmp/cpm.1 + cat /tmp/cpm.1 | gzip -9 > ../docs/cpm.1.gz + rm -f /tmp/cpm.1 # ############################################################################## # set all probably missing file permissions .PHONY: permissions: - chmod 755 ../anonymize/cpm2anonymous.pl - chmod 755 ../debian/postinst - chmod 755 ../import/general/convert.sh - chmod 755 ../import/passwordsafe/convert.pl - chmod 755 ../import/*.pl ../import/*.sh - chmod 755 ../import/pms/convert.pl ../import/pms/convert.sh - chmod 755 ./prepare_release.sh ./publish_release.sh - chmod 755 ./tests/testxml.pl - chmod 755 ../wrapper/cpm-wrapper + for FILE in \ + ../anonymize/cpm2anonymous.pl \ + ../debian/postinst \ + ../import/general/convert.sh \ + ../import/passwordsafe/convert.pl \ + ../import/*.pl ../import/*.sh \ + ../import/pms/convert.pl ../import/pms/convert.sh \ + ./prepare_release.sh ./publish_release.sh \ + ./tests/testxml.pl \ + ../wrapper/cpm-wrapper; do \ + if [ -f "$${FILE}" ]; then \ + echo "Setting permissions for $${FILE}"; \ + chmod 755 "$${FILE}"; \ + fi; \ + done + + +# ############################################################################## +# clean the distribution +.PHONY: distclean +distclean: clean + rm -fr \ + config.h \ + config.status \ + control \ + *.log \ + Makefile \ + Makefile.dep \ + *.out # ############################################################################## @@ -522,6 +547,7 @@ tar: clean gettext man permissions ../debian/changelog \ ../ChangeLog \ ../docs/cpm.1.gz \ + ../docs/cpm.pod \ ../docs/cpm.txt \ ../docs/GPLv2 \ ../docs/README \ @@ -556,7 +582,7 @@ tar: clean gettext man permissions cp ./po/de_DE.mo \ ./po/de_DE.po \ @PACKAGE_TARNAME@-@PACKAGE_VERSION@/po/ - find tests/ -type f -maxdepth 1 -exec \ + find tests/ -maxdepth 1 -type f -exec \ cp {} @PACKAGE_TARNAME@-@PACKAGE_VERSION@/tests/ \; tar cjf $(BZ2_SOURCE) @PACKAGE_TARNAME@-@PACKAGE_VERSION@/ tar czf $(TAR_SOURCE) @PACKAGE_TARNAME@-@PACKAGE_VERSION@/ diff --git a/anonymize/cpm2anonymous.pl b/anonymize/cpm2anonymous.pl index 27389c3..eb04aa4 100755 --- a/anonymize/cpm2anonymous.pl +++ b/anonymize/cpm2anonymous.pl @@ -5,7 +5,7 @@ # information with 'x'. This should help to debug any problems which might # occure due to file size or content problems. # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/config.h b/config.h index 1fe7a53..ee52470 100644 --- a/config.h +++ b/config.h @@ -8,8 +8,11 @@ /* Define to 1 if you have the `clearenv' function. */ #define HAVE_CLEARENV 1 -/* Define to 1 if you have the `environ' function. */ -#define HAVE_ENVIRON 1 +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define if environ extern is available */ +#define HAVE_EXTERN_ENVIRON 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 @@ -32,12 +35,18 @@ /* Define to 1 if you have the `crack' library (-lcrack). */ #define HAVE_LIBCRACK 1 +/* Define to 1 if you have the `curses' library (-lcurses). */ +/* #undef HAVE_LIBCURSES */ + /* Define to 1 if you have the `dotconf' library (-ldotconf). */ #define HAVE_LIBDOTCONF 1 /* Define to 1 if you have the `gpgme' library (-lgpgme). */ #define HAVE_LIBGPGME 1 +/* Define to 1 if you have the `intl' library (-lintl). */ +/* #undef HAVE_LIBINTL */ + /* Define to 1 if you have the header file. */ #define HAVE_LIBINTL_H 1 @@ -45,7 +54,13 @@ #define HAVE_LIBM 1 /* Define to 1 if you have the `ncurses' library (-lncurses). */ -#define HAVE_LIBNCURSES 1 +/* #undef HAVE_LIBNCURSES */ + +/* Define to 1 if you have the `ncursesw' library (-lncursesw). */ +#define HAVE_LIBNCURSESW 1 + +/* Define to 1 if you have the `pdcurses' library (-lpdcurses). */ +/* #undef HAVE_LIBPDCURSES */ /* Define to 1 if you have the `xml2' library (-lxml2). */ #define HAVE_LIBXML2 1 @@ -56,6 +71,10 @@ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define HAVE_MALLOC 1 + /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 @@ -68,6 +87,10 @@ /* Define to 1 if you have the `putenv' function. */ #define HAVE_PUTENV 1 +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#define HAVE_REALLOC 1 + /* Define to 1 if you have the `regcomp' function. */ #define HAVE_REGCOMP 1 @@ -120,10 +143,19 @@ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +/* Define if environ decl needed */ +/* #undef MANUAL_EXTERN_ENVIRON */ + /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "harry_b@mm.st" @@ -131,13 +163,13 @@ #define PACKAGE_NAME "cpm" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "cpm 0.23beta" +#define PACKAGE_STRING "cpm 0.25beta" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "cpm" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.23beta" +#define PACKAGE_VERSION "0.25beta" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -152,7 +184,7 @@ #define _FILE_OFFSET_BITS 64 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#define _LARGEFILE_SOURCE 1 +/* #undef _LARGEFILE_SOURCE */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ @@ -163,6 +195,9 @@ /* Define to `int' if doesn't define. */ /* #undef gid_t */ +/* Define to rpl_malloc if the replacement function should be used. */ +/* #undef malloc */ + /* Define to `int' if does not define. */ /* #undef mode_t */ @@ -172,9 +207,15 @@ /* Define to `int' if does not define. */ /* #undef pid_t */ +/* Define to rpl_realloc if the replacement function should be used. */ +/* #undef realloc */ + /* Define to `unsigned int' if does not define. */ /* #undef size_t */ +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + /* Define to `int' if doesn't define. */ /* #undef uid_t */ diff --git a/config.h.in b/config.h.in index 4d4619c..2c2fca5 100644 --- a/config.h.in +++ b/config.h.in @@ -7,8 +7,11 @@ /* Define to 1 if you have the `clearenv' function. */ #undef HAVE_CLEARENV -/* Define to 1 if you have the `environ' function. */ -#undef HAVE_ENVIRON +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define if environ extern is available */ +#undef HAVE_EXTERN_ENVIRON /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H @@ -31,12 +34,18 @@ /* Define to 1 if you have the `crack' library (-lcrack). */ #undef HAVE_LIBCRACK +/* Define to 1 if you have the `curses' library (-lcurses). */ +#undef HAVE_LIBCURSES + /* Define to 1 if you have the `dotconf' library (-ldotconf). */ #undef HAVE_LIBDOTCONF /* Define to 1 if you have the `gpgme' library (-lgpgme). */ #undef HAVE_LIBGPGME +/* Define to 1 if you have the `intl' library (-lintl). */ +#undef HAVE_LIBINTL + /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H @@ -46,6 +55,12 @@ /* Define to 1 if you have the `ncurses' library (-lncurses). */ #undef HAVE_LIBNCURSES +/* Define to 1 if you have the `ncursesw' library (-lncursesw). */ +#undef HAVE_LIBNCURSESW + +/* Define to 1 if you have the `pdcurses' library (-lpdcurses). */ +#undef HAVE_LIBPDCURSES + /* Define to 1 if you have the `xml2' library (-lxml2). */ #undef HAVE_LIBXML2 @@ -55,6 +70,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -67,6 +86,10 @@ /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#undef HAVE_REALLOC + /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP @@ -119,10 +142,19 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `unsetenv' function. */ +#undef HAVE_UNSETENV + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK +/* Define if environ decl needed */ +#undef MANUAL_EXTERN_ENVIRON + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -162,6 +194,9 @@ /* Define to `int' if doesn't define. */ #undef gid_t +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + /* Define to `int' if does not define. */ #undef mode_t @@ -171,9 +206,15 @@ /* Define to `int' if does not define. */ #undef pid_t +/* Define to rpl_realloc if the replacement function should be used. */ +#undef realloc + /* Define to `unsigned int' if does not define. */ #undef size_t +/* Define to `int' if does not define. */ +#undef ssize_t + /* Define to `int' if doesn't define. */ #undef uid_t diff --git a/configuration.c b/configuration.c index 964a541..fca5265 100644 --- a/configuration.c +++ b/configuration.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for configuration handling * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -29,6 +29,7 @@ #include #endif #include "configuration.h" +#include "general.h" #include "listhandler.h" #include "memory.h" @@ -45,6 +46,8 @@ */ void clearPassphrase(int final) { + TRACE(99, "clearPassphrase()", NULL); + if (final || !config -> keeppassphrase) { memSet(runtime -> passphrase, 0, PASSPHRASE_LENGTH); @@ -62,6 +65,8 @@ void clearPassphrase(int final) */ void freeConfiguration(void) { + TRACE(99, "freeConfiguration()", NULL); + if (config) { config -> defaultkeys = listFree(config -> defaultkeys); @@ -119,6 +124,8 @@ void freeConfiguration(void) */ void initConfiguration(void) { + TRACE(99, "initConfiguration()", NULL); + config = memAlloc(__FILE__, __LINE__, sizeof(cpmconfig_t)); runtime = memAlloc(__FILE__, __LINE__, sizeof(cpmruntime_t)); @@ -144,7 +151,9 @@ void initConfiguration(void) config -> configtest = 0; config -> cracklibstatus = CRACKLIB_ON; config -> createbackup = 1; + config -> debuglevel = 0; config -> encryptdata = 1; + config -> environtmentlist = 0; config -> help = 0; config -> infoheight = 5; config -> keeppassphrase = 0; diff --git a/configuration.h b/configuration.h index 903ebf7..e0ee84b 100644 --- a/configuration.h +++ b/configuration.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for configuration.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -57,7 +57,9 @@ typedef struct int configtest; int cracklibstatus; int createbackup; + int debuglevel; int encryptdata; + int environtmentlist; int help; int infoheight; int keeppassphrase; diff --git a/configure b/configure index be30cd1..a0907b9 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for cpm 0.23beta. +# Generated by GNU Autoconf 2.61 for cpm 0.25beta. # # Report bugs to . # @@ -12,7 +12,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -21,10 +22,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -217,7 +221,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; } else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -235,7 +239,6 @@ IFS=$as_save_IFS # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -244,10 +247,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : _ASEOF @@ -255,7 +260,6 @@ _ASEOF CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -264,10 +268,12 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : (as_func_return () { @@ -514,19 +520,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -559,44 +574,44 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='cpm' PACKAGE_TARNAME='cpm' -PACKAGE_VERSION='0.23beta' -PACKAGE_STRING='cpm 0.23beta' +PACKAGE_VERSION='0.25beta' +PACKAGE_STRING='cpm 0.25beta' PACKAGE_BUGREPORT='harry_b@mm.st' ac_unique_file="config.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif" @@ -652,6 +667,9 @@ INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE +NCURSES_CONFIG +LIBNCURSES_LIBS +LIBNCURSES_CFLAGS CDK_VERSION_DEF CDK_DEBIAN_DEP XML_CONFIG @@ -671,6 +689,7 @@ target_alias CC CFLAGS LDFLAGS +LIBS CPPFLAGS CPP' @@ -778,10 +797,10 @@ do -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -797,10 +816,10 @@ do -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -994,19 +1013,19 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) @@ -1175,7 +1194,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cpm 0.23beta to adapt to many kinds of systems. +\`configure' configures cpm 0.25beta to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1236,7 +1255,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cpm 0.23beta:";; + short | recursive ) echo "Configuration of cpm 0.25beta:";; esac cat <<\_ACEOF @@ -1248,23 +1267,28 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-ncurses=PATH path to the ncurses installation - --with-cdk=PATH path to the cdk installation - --with-cdk-v4 Force the usage of CDK version 4 - --with-crack-lib=PATH path to the libcrack installation - --with-crack-dict=FILE filename of the dictionaries (without extension) - --with-dotconf=PATH path to the dotconf installation - --with-gpgme=PATH path to the gpgme installation + --with-curses-dir=PATH path to the curses installation + --with-curses use the curses library + --with-ncurses use the ncurses library + --with-ncursesw use the wide-character ncurses library + --with-pdcurses use the pdcurses X11 library + --with-cdk-dir=PATH path to the cdk installation + --with-cdk-v4 force the usage of CDK version 4 + --with-cracklib-dir=PATH path to the libcrack installation + --with-cracklib-dict=FILE filename of the dictionaries (without extension) + --with-dotconf-dir=PATH path to the dotconf installation + --with-gpgme-dir=PATH path to the gpgme installation --with-memlock=LIMIT limit for max. memory lock validation WARNING: It is NOT recommended to turn this off! - --with-xml2=PATH path to the xml2 installation - --with-zlib=PATH path to the zlib installation + --with-xml2-dir=PATH path to the xml2 installation + --with-zlib-dir=PATH path to the zlib installation Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor @@ -1333,8 +1357,8 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cpm configure 0.23beta -generated by GNU Autoconf 2.60 +cpm configure 0.25beta +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1347,8 +1371,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cpm $as_me 0.23beta, which was -generated by GNU Autoconf 2.60. Invocation command line was +It was created by cpm $as_me 0.25beta, which was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1727,7 +1751,7 @@ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1767,7 +1791,7 @@ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1824,7 +1848,7 @@ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1865,7 +1889,7 @@ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1923,7 +1947,7 @@ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -1967,7 +1991,7 @@ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2108,7 +2132,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -2136,6 +2160,12 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2147,8 +2177,6 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -2326,27 +2354,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -2401,27 +2412,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2456,27 +2450,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -2512,27 +2489,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2648,27 +2608,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -2758,17 +2701,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2802,17 +2738,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2877,17 +2806,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2921,17 +2843,10 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2986,7 +2901,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3068,7 +2983,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3244,7 +3159,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3332,10 +3247,10 @@ fi # Check --with-XXX configuration -# Check whether --with-ncurses was given. -if test "${with_ncurses+set}" = set; then - withval=$with_ncurses; - CFLAGS="$CFLAGS -I${withval}/include" +# Check whether --with-curses-dir was given. +if test "${with_curses_dir+set}" = set; then + withval=$with_curses_dir; + CFLAGS="${CFLAGS} -I${withval}/include" CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -3346,154 +3261,50 @@ if test "${with_ncurses+set}" = set; then fi -# Check whether --with-cdk was given. -if test "${with_cdk+set}" = set; then - withval=$with_cdk; - CFLAGS="$CFLAGS -I${withval}/include -I${withval}/include/cdk" - CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/cdk" - LDFLAGS="$LDFLAGS -L${withval}/lib" - if test -n "${need_dash_r}"; then - LDFLAGS="$LDFLAGS -R${withval}/lib" - fi - - -fi - - -# Check whether --with-cdk-v4 was given. -if test "${with_cdk_v4+set}" = set; then - withval=$with_cdk_v4; - if test "${withval}" != "no"; then - CFLAGS="$CFLAGS -DFORCE_CDK_V4" - fi - - -fi - -USE_CRACKLIB=1 - -# Check whether --with-crack-lib was given. -if test "${with_crack_lib+set}" = set; then - withval=$with_crack_lib; - if test "${withval}" == "no"; then - CFLAGS="$CFLAGS -DNO_CRACKLIB" - USE_CRACKLIB=0 - else - CFLAGS="$CFLAGS -I${withval}/include" - CPPFLAGS="$CPPFLAGS -I${withval}/include" - LDFLAGS="$LDFLAGS -L${withval}/lib" - if test -n "${need_dash_r}"; then - LDFLAGS="$LDFLAGS -R${withval}/lib" - fi - fi - - -fi - - -# Check whether --with-crack-dict was given. -if test "${with_crack_dict+set}" = set; then - withval=$with_crack_dict; - if test ! -f "${withval}.hwm"; then - { { echo "$as_me:$LINENO: error: cracklib dictionary ${withval}.hwm does not exist" >&5 -echo "$as_me: error: cracklib dictionary ${withval}.hwm does not exist" >&2;} - { (exit 1); exit 1; }; } - fi - if test ! -f "${withval}.pwd"; then - { { echo "$as_me:$LINENO: error: cracklib dictionary ${withval}.pwd does not exist" >&5 -echo "$as_me: error: cracklib dictionary ${withval}.pwd does not exist" >&2;} - { (exit 1); exit 1; }; } - fi - if test ! -f "${withval}.pwi"; then - { { echo "$as_me:$LINENO: error: cracklib dictionary ${withval}.pwi does not exist" >&5 -echo "$as_me: error: cracklib dictionary ${withval}.pwi does not exist" >&2;} - { (exit 1); exit 1; }; } - fi - CFLAGS="$CFLAGS -DCRACKLIB_DICTPATH='\"${withval}\"'" - - -fi - +# this part was originally in the CDKs configure.in +use_curses_lib=ncursesw -# Check whether --with-dotconf was given. -if test "${with_dotconf+set}" = set; then - withval=$with_dotconf; - CFLAGS="$CFLAGS -I${withval}/include" - CPPFLAGS="$CPPFLAGS -I${withval}/include" - LDFLAGS="$LDFLAGS -L${withval}/lib" - if test -n "${need_dash_r}"; then - LDFLAGS="$LDFLAGS -R${withval}/lib" - fi +# Check whether --with-curses was given. +if test "${with_curses+set}" = set; then + withval=$with_curses; use_curses_lib=curses +else -fi +# Check whether --with-ncurses was given. +if test "${with_ncurses+set}" = set; then + withval=$with_ncurses; use_curses_lib=ncurses +else -# Check whether --with-gpgme was given. -if test "${with_gpgme+set}" = set; then - withval=$with_gpgme; - CFLAGS="$CFLAGS -I${withval}/include" - CPPFLAGS="$CPPFLAGS -I${withval}/include" - LDFLAGS="$LDFLAGS -L${withval}/lib" - if test -n "${need_dash_r}"; then - LDFLAGS="$LDFLAGS -R${withval}/lib" - fi +# Check whether --with-ncursesw was given. +if test "${with_ncursesw+set}" = set; then + withval=$with_ncursesw; use_curses_lib=ncursesw +else +# Check whether --with-pdcurses was given. +if test "${with_pdcurses+set}" = set; then + withval=$with_pdcurses; use_curses_lib=pdcurses fi - -# Check whether --with-memlock was given. -if test "${with_memlock+set}" = set; then - withval=$with_memlock; - if test "${withval}" == "no"; then - CFLAGS="$CFLAGS -DNO_MEMLOCK" - else - CFLAGS="$CFLAGS -DMEMLOCK_LIMIT=${withval}" - fi - - fi - -# Check whether --with-xml2 was given. -if test "${with_xml2+set}" = set; then - withval=$with_xml2; - PATH="${withval}/bin:${withval}:${PATH}" - - fi - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then - withval=$with_zlib; - CFLAGS="$CFLAGS -I${withval}/include" - CPPFLAGS="$CPPFLAGS -I${withval}/include" - LDFLAGS="$LDFLAGS -L${withval}/lib" - if test -n "${need_dash_r}"; then - LDFLAGS="$LDFLAGS -R${withval}/lib" - fi - - fi +curses_found=0 +curses_config="" +case ${use_curses_lib} in + ncurses) -# echo "CFLAGS: $CFLAGS" -# echo "CPPFLAGS: $CPPFLAGS" -# echo "LDFLAGS: $LDFLAGS" - -# Checks for libraries. -{ echo "$as_me:$LINENO: checking libraries" >&5 -echo "$as_me: checking libraries" >&6;} - -{ echo "$as_me:$LINENO: checking for main in -lm" >&5 -echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then +{ echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5 +echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6; } +if test "${ac_cv_lib_ncurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" +LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3501,11 +3312,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (); int main () { -return main (); +return initscr (); ; return 0; } @@ -3523,63 +3340,48 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_m_main=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ncurses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_m_main=no + ac_cv_lib_ncurses_initscr=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 -echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } -if test $ac_cv_lib_m_main = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6; } +if test $ac_cv_lib_ncurses_initscr = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 +#define HAVE_LIBNCURSES 1 _ACEOF - LIBS="-lm $LIBS" + LIBS="-lncurses $LIBS" fi -if test "${ac_cv_lib_m_main}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the m library." >&5 -echo "$as_me: error: can not find the m library." >&2;} - { (exit 1); exit 1; }; } -fi + if test "${ac_cv_lib_ncurses_initscr}" == "yes"; then + curses_found=1 + curses_config=ncurses5-config + fi + ;; + ncursesw) -{ echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5 -echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6; } -if test "${ac_cv_lib_ncurses_initscr+set}" = set; then +{ echo "$as_me:$LINENO: checking for wget_wch in -lncursesw" >&5 +echo $ECHO_N "checking for wget_wch in -lncursesw... $ECHO_C" >&6; } +if test "${ac_cv_lib_ncursesw_wget_wch+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" +LIBS="-lncursesw $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3593,11 +3395,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char initscr (); +char wget_wch (); int main () { -return initscr (); +return wget_wch (); ; return 0; } @@ -3615,63 +3417,48 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_ncurses_initscr=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_ncursesw_wget_wch=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ncurses_initscr=no + ac_cv_lib_ncursesw_wget_wch=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6; } -if test $ac_cv_lib_ncurses_initscr = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncursesw_wget_wch" >&5 +echo "${ECHO_T}$ac_cv_lib_ncursesw_wget_wch" >&6; } +if test $ac_cv_lib_ncursesw_wget_wch = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNCURSES 1 +#define HAVE_LIBNCURSESW 1 _ACEOF - LIBS="-lncurses $LIBS" + LIBS="-lncursesw $LIBS" fi -if test "${ac_cv_lib_ncurses_initscr}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the ncurses library." >&5 -echo "$as_me: error: can not find the ncurses library." >&2;} - { (exit 1); exit 1; }; } -fi + if test "${ac_cv_lib_ncursesw_wget_wch}" == "yes"; then + curses_found=1 + curses_config=ncursesw5-config + fi + ;; + pdcurses) -{ echo "$as_me:$LINENO: checking for initCDKScreen in -lcdk" >&5 -echo $ECHO_N "checking for initCDKScreen in -lcdk... $ECHO_C" >&6; } -if test "${ac_cv_lib_cdk_initCDKScreen+set}" = set; then +{ echo "$as_me:$LINENO: checking for initscr in -lpdcurses" >&5 +echo $ECHO_N "checking for initscr in -lpdcurses... $ECHO_C" >&6; } +if test "${ac_cv_lib_pdcurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcdk $LIBS" +LIBS="-lpdcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3685,11 +3472,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char initCDKScreen (); +char initscr (); int main () { -return initCDKScreen (); +return initscr (); ; return 0; } @@ -3707,64 +3494,47 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_cdk_initCDKScreen=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_pdcurses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_cdk_initCDKScreen=no + ac_cv_lib_pdcurses_initscr=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_cdk_initCDKScreen" >&5 -echo "${ECHO_T}$ac_cv_lib_cdk_initCDKScreen" >&6; } -if test $ac_cv_lib_cdk_initCDKScreen = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pdcurses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_pdcurses_initscr" >&6; } +if test $ac_cv_lib_pdcurses_initscr = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCDK 1 +#define HAVE_LIBPDCURSES 1 _ACEOF - LIBS="-lcdk $LIBS" + LIBS="-lpdcurses $LIBS" fi -if test "${ac_cv_lib_cdk_initCDKScreen}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the cdk library." >&5 -echo "$as_me: error: can not find the cdk library." >&2;} - { (exit 1); exit 1; }; } -fi -if test ${USE_CRACKLIB} == 1; then + if test "${ac_cv_lib_pdcurses_initscr}" == "yes"; then + curses_found=1 + fi + ;; + curses) -{ echo "$as_me:$LINENO: checking for FascistCheck in -lcrack" >&5 -echo $ECHO_N "checking for FascistCheck in -lcrack... $ECHO_C" >&6; } -if test "${ac_cv_lib_crack_FascistCheck+set}" = set; then +{ echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5 +echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; } +if test "${ac_cv_lib_curses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcrack $LIBS" +LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3778,11 +3548,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char FascistCheck (); +char initscr (); int main () { -return FascistCheck (); +return initscr (); ; return 0; } @@ -3800,159 +3570,254 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_crack_FascistCheck=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_curses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_crack_FascistCheck=no + ac_cv_lib_curses_initscr=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_crack_FascistCheck" >&5 -echo "${ECHO_T}$ac_cv_lib_crack_FascistCheck" >&6; } -if test $ac_cv_lib_crack_FascistCheck = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6; } +if test $ac_cv_lib_curses_initscr = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCRACK 1 +#define HAVE_LIBCURSES 1 _ACEOF - LIBS="-lcrack $LIBS" + LIBS="-lcurses $LIBS" fi - if test "${ac_cv_lib_crack_FascistCheck}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the crack library." >&5 -echo "$as_me: error: can not find the crack library." >&2;} + if test "${ac_cv_lib_curses_initscr}" == "yes"; then + curses_found=1 + fi + ;; + *) + { { echo "$as_me:$LINENO: error: no curses library select." >&5 +echo "$as_me: error: no curses library select." >&2;} + { (exit 1); exit 1; }; } + ;; +esac +if test ${curses_found} -ne 1; then + { { echo "$as_me:$LINENO: error: can not find the selected ncursesw/ncurses library." >&5 +echo "$as_me: error: can not find the selected ncursesw/ncurses library." >&2;} { (exit 1); exit 1; }; } - fi -else - { echo "$as_me:$LINENO: skipping cracklib check" >&5 -echo "$as_me: skipping cracklib check" >&6;} fi - -{ echo "$as_me:$LINENO: checking for dotconf_create in -ldotconf" >&5 -echo $ECHO_N "checking for dotconf_create in -ldotconf... $ECHO_C" >&6; } -if test "${ac_cv_lib_dotconf_dotconf_create+set}" = set; then +# check if we can call ncurses5-config or ncursesw5-config +if test -n ${curses_config}; then + # Extract the first word of "${curses_config}", so it can be a program name with args. +set dummy ${curses_config}; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldotconf $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + case $NCURSES_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_NCURSES_CONFIG="$NCURSES_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_NCURSES_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dotconf_create (); -int -main () -{ -return dotconf_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + ;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dotconf_dotconf_create=yes +fi +NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG +if test -n "$NCURSES_CONFIG"; then + { echo "$as_me:$LINENO: result: $NCURSES_CONFIG" >&5 +echo "${ECHO_T}$NCURSES_CONFIG" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dotconf_dotconf_create=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dotconf_dotconf_create" >&5 -echo "${ECHO_T}$ac_cv_lib_dotconf_dotconf_create" >&6; } -if test $ac_cv_lib_dotconf_dotconf_create = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDOTCONF 1 -_ACEOF - LIBS="-ldotconf $LIBS" + if test -z "$ac_cv_path_NCURSES_CONFIG"; then + { { echo "$as_me:$LINENO: error: Could not find ${curses_config} anywhere." >&5 +echo "$as_me: error: Could not find ${curses_config} anywhere." >&2;} + { (exit 1); exit 1; }; } + fi + + LIBNCURSES_LIBS="`$NCURSES_CONFIG --libs`" + LIBNCURSES_CFLAGS="`$NCURSES_CONFIG --cflags`" + fi -if test "${ac_cv_lib_dotconf_dotconf_create}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the dotconf library." >&5 -echo "$as_me: error: can not find the dotconf library." >&2;} - { (exit 1); exit 1; }; } + +# Check whether --with-cdk-dir was given. +if test "${with_cdk_dir+set}" = set; then + withval=$with_cdk_dir; + CFLAGS="${CFLAGS} -I${withval}/include -I${withval}/include/cdk" + CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/cdk" + LDFLAGS="$LDFLAGS -L${withval}/lib" + if test -n "${need_dash_r}"; then + LDFLAGS="$LDFLAGS -R${withval}/lib" + fi + + fi -{ echo "$as_me:$LINENO: checking for gpgme_get_engine_info in -lgpgme" >&5 -echo $ECHO_N "checking for gpgme_get_engine_info in -lgpgme... $ECHO_C" >&6; } -if test "${ac_cv_lib_gpgme_gpgme_get_engine_info+set}" = set; then + +# Check whether --with-cdk-v4 was given. +if test "${with_cdk_v4+set}" = set; then + withval=$with_cdk_v4; + if test "${withval}" != "no"; then + CFLAGS="${CFLAGS} -DFORCE_CDK_V4" + fi + + +fi + +USE_CRACKLIB=1 + +# Check whether --with-cracklib-dir was given. +if test "${with_cracklib_dir+set}" = set; then + withval=$with_cracklib_dir; + if test "${withval}" == "no"; then + CFLAGS="${CFLAGS} -DNO_CRACKLIB" + USE_CRACKLIB=0 + else + CFLAGS="${CFLAGS} -I${withval}/include" + CPPFLAGS="$CPPFLAGS -I${withval}/include" + LDFLAGS="$LDFLAGS -L${withval}/lib" + if test -n "${need_dash_r}"; then + LDFLAGS="$LDFLAGS -R${withval}/lib" + fi + fi + + +fi + +CRACKLIB_DICTPATH="" + +# Check whether --with-cracklib-dict was given. +if test "${with_cracklib_dict+set}" = set; then + withval=$with_cracklib_dict; + if test ! -f "${withval}.hwm"; then + { { echo "$as_me:$LINENO: error: cracklib dictionary ${withval}.hwm does not exist" >&5 +echo "$as_me: error: cracklib dictionary ${withval}.hwm does not exist" >&2;} + { (exit 1); exit 1; }; } + fi + if test ! -f "${withval}.pwd"; then + { { echo "$as_me:$LINENO: error: cracklib dictionary ${withval}.pwd does not exist" >&5 +echo "$as_me: error: cracklib dictionary ${withval}.pwd does not exist" >&2;} + { (exit 1); exit 1; }; } + fi + if test ! -f "${withval}.pwi"; then + { { echo "$as_me:$LINENO: error: cracklib dictionary ${withval}.pwi does not exist" >&5 +echo "$as_me: error: cracklib dictionary ${withval}.pwi does not exist" >&2;} + { (exit 1); exit 1; }; } + fi + CFLAGS="${CFLAGS} -DCRACKLIB_DICTPATH='\"${withval}\"'" + CRACKLIB_DICTPATH="${withval}" + + +fi + + +# Check whether --with-dotconf-dir was given. +if test "${with_dotconf_dir+set}" = set; then + withval=$with_dotconf_dir; + CFLAGS="${CFLAGS} -I${withval}/include" + CPPFLAGS="$CPPFLAGS -I${withval}/include" + LDFLAGS="$LDFLAGS -L${withval}/lib" + if test -n "${need_dash_r}"; then + LDFLAGS="$LDFLAGS -R${withval}/lib" + fi + + +fi + + +# Check whether --with-gpgme-dir was given. +if test "${with_gpgme_dir+set}" = set; then + withval=$with_gpgme_dir; + CFLAGS="${CFLAGS} -I${withval}/include" + CPPFLAGS="$CPPFLAGS -I${withval}/include" + LDFLAGS="$LDFLAGS -L${withval}/lib" + if test -n "${need_dash_r}"; then + LDFLAGS="$LDFLAGS -R${withval}/lib" + fi + + +fi + + +# Check whether --with-memlock was given. +if test "${with_memlock+set}" = set; then + withval=$with_memlock; + if test "${withval}" == "no"; then + CFLAGS="${CFLAGS} -DNO_MEMLOCK" + else + CFLAGS="${CFLAGS} -DMEMLOCK_LIMIT=${withval}" + fi + + +fi + + +# Check whether --with-xml2-dir was given. +if test "${with_xml2_dir+set}" = set; then + withval=$with_xml2_dir; + PATH="${withval}/bin:${withval}:${PATH}" + + +fi + + +# Check whether --with-zlib-dir was given. +if test "${with_zlib_dir+set}" = set; then + withval=$with_zlib_dir; + CFLAGS="${CFLAGS} -I${withval}/include" + CPPFLAGS="$CPPFLAGS -I${withval}/include" + LDFLAGS="$LDFLAGS -L${withval}/lib" + if test -n "${need_dash_r}"; then + LDFLAGS="$LDFLAGS -R${withval}/lib" + fi + + +fi + + +# echo "CFLAGS: ${CFLAGS}" +# echo "CPPFLAGS: ${CPPFLAGS}" +# echo "LDFLAGS: ${LDFLAGS}" + +# Checks for libraries. +{ echo "$as_me:$LINENO: checking libraries" >&5 +echo "$as_me: checking libraries" >&6;} + +{ echo "$as_me:$LINENO: checking for main in -lm" >&5 +echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lgpgme $LIBS" +LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3960,17 +3825,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gpgme_get_engine_info (); + int main () { -return gpgme_get_engine_info (); +return main (); ; return 0; } @@ -3988,63 +3847,47 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpgme_gpgme_get_engine_info=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_gpgme_gpgme_get_engine_info=no + ac_cv_lib_m_main=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpgme_gpgme_get_engine_info" >&5 -echo "${ECHO_T}$ac_cv_lib_gpgme_gpgme_get_engine_info" >&6; } -if test $ac_cv_lib_gpgme_gpgme_get_engine_info = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 +echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } +if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGPGME 1 +#define HAVE_LIBM 1 _ACEOF - LIBS="-lgpgme $LIBS" + LIBS="-lm $LIBS" fi -if test "${ac_cv_lib_gpgme_gpgme_get_engine_info}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the gpgme library." >&5 -echo "$as_me: error: can not find the gpgme library." >&2;} +if test "${ac_cv_lib_m_main}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the m library." >&5 +echo "$as_me: error: can not find the m library." >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5 -echo $ECHO_N "checking for xmlParseFile in -lxml2... $ECHO_C" >&6; } -if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then +{ echo "$as_me:$LINENO: checking for initCDKScreen in -lcdk" >&5 +echo $ECHO_N "checking for initCDKScreen in -lcdk... $ECHO_C" >&6; } +if test "${ac_cv_lib_cdk_initCDKScreen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lxml2 $LIBS" +LIBS="-lcdk $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4058,11 +3901,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char xmlParseFile (); +char initCDKScreen (); int main () { -return xmlParseFile (); +return initCDKScreen (); ; return 0; } @@ -4080,63 +3923,48 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_xml2_xmlParseFile=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_cdk_initCDKScreen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_xml2_xmlParseFile=no + ac_cv_lib_cdk_initCDKScreen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5 -echo "${ECHO_T}$ac_cv_lib_xml2_xmlParseFile" >&6; } -if test $ac_cv_lib_xml2_xmlParseFile = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_cdk_initCDKScreen" >&5 +echo "${ECHO_T}$ac_cv_lib_cdk_initCDKScreen" >&6; } +if test $ac_cv_lib_cdk_initCDKScreen = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBXML2 1 +#define HAVE_LIBCDK 1 _ACEOF - LIBS="-lxml2 $LIBS" + LIBS="-lcdk $LIBS" fi -if test "${ac_cv_lib_xml2_xmlParseFile}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the xml2 library." >&5 -echo "$as_me: error: can not find the xml2 library." >&2;} +if test "${ac_cv_lib_cdk_initCDKScreen}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the cdk library." >&5 +echo "$as_me: error: can not find the cdk library." >&2;} { (exit 1); exit 1; }; } fi +if test ${USE_CRACKLIB} == 1; then -{ echo "$as_me:$LINENO: checking for compress in -lz" >&5 -echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } -if test "${ac_cv_lib_z_compress+set}" = set; then +{ echo "$as_me:$LINENO: checking for FascistCheck in -lcrack" >&5 +echo $ECHO_N "checking for FascistCheck in -lcrack... $ECHO_C" >&6; } +if test "${ac_cv_lib_crack_FascistCheck+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" +LIBS="-lcrack $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4150,11 +3978,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char compress (); +char FascistCheck (); int main () { -return compress (); +return FascistCheck (); ; return 0; } @@ -4172,239 +4000,1284 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_z_compress=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_crack_FascistCheck=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_compress=no + ac_cv_lib_crack_FascistCheck=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5 -echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } -if test $ac_cv_lib_z_compress = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_crack_FascistCheck" >&5 +echo "${ECHO_T}$ac_cv_lib_crack_FascistCheck" >&6; } +if test $ac_cv_lib_crack_FascistCheck = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 +#define HAVE_LIBCRACK 1 _ACEOF - LIBS="-lz $LIBS" + LIBS="-lcrack $LIBS" fi -if test "${ac_cv_lib_z_compress}" != "yes"; then - { { echo "$as_me:$LINENO: error: can not find the zlib library." >&5 -echo "$as_me: error: can not find the zlib library." >&2;} + if test "${ac_cv_lib_crack_FascistCheck}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the crack library." >&5 +echo "$as_me: error: can not find the crack library." >&2;} { (exit 1); exit 1; }; } + fi +else + { echo "$as_me:$LINENO: skipping cracklib check" >&5 +echo "$as_me: skipping cracklib check" >&6;} fi -# ------------------------------------------------------------------------------ -# we check if we can use this CDK version -CDK_H=`gcc ${CFLAGS} -M -MG interface_gui.c | perl -e 'while (<>) { $_ =~ s/^.*://; $_ =~ s/^\\s+//; $_ =~ s/\\\\//; $_ =~ s/\\s+$//; @tmp = split(/ /, $_); while (@tmp) { $file = shift(@tmp); if ($file =~ m:/cdk\\.h$:) { print "$file\\n"; } } }' | sort | uniq` -if test "${CDK_H}" == ""; then - { { echo "$as_me:$LINENO: error: could not locate CDK header file." >&5 -echo "$as_me: error: could not locate CDK header file." >&2;} - { (exit 1); exit 1; }; } -fi -INCOMPATIBLE=`grep "^#define MAX_ITEMS" "${CDK_H}" | grep -c "unused by widgets"` -CDK_UNUSABLE=0 -CDK_VERSION_DEF="-DCDK_VERSION_4" -CDK_DEBIAN_DEP="libcdk4 (<= 4.9.10)" -if test ${INCOMPATIBLE} -gt 0; then - # seems like an incompatible version; we have to check the detailed - # version to be sure - CDK_UNUSABLE=1 +{ echo "$as_me:$LINENO: checking for dotconf_create in -ldotconf" >&5 +echo $ECHO_N "checking for dotconf_create in -ldotconf... $ECHO_C" >&6; } +if test "${ac_cv_lib_dotconf_dotconf_create+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldotconf $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - # this file only exists in v5 - CDK_VERSION_H=`dirname "${CDK_H}"`"/cdk_version.h" - if test -f "${CDK_VERSION_H}"; then - CDK_VERSION=`grep "CDK_VERSION_PATCH" ${CDK_VERSION_H} | cut -d " " -f 3 | sed -e 's/"//g'` - { echo "$as_me:$LINENO: CDK version patch: ${CDK_VERSION}" >&5 -echo "$as_me: CDK version patch: ${CDK_VERSION}" >&6;} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dotconf_create (); +int +main () +{ +return dotconf_create (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dotconf_dotconf_create=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # only versions newer than 20060220 can be used since Thomas E. Dickey - # fixed some bugs I found with the alphalist. - if test ${CDK_VERSION} -ge 20060220; then - CDK_UNUSABLE=0 - CDK_VERSION_DEF="-DCDK_VERSION_5" - CDK_DEBIAN_DEP="libcdk5 (> 5.0.20050424-2)" - fi - fi + ac_cv_lib_dotconf_dotconf_create=no fi -if test ${CDK_UNUSABLE} -gt 0; then - { echo "$as_me:$LINENO: Sorry, this version of CDK can not handle empty lists." >&5 -echo "$as_me: Sorry, this version of CDK can not handle empty lists." >&6;} - { echo "$as_me:$LINENO: You must downgrade to a version older than cdk-4.9.11-20031210" >&5 -echo "$as_me: You must downgrade to a version older than cdk-4.9.11-20031210" >&6;} - { echo "$as_me:$LINENO: or newer than cdk-5.0.20060220." >&5 -echo "$as_me: or newer than cdk-5.0.20060220." >&6;} - { { echo "$as_me:$LINENO: error: Incompatible libcdk version found." >&5 -echo "$as_me: error: Incompatible libcdk version found." >&2;} - { (exit 1); exit 1; }; } +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dotconf_dotconf_create" >&5 +echo "${ECHO_T}$ac_cv_lib_dotconf_dotconf_create" >&6; } +if test $ac_cv_lib_dotconf_dotconf_create = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDOTCONF 1 +_ACEOF + LIBS="-ldotconf $LIBS" +fi +if test "${ac_cv_lib_dotconf_dotconf_create}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the dotconf library." >&5 +echo "$as_me: error: can not find the dotconf library." >&2;} + { (exit 1); exit 1; }; } +fi -# ------------------------------------------------------------------------------ -# libxml2 check from http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdoctools/configure.in.in?rev=1.38&content-type=text/x-cvsweb-markup - -# Extract the first word of "xml2-config", so it can be a program name with args. -set dummy xml2-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_XML_CONFIG+set}" = set; then +{ echo "$as_me:$LINENO: checking for gpgme_get_engine_info in -lgpgme" >&5 +echo $ECHO_N "checking for gpgme_get_engine_info in -lgpgme... $ECHO_C" >&6; } +if test "${ac_cv_lib_gpgme_gpgme_get_engine_info+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $XML_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_XML_CONFIG="$XML_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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_XML_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgpgme $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gpgme_get_engine_info (); +int +main () +{ +return gpgme_get_engine_info (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -fi -XML_CONFIG=$ac_cv_path_XML_CONFIG -if test -n "$XML_CONFIG"; then - { echo "$as_me:$LINENO: result: $XML_CONFIG" >&5 -echo "${ECHO_T}$XML_CONFIG" >&6; } +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gpgme_gpgme_get_engine_info=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test -z "$ac_cv_path_XML_CONFIG"; then - { { echo "$as_me:$LINENO: error: Could not find libxml2 anywhere." >&5 -echo "$as_me: error: Could not find libxml2 anywhere." >&2;} - { (exit 1); exit 1; }; } + ac_cv_lib_gpgme_gpgme_get_engine_info=no fi -LIBXML_LIBS="`$XML_CONFIG --libs`" -LIBXML_CFLAGS="`$XML_CONFIG --cflags`" -LIBXML_XMLLINT=`dirname $XML_CONFIG`"/xmllint" - +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpgme_gpgme_get_engine_info" >&5 +echo "${ECHO_T}$ac_cv_lib_gpgme_gpgme_get_engine_info" >&6; } +if test $ac_cv_lib_gpgme_gpgme_get_engine_info = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGPGME 1 +_ACEOF + LIBS="-lgpgme $LIBS" +fi +if test "${ac_cv_lib_gpgme_gpgme_get_engine_info}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the gpgme library." >&5 +echo "$as_me: error: can not find the gpgme library." >&2;} + { (exit 1); exit 1; }; } +fi -# Extract the first word of "gpgme-config", so it can be a program name with args. -set dummy gpgme-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_GPGME_CONFIG+set}" = set; then +{ echo "$as_me:$LINENO: checking for xmlParseFile in -lxml2" >&5 +echo $ECHO_N "checking for xmlParseFile in -lxml2... $ECHO_C" >&6; } +if test "${ac_cv_lib_xml2_xmlParseFile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $GPGME_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_GPGME_CONFIG="$GPGME_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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GPGME_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxml2 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xmlParseFile (); +int +main () +{ +return xmlParseFile (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -fi -GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG -if test -n "$GPGME_CONFIG"; then - { echo "$as_me:$LINENO: result: $GPGME_CONFIG" >&5 -echo "${ECHO_T}$GPGME_CONFIG" >&6; } +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_xml2_xmlParseFile=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_xml2_xmlParseFile=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlParseFile" >&5 +echo "${ECHO_T}$ac_cv_lib_xml2_xmlParseFile" >&6; } +if test $ac_cv_lib_xml2_xmlParseFile = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBXML2 1 +_ACEOF + + LIBS="-lxml2 $LIBS" + +fi + +if test "${ac_cv_lib_xml2_xmlParseFile}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the xml2 library." >&5 +echo "$as_me: error: can not find the xml2 library." >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: checking for compress in -lz" >&5 +echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_compress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char compress (); +int +main () +{ +return compress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_z_compress=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_compress=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5 +echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } +if test $ac_cv_lib_z_compress = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + +if test "${ac_cv_lib_z_compress}" != "yes"; then + { { echo "$as_me:$LINENO: error: can not find the zlib library." >&5 +echo "$as_me: error: can not find the zlib library." >&2;} + { (exit 1); exit 1; }; } +fi +# Check if we find a separate libintl library + +{ echo "$as_me:$LINENO: checking for gettext in -lintl" >&5 +echo $ECHO_N "checking for gettext in -lintl... $ECHO_C" >&6; } +if test "${ac_cv_lib_intl_gettext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gettext (); +int +main () +{ +return gettext (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_intl_gettext=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_intl_gettext=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_gettext" >&5 +echo "${ECHO_T}$ac_cv_lib_intl_gettext" >&6; } +if test $ac_cv_lib_intl_gettext = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBINTL 1 +_ACEOF + + LIBS="-lintl $LIBS" + +fi + + + +# ------------------------------------------------------------------------------ +# try to find the cracklib dictionary +if test ${USE_CRACKLIB} == 1; then + if test -z ${CRACKLIB_DICTPATH}; then + # the -D setting here is necessary, because general.c would not compile + # without this definition + CRACK_H=`${CC} -DCRACKLIB_DICTPATH='\"/\"' ${CFLAGS} ${CPPFLAGS} -M -MG general.c | perl -e 'while (<>) { $_ =~ s/^.*://; $_ =~ s/^\\s+//; $_ =~ s/\\\\//; $_ =~ s/\\s+$//; @tmp = split(/ /, $_); while (@tmp) { $file = shift(@tmp); if ($file =~ m:/crack\\.h$:) { print "$file\\n"; } } }' | sort | uniq` + if test "${CRACK_H}" == ""; then + { { echo "$as_me:$LINENO: error: could not locate the cracklib header file." >&5 +echo "$as_me: error: could not locate the cracklib header file." >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: cracklib header found at ${CRACK_H}." >&5 +echo "$as_me: cracklib header found at ${CRACK_H}." >&6;} + fi + + grep CRACKLIB_DICTPATH ${CRACK_H} > /dev/null 2>&1 + if test ${?} -eq 0; then + { echo "$as_me:$LINENO: CRACKLIB_DICTPATH probably defined in ${CRACK_H}." >&5 +echo "$as_me: CRACKLIB_DICTPATH probably defined in ${CRACK_H}." >&6;} + elif test ${?} -eq 1; then + { echo "$as_me:$LINENO: CRACKLIB_DICTPATH not defined in ${CRACK_H}." >&5 +echo "$as_me: CRACKLIB_DICTPATH not defined in ${CRACK_H}." >&6;} + if test -z "${CRACKLIB_DICTPATH}"; then + for withval in /var/cache/cracklib/cracklib_dict + do + COUNT=0 + if test -f "${withval}.hwm"; then + COUNT=$((${COUNT}+1)) + fi + if test -f "${withval}.pwd"; then + COUNT=$((${COUNT}+1)) + fi + if test -f "${withval}.pwi"; then + COUNT=$((${COUNT}+1)) + fi + + if test ${COUNT} -eq 3; then + # all three files exist, this is a correct version + CFLAGS="${CFLAGS} -DCRACKLIB_DICTPATH='\"${withval}\"'" + CRACKLIB_DICTPATH="${withval}" + break + fi + done + + if test ${COUNT} -eq 3; then + { echo "$as_me:$LINENO: CRACKLIB_DICTPATH detected as ${CRACKLIB_DICTPATH}." >&5 +echo "$as_me: CRACKLIB_DICTPATH detected as ${CRACKLIB_DICTPATH}." >&6;} + else + { { echo "$as_me:$LINENO: error: CRACKLIB_DICTPATH could not be auto-detected. Please use --with-cracklib-dict to specify." >&5 +echo "$as_me: error: CRACKLIB_DICTPATH could not be auto-detected. Please use --with-cracklib-dict to specify." >&2;} + { (exit 1); exit 1; }; } + fi + else + { echo "$as_me:$LINENO: using CRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}." >&5 +echo "$as_me: using CRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}." >&6;} + fi + else + { { echo "$as_me:$LINENO: error: grep failed for file ${CRACK_H}." >&5 +echo "$as_me: error: grep failed for file ${CRACK_H}." >&2;} + { (exit 1); exit 1; }; } + fi + else + { echo "$as_me:$LINENO: using CRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}." >&5 +echo "$as_me: using CRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}." >&6;} + fi +fi + +# ------------------------------------------------------------------------------ +# we check if we can use this CDK version +CDK_H=`${CC} ${CFLAGS} ${CPPFLAGS} -M -MG interface_gui.c | perl -e 'while (<>) { $_ =~ s/^.*://; $_ =~ s/^\\s+//; $_ =~ s/\\\\//; $_ =~ s/\\s+$//; @tmp = split(/ /, $_); while (@tmp) { $file = shift(@tmp); if ($file =~ m:/cdk\\.h$:) { print "$file\\n"; } } }' | sort | uniq` +if test "${CDK_H}" == ""; then + { { echo "$as_me:$LINENO: error: could not locate CDK header file." >&5 +echo "$as_me: error: could not locate CDK header file." >&2;} + { (exit 1); exit 1; }; } +else + { echo "$as_me:$LINENO: CDK header found at ${CDK_H}." >&5 +echo "$as_me: CDK header found at ${CDK_H}." >&6;} +fi +INCOMPATIBLE=`grep "^#define MAX_ITEMS" "${CDK_H}" | grep -c "unused by widgets"` +CDK_UNUSABLE=0 +CDK_VERSION_DEF="-DCDK_VERSION_4" +CDK_DEBIAN_DEP="libcdk4 (<= 4.9.10)" +if test ${INCOMPATIBLE} -gt 0; then + # seems like an incompatible version; we have to check the detailed + # version to be sure + CDK_UNUSABLE=1 + + # this file only exists in v5 + CDK_VERSION_H=`dirname "${CDK_H}"`"/cdk_version.h" + if test -f "${CDK_VERSION_H}"; then + CDK_VERSION=`grep "CDK_VERSION_PATCH" ${CDK_VERSION_H} | cut -d " " -f 3 | sed -e 's/"//g'` + { echo "$as_me:$LINENO: CDK version patch: ${CDK_VERSION}" >&5 +echo "$as_me: CDK version patch: ${CDK_VERSION}" >&6;} + + # only versions newer than 20090215 can be used since Thomas E. Dickey + # fixed some bugs I found with the alphalist. + if test ${CDK_VERSION} -ge 20090215; then + CDK_UNUSABLE=0 + CDK_VERSION_DEF="-DCDK_VERSION_5" + CDK_DEBIAN_DEP="libcdk5 (> 5.0.20090215-1)" + fi + fi +fi + +if test ${CDK_UNUSABLE} -gt 0; then + { echo "$as_me:$LINENO: Sorry, CPM is not compatible with the current verion of CDK." >&5 +echo "$as_me: Sorry, CPM is not compatible with the current verion of CDK." >&6;} + { echo "$as_me:$LINENO: You must downgrade to a version older than cdk-4.9.11-20031210" >&5 +echo "$as_me: You must downgrade to a version older than cdk-4.9.11-20031210" >&6;} + { echo "$as_me:$LINENO: or newer than cdk-5.0.20090215." >&5 +echo "$as_me: or newer than cdk-5.0.20090215." >&6;} + { { echo "$as_me:$LINENO: error: Incompatible libcdk version found." >&5 +echo "$as_me: error: Incompatible libcdk version found." >&2;} + { (exit 1); exit 1; }; } +fi + + + + +# ------------------------------------------------------------------------------ +# libxml2 check from http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdoctools/configure.in.in?rev=1.38&content-type=text/x-cvsweb-markup + +# Extract the first word of "xml2-config", so it can be a program name with args. +set dummy xml2-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_XML_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XML_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_XML_CONFIG="$XML_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_XML_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +XML_CONFIG=$ac_cv_path_XML_CONFIG +if test -n "$XML_CONFIG"; then + { echo "$as_me:$LINENO: result: $XML_CONFIG" >&5 +echo "${ECHO_T}$XML_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test -z "$ac_cv_path_XML_CONFIG"; then + { { echo "$as_me:$LINENO: error: Could not find libxml2 anywhere." >&5 +echo "$as_me: error: Could not find libxml2 anywhere." >&2;} + { (exit 1); exit 1; }; } +fi + +LIBXML_LIBS="`$XML_CONFIG --libs`" +LIBXML_CFLAGS="`$XML_CONFIG --cflags`" +LIBXML_XMLLINT=`dirname $XML_CONFIG`"/xmllint" + + + + + +# Extract the first word of "gpgme-config", so it can be a program name with args. +set dummy gpgme-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GPGME_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GPGME_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GPGME_CONFIG="$GPGME_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_GPGME_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG +if test -n "$GPGME_CONFIG"; then + { echo "$as_me:$LINENO: result: $GPGME_CONFIG" >&5 +echo "${ECHO_T}$GPGME_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test -z "$ac_cv_path_GPGME_CONFIG"; then + { { echo "$as_me:$LINENO: error: Could not find gpgme anywhere." >&5 +echo "$as_me: error: Could not find gpgme anywhere." >&2;} + { (exit 1); exit 1; }; } +fi + +LIBGPGME_VERSION="`$GPGME_CONFIG --version | cut -d '.' -f 1,2 | sed -e 's/\\.//g'`" +if test $LIBGPGME_VERSION -lt 10; then + { { echo "$as_me:$LINENO: error: GPGME must be version 1.0 or higher." >&5 +echo "$as_me: error: GPGME must be version 1.0 or higher." >&2;} + { (exit 1); exit 1; }; } +fi +if test $LIBGPGME_VERSION -lt 11; then + { echo "$as_me:$LINENO: GpgME version lower than 1.1 found, recipients can't be detected automatically." >&5 +echo "$as_me: GpgME version lower than 1.1 found, recipients can't be detected automatically." >&6;} + WRAPPER_NECESSARY=1 +else + { echo "$as_me:$LINENO: GpgME version 1.1+ found. Enabling automatic recipient detection." >&5 +echo "$as_me: GpgME version 1.1+ found. Enabling automatic recipient detection." >&6;} + CFLAGS="${CFLAGS} -DGPGME_HAS_RECIPIENT" + WRAPPER_NECESSARY=0 +fi + + +LIBGPGME_LIBS="`$GPGME_CONFIG --libs`" +LIBGPGME_CFLAGS="-D_FILE_OFFSET_BITS=64 `$GPGME_CONFIG --cflags`" + + + +# ------------------------------------------------------------------------------ + +# Checks for header files. +{ echo "$as_me:$LINENO: checking header files" >&5 +echo "$as_me: checking header files" >&6;} +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + +for ac_header in fcntl.h getopt.h libintl.h locale.h stdlib.h sys/fsuid.h sys/ioctl.h termios.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to harry_b@mm.st ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Checks for typedefs, structures, and compiler characteristics. +{ echo "$as_me:$LINENO: checking typedefs, structures, and compiler characteristics" >&5 +echo "$as_me: checking typedefs, structures, and compiler characteristics" >&6;} + + + + + + + + + + + +for ac_func in clearenv memset mlockall putenv regcomp setlocale strcasecmp strchr strerror tcgetattr unsetenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test -z "$ac_cv_path_GPGME_CONFIG"; then - { { echo "$as_me:$LINENO: error: Could not find gpgme anywhere." >&5 -echo "$as_me: error: Could not find gpgme anywhere." >&2;} - { (exit 1); exit 1; }; } + ac_cv_c_const=no fi -LIBGPGME_VERSION="`$GPGME_CONFIG --version | cut --delimiter='.' --fields 1,2 | sed -e 's/\\.//g'`" -if test $LIBGPGME_VERSION -lt 10; then - { { echo "$as_me:$LINENO: error: GPGME must be version 1.0 or higher." >&5 -echo "$as_me: error: GPGME must be version 1.0 or higher." >&2;} - { (exit 1); exit 1; }; } -fi -if test $LIBGPGME_VERSION -lt 11; then - { echo "$as_me:$LINENO: GpgME version lower than 1.1 found, recipients can't be detected automatically." >&5 -echo "$as_me: GpgME version lower than 1.1 found, recipients can't be detected automatically." >&6;} - WRAPPER_NECESSARY=1 -else - { echo "$as_me:$LINENO: GpgME version 1.1+ found. Enabling automatic recipient detection." >&5 -echo "$as_me: GpgME version 1.1+ found. Enabling automatic recipient detection." >&6;} - CFLAGS="$CFLAGS -DGPGME_HAS_RECIPIENT" - WRAPPER_NECESSARY=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF -LIBGPGME_LIBS="`$GPGME_CONFIG --libs`" -LIBGPGME_CFLAGS="-D_FILE_OFFSET_BITS=64 `$GPGME_CONFIG --cflags`" - - - -# ------------------------------------------------------------------------------ +fi -# Checks for header files. -{ echo "$as_me:$LINENO: checking header files" >&5 -echo "$as_me: checking header files" >&6;} -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for working volatile" >&5 +echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } +if test "${ac_cv_c_volatile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4413,15 +5286,14 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -#include int main () { +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; ; return 0; } @@ -4439,178 +5311,199 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no + ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 +echo "${ECHO_T}$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - +cat >>confdefs.h <<\_ACEOF +#define volatile _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_sys_largefile_source=no; break else - ac_cv_header_stdc=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_sys_largefile_source=1; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -f conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 +#define HAVE_FSEEKO 1 _ACEOF fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +fi + +{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 +echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } +if test "${ac_cv_type_getgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4618,35 +5511,41 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ $ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) -#include <$ac_header> +int +main () +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -4656,226 +5555,113 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + ac_cv_type_getgroups=gid_t else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +( exit $ac_status ) +ac_cv_type_getgroups=int fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -done - - - - - - - - - -for ac_header in fcntl.h getopt.h libintl.h locale.h stdlib.h sys/fsuid.h sys/ioctl.h termios.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF +if test $ac_cv_type_getgroups = cross; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +#include + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then + ac_cv_type_getgroups=gid_t else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_getgroups=int +fi +rm -f conftest* - ac_header_compiler=no fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 +echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to harry_b@mm.st ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Checks for typedefs, structures, and compiler characteristics. -{ echo "$as_me:$LINENO: checking typedefs, structures, and compiler characteristics" >&5 -echo "$as_me: checking typedefs, structures, and compiler characteristics" >&6;} - - - - - - + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_size_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF +fi -for ac_func in clearenv environ memset mlockall putenv regcomp setlocale strcasecmp strchr strerror tcgetattr -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +{ echo "$as_me:$LINENO: checking for getgroups" >&5 +echo $ECHO_N "checking for getgroups... $ECHO_C" >&6; } +if test "${ac_cv_func_getgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4884,12 +5670,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. +/* Define getgroups to an innocuous variant, in case declares getgroups. For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func +#define getgroups innocuous_getgroups /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. + which can conflict with char getgroups (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -4899,7 +5685,7 @@ cat >>conftest.$ac_ext <<_ACEOF # include #endif -#undef $ac_func +#undef getgroups /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -4907,18 +5693,18 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char $ac_func (); +char getgroups (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func +#if defined __stub_getgroups || defined __stub___getgroups choke me #endif int main () { -return $ac_func (); +return getgroups (); ; return 0; } @@ -4936,296 +5722,135 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getgroups=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + ac_cv_func_getgroups=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgroups" >&5 +echo "${ECHO_T}$ac_cv_func_getgroups" >&6; } -fi -done -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then +# If we don't yet have getgroups, see if it's in -lbsd. +# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. +ac_save_LIBS=$LIBS +if test $ac_cv_func_getgroups = no; then + { echo "$as_me:$LINENO: checking for getgroups in -lbsd" >&5 +echo $ECHO_N "checking for getgroups in -lbsd... $ECHO_C" >&6; } +if test "${ac_cv_lib_bsd_getgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !x[0] && !zero.x; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF - -fi - -{ echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } -if test "${ac_cv_c_volatile+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - +char getgroups (); int main () { - -volatile int x; -int * volatile y = (int *) 0; -return !x && !y; +return getgroups (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_volatile=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_bsd_getgroups=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_volatile=no + ac_cv_lib_bsd_getgroups=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_getgroups" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_getgroups" >&6; } +if test $ac_cv_lib_bsd_getgroups = yes; then + GETGROUPS_LIB=-lbsd fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5 -echo "${ECHO_T}$ac_cv_c_volatile" >&6; } -if test $ac_cv_c_volatile = no; then - -cat >>confdefs.h <<\_ACEOF -#define volatile -_ACEOF fi -{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then +# Run the program to test the functionality of the system-supplied +# getgroups function only if there is such a function. +if test $ac_cv_func_getgroups = yes; then + { echo "$as_me:$LINENO: checking for working getgroups" >&5 +echo $ECHO_N "checking for working getgroups... $ECHO_C" >&6; } +if test "${ac_cv_func_getgroups_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - while :; do - ac_cv_sys_largefile_source=no + if test "$cross_compiling" = yes; then + ac_cv_func_getgroups_works=no +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -return !fseeko; +/* On Ultrix 4.3, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -5235,56 +5860,91 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - break + ac_cv_func_getgroups_works=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_func_getgroups_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getgroups_works" >&5 +echo "${ECHO_T}$ac_cv_func_getgroups_works" >&6; } + if test $ac_cv_func_getgroups_works = yes; then -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETGROUPS 1 +_ACEOF + + fi +fi +LIBS=$ac_save_LIBS + +{ echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_working=no +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include +$ac_includes_default int main () { -return !fseeko; + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 0) + return 1; + } + return 0; + } + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -5294,36 +5954,39 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sys_largefile_source=1; break + ac_cv_func_memcmp_working=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - +( exit $ac_status ) +ac_cv_func_memcmp_working=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - break -done +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; } -if test "$ac_cv_sys_largefile_source" != no; then -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF fi -rm -f conftest* +{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in + *" memcmp.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" + ;; +esac -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -{ echo "$as_me:$LINENO: checking for fseeko" >&5 -echo $ECHO_N "checking for fseeko... $ECHO_C" >&6; } -if test "${ac_cv_func_fseeko+set}" = set; then + +{ echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 +echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; } +if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f conftest.sym conftest.file +echo >conftest.file +if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then + if test "$cross_compiling" = yes; then + ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5331,40 +5994,30 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +$ac_includes_default int main () { -return fseeko && fseeko (stdin, 0, 0); +struct stat sbuf; + /* Linux will dereference the symlink and fail. + That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -5374,101 +6027,68 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_fseeko=yes + ac_cv_func_lstat_dereferences_slashed_symlink=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_fseeko=no -fi - -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +( exit $ac_status ) +ac_cv_func_lstat_dereferences_slashed_symlink=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5 -echo "${ECHO_T}$ac_cv_func_fseeko" >&6; } -if test $ac_cv_func_fseeko = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FSEEKO 1 -_ACEOF - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes else - ac_cv_type_uid_t=no + # If the `ln -s' command failed, then we probably don't even + # have an lstat function. + ac_cv_func_lstat_dereferences_slashed_symlink=no fi -rm -f conftest* +rm -f conftest.sym conftest.file fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then +{ echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } -cat >>confdefs.h <<\_ACEOF -#define uid_t int +test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && + +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF -cat >>confdefs.h <<\_ACEOF -#define gid_t int -_ACEOF +if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then + case " $LIBOBJS " in + *" lstat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS lstat.$ac_objext" + ;; +esac fi -{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } -if test "${ac_cv_type_getgroups+set}" = set; then +{ echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 +echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6; } +if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross + ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Thanks to Mike Rendell for this test. */ -$ac_includes_default -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) - -int -main () -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long int lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short int but getgroups modifies an array - of ints. */ - return n > 0 && gidset[n] != val.gval; +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +struct stat sbuf; + return stat ("", &sbuf) == 0; + ; + return 0; } _ACEOF rm -f conftest$ac_exeext @@ -5491,50 +6111,43 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_getgroups=gid_t + ac_cv_func_stat_empty_string_bug=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -ac_cv_type_getgroups=int +ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -if test $ac_cv_type_getgroups = cross; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then - ac_cv_type_getgroups=gid_t -else - ac_cv_type_getgroups=int fi -rm -f conftest* +{ echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 +echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6; } +if test $ac_cv_func_stat_empty_string_bug = yes; then + case " $LIBOBJS " in + *" stat.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS stat.$ac_objext" + ;; +esac -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } cat >>confdefs.h <<_ACEOF -#define GETGROUPS_T $ac_cv_type_getgroups +#define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF +fi + -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then +for ac_func in vprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5543,78 +6156,85 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +return $ac_func (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_size_t=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no + eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -fi - -{ echo "$as_me:$LINENO: checking for getgroups" >&5 -echo $ECHO_N "checking for getgroups... $ECHO_C" >&6; } -if test "${ac_cv_func_getgroups+set}" = set; then +{ echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } +if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5623,12 +6243,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define getgroups to an innocuous variant, in case declares getgroups. +/* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ -#define getgroups innocuous_getgroups +#define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getgroups (); below. + which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -5638,7 +6258,7 @@ cat >>conftest.$ac_ext <<_ACEOF # include #endif -#undef getgroups +#undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -5646,18 +6266,18 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char getgroups (); +char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined __stub_getgroups || defined __stub___getgroups +#if defined __stub__doprnt || defined __stub____doprnt choke me #endif int main () { -return getgroups (); +return _doprnt (); ; return 0; } @@ -5675,460 +6295,450 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__doprnt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } +if test $ac_cv_func__doprnt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF + +fi + +fi +done + + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_getgroups=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_getgroups=no + ac_cv_struct_tm=sys/time.h fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgroups" >&5 -echo "${ECHO_T}$ac_cv_func_getgroups" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF -# If we don't yet have getgroups, see if it's in -lbsd. -# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. -ac_save_LIBS=$LIBS -if test $ac_cv_func_getgroups = no; then - { echo "$as_me:$LINENO: checking for getgroups in -lbsd" >&5 -echo $ECHO_N "checking for getgroups in -lbsd... $ECHO_C" >&6; } -if test "${ac_cv_lib_bsd_getgroups+set}" = set; then +fi + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getgroups (); +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { -return getgroups (); + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_bsd_getgroups=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_bsd_getgroups=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_getgroups" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_getgroups" >&6; } -if test $ac_cv_lib_bsd_getgroups = yes; then - GETGROUPS_LIB=-lbsd fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi -# Run the program to test the functionality of the system-supplied -# getgroups function only if there is such a function. -if test $ac_cv_func_getgroups = yes; then - { echo "$as_me:$LINENO: checking for working getgroups" >&5 -echo $ECHO_N "checking for working getgroups... $ECHO_C" >&6; } -if test "${ac_cv_func_getgroups_works+set}" = set; then + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_getgroups_works=no -else + while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { -/* On Ultrix 4.3, getgroups (0, 0) always fails. */ - return getgroups (0, 0) == -1; + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_getgroups_works=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_getgroups_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_getgroups_works" >&5 -echo "${ECHO_T}$ac_cv_func_getgroups_works" >&6; } - if test $ac_cv_func_getgroups_works = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETGROUPS 1 -_ACEOF - fi fi -LIBS=$ac_save_LIBS -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_working=no -else +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; - - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } - ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_memcmp_working=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_memcmp_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; esac - - -{ echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 -echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then +rm -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - rm -f conftest.sym conftest.file -echo >conftest.file -if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then - ac_cv_func_lstat_dereferences_slashed_symlink=no -else + while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail. - That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; +{ + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_lstat_dereferences_slashed_symlink=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -else - # If the `ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f conftest.sym conftest.file - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - -test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - - -if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - case " $LIBOBJS " in - *" lstat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lstat.$ac_objext" - ;; -esac fi -{ echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 -echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6; } -if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_stat_empty_string_bug=yes -else +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { -struct stat sbuf; - return stat ("", &sbuf) == 0; + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_stat_empty_string_bug=no + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_func_stat_empty_string_bug=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 -echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6; } -if test $ac_cv_func_stat_empty_string_bug = yes; then - case " $LIBOBJS " in - *" stat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS stat.$ac_objext" - ;; -esac - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 +#define _LARGE_FILES $ac_cv_sys_large_files _ACEOF - +;; +esac +rm -f conftest* + fi fi -{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } -if test "${ac_cv_struct_tm+set}" = set; then +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } +if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -6137,13 +6747,15 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include - +$ac_includes_default +typedef mode_t ac__type_new_; int main () { -struct tm *tp; tp->tm_sec; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -6161,89 +6773,57 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_struct_tm=time.h + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h + ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } +if test $ac_cv_type_mode_t = yes; then + : +else -cat >>confdefs.h <<\_ACEOF -#define TM_IN_SYS_TIME 1 +cat >>confdefs.h <<_ACEOF +#define mode_t int _ACEOF fi -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then +{ echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } +if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; +$ac_includes_default +typedef off_t ac__type_new_; int main () { - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF - rm -f conftest.$ac_objext +rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -6256,38 +6836,57 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_off_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6; } +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef pid_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -6300,55 +6899,37 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_largefile_CC=' -n32'; break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_pid_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - while :; do - ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6356,18 +6937,12 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; +#include + int main () { - +return *(signal (0, 0)) (0) == 1; ; return 0; } @@ -6385,56 +6960,48 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; +$ac_includes_default +typedef size_t ac__type_new_; int main () { - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -6452,75 +7019,52 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_file_offset_bits=64; break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - break -done fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } -if test "$ac_cv_sys_file_offset_bits" != no; then +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +#define size_t unsigned int _ACEOF fi -rm -f conftest* - { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then + +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } +if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - while :; do - ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; +$ac_includes_default +typedef ssize_t ac__type_new_; int main () { - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -6538,56 +7082,88 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _LARGE_FILES 1 #include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi + + +# Check what we need to do about the environ extern +{ echo "$as_me:$LINENO: checking for environ in unistd.h" >&5 +echo $ECHO_N "checking for environ in unistd.h... $ECHO_C" >&6; } +if test "${pac_cv_environ_in_unistd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include int main () { - +#define __USE_GNU=1; char **x = environ; ; return 0; } @@ -6605,54 +7181,34 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_large_files=1; break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + pac_cv_environ_in_unistd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + pac_cv_environ_in_unistd=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - break -done fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } -if test "$ac_cv_sys_large_files" != no; then +{ echo "$as_me:$LINENO: result: $pac_cv_environ_in_unistd" >&5 +echo "${ECHO_T}$pac_cv_environ_in_unistd" >&6; } +if test "$pac_cv_environ_in_unistd" = "yes" ; then + # We have environ defined in unistd.h; we are done -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXTERN_ENVIRON 1 _ACEOF -fi -rm -f conftest* -fi - -{ echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then +else + # See if we can declare it + { echo "$as_me:$LINENO: checking for manually declared extern environ" >&5 +echo $ECHO_N "checking for manually declared extern environ... $ECHO_C" >&6; } +if test "${pac_cv_manual_extern_environ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -6661,98 +7217,88 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef mode_t ac__type_new_; +#include int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +extern char ** environ; char **x = environ; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_mode_t=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + pac_cv_manual_extern_environ=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mode_t=no + pac_cv_manual_extern_environ=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = yes; then - : -else +{ echo "$as_me:$LINENO: result: $pac_cv_manual_extern_environ" >&5 +echo "${ECHO_T}$pac_cv_manual_extern_environ" >&6; } + if test "$pac_cv_manual_extern_environ" = "yes" ; then + # We can manually declare the extern -cat >>confdefs.h <<_ACEOF -#define mode_t int +cat >>confdefs.h <<\_ACEOF +#define MANUAL_EXTERN_ENVIRON 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXTERN_ENVIRON 1 _ACEOF + fi fi -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } -if test "${ac_cv_type_off_t+set}" = set; then +# to compile on AMD64 systems we can't use these checks +# I reenable these until I can find out why exactly it fails on AMD64 systems + +for ac_header in stdlib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -typedef off_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6767,53 +7313,119 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_off_t=no + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -if test $ac_cv_type_off_t = yes; then - : +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to harry_b@mm.st ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -cat >>confdefs.h <<_ACEOF -#define off_t long int +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then +done + +{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6821,44 +7433,31 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef pid_t ac__type_new_; +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +return ! malloc (0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -6868,49 +7467,73 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_pid_t=yes + ac_cv_func_malloc_0_nonnull=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_pid_t=no +( exit $ac_status ) +ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then - : +{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 1 +_ACEOF + else + cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 0 +_ACEOF -cat >>confdefs.h <<_ACEOF -#define pid_t int + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + + +cat >>confdefs.h <<\_ACEOF +#define malloc rpl_malloc _ACEOF fi -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } -if test "${ac_cv_type_signal+set}" = set; then + + + +for ac_header in stdlib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6925,49 +7548,119 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=int + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signal=void + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------- ## +## Report this to harry_b@mm.st ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +fi + +done -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then +{ echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 +echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6; } +if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6975,44 +7668,31 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif + int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +return ! realloc (0, 0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -7022,70 +7702,48 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_size_t=yes + ac_cv_func_realloc_0_nonnull=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no +( exit $ac_status ) +ac_cv_func_realloc_0_nonnull=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : -else -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 +echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then -{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define HAVE_REALLOC 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then - ac_cv_type_uid_t=yes else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -cat >>confdefs.h <<\_ACEOF -#define uid_t int + cat >>confdefs.h <<\_ACEOF +#define HAVE_REALLOC 0 _ACEOF + case " $LIBOBJS " in + *" realloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS realloc.$ac_objext" + ;; +esac + cat >>confdefs.h <<\_ACEOF -#define gid_t int +#define realloc rpl_realloc _ACEOF fi -# to compile on AMD64 systems we can't use these checks -# AC_FUNC_MALLOC -# AC_FUNC_REALLOC + { echo "$as_me:$LINENO: generating files" >&5 echo "$as_me: generating files" >&6;} @@ -7213,7 +7871,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -7222,10 +7881,13 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -7449,19 +8111,28 @@ else as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -7476,8 +8147,8 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cpm $as_me 0.23beta, which was -generated by GNU Autoconf 2.60. Invocation command line was +This file was extended by cpm $as_me 0.25beta, which was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7505,7 +8176,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -7525,8 +8196,8 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -cpm config.status 0.23beta -configured by $0, generated by GNU Autoconf 2.60, +cpm config.status 0.25beta +configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -7751,6 +8422,9 @@ INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim LN_S!$LN_S$ac_delim SET_MAKE!$SET_MAKE$ac_delim +NCURSES_CONFIG!$NCURSES_CONFIG$ac_delim +LIBNCURSES_LIBS!$LIBNCURSES_LIBS$ac_delim +LIBNCURSES_CFLAGS!$LIBNCURSES_CFLAGS$ac_delim CDK_VERSION_DEF!$CDK_VERSION_DEF$ac_delim CDK_DEBIAN_DEP!$CDK_DEBIAN_DEP$ac_delim XML_CONFIG!$XML_CONFIG$ac_delim @@ -7765,7 +8439,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.in b/configure.in index 3840ff2..4f1507f 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ AC_MSG_NOTICE([general setup]) AC_PREREQ(2.59) -AC_INIT(cpm, 0.23beta, harry_b@mm.st) +AC_INIT(cpm, 0.25beta, harry_b@mm.st) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADER([config.h]) @@ -15,10 +15,10 @@ AC_PROG_LN_S AC_PROG_MAKE_SET # Check --with-XXX configuration -AC_ARG_WITH(ncurses, - [ --with-ncurses=PATH path to the ncurses installation], +AC_ARG_WITH(curses-dir, + [ --with-curses-dir=PATH path to the curses installation], [ - CFLAGS="$CFLAGS -I${withval}/include" + CFLAGS="${CFLAGS} -I${withval}/include" CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -26,10 +26,74 @@ AC_ARG_WITH(ncurses, fi ] ) -AC_ARG_WITH(cdk, - [ --with-cdk=PATH path to the cdk installation], + +# this part was originally in the CDKs configure.in +use_curses_lib=ncursesw +AC_ARG_WITH(curses, + [ --with-curses use the curses library], + [ use_curses_lib=curses ], [ +AC_ARG_WITH(ncurses, + [ --with-ncurses use the ncurses library], + [ use_curses_lib=ncurses ], [ +AC_ARG_WITH(ncursesw, + [ --with-ncursesw use the wide-character ncurses library ], + [ use_curses_lib=ncursesw ], [ +AC_ARG_WITH(pdcurses, + [ --with-pdcurses use the pdcurses X11 library], + [ use_curses_lib=pdcurses ])])])]) +curses_found=0 +curses_config="" +case ${use_curses_lib} in + ncurses) + AC_CHECK_LIB(ncurses, initscr) + if test "${ac_cv_lib_ncurses_initscr}" == "yes"; then + curses_found=1 + curses_config=ncurses5-config + fi + ;; + ncursesw) + AC_CHECK_LIB(ncursesw, wget_wch) + if test "${ac_cv_lib_ncursesw_wget_wch}" == "yes"; then + curses_found=1 + curses_config=ncursesw5-config + fi + ;; + pdcurses) + AC_CHECK_LIB(pdcurses, initscr) + if test "${ac_cv_lib_pdcurses_initscr}" == "yes"; then + curses_found=1 + fi + ;; + curses) + AC_CHECK_LIB(curses, initscr) + if test "${ac_cv_lib_curses_initscr}" == "yes"; then + curses_found=1 + fi + ;; + *) + AC_MSG_ERROR([no curses library select.]) + ;; +esac +if test ${curses_found} -ne 1; then + AC_MSG_ERROR([can not find the selected ncursesw/ncurses library.]) +fi +# check if we can call ncurses5-config or ncursesw5-config +if test -n ${curses_config}; then + AC_PATH_PROG([NCURSES_CONFIG], [${curses_config}]) + if test -z "$ac_cv_path_NCURSES_CONFIG"; then + AC_MSG_ERROR([Could not find ${curses_config} anywhere.]) + fi + + LIBNCURSES_LIBS="`$NCURSES_CONFIG --libs`" + LIBNCURSES_CFLAGS="`$NCURSES_CONFIG --cflags`" + AC_SUBST(LIBNCURSES_LIBS) + AC_SUBST(LIBNCURSES_CFLAGS) +fi + +AC_ARG_WITH(cdk-dir, + [ --with-cdk-dir=PATH path to the cdk installation], [ - CFLAGS="$CFLAGS -I${withval}/include -I${withval}/include/cdk" + CFLAGS="${CFLAGS} -I${withval}/include -I${withval}/include/cdk" CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/cdk" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -38,22 +102,22 @@ AC_ARG_WITH(cdk, ] ) AC_ARG_WITH(cdk-v4, - [ --with-cdk-v4 Force the usage of CDK version 4 ], + [ --with-cdk-v4 force the usage of CDK version 4 ], [ if test "${withval}" != "no"; then - CFLAGS="$CFLAGS -DFORCE_CDK_V4" + CFLAGS="${CFLAGS} -DFORCE_CDK_V4" fi ] ) USE_CRACKLIB=1 -AC_ARG_WITH(crack-lib, - [ --with-crack-lib=PATH path to the libcrack installation], +AC_ARG_WITH(cracklib-dir, + [ --with-cracklib-dir=PATH path to the libcrack installation], [ if test "${withval}" == "no"; then - CFLAGS="$CFLAGS -DNO_CRACKLIB" + CFLAGS="${CFLAGS} -DNO_CRACKLIB" USE_CRACKLIB=0 else - CFLAGS="$CFLAGS -I${withval}/include" + CFLAGS="${CFLAGS} -I${withval}/include" CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -62,8 +126,9 @@ AC_ARG_WITH(crack-lib, fi ] ) -AC_ARG_WITH(crack-dict, - [ --with-crack-dict=FILE filename of the dictionaries (without extension)], +CRACKLIB_DICTPATH="" +AC_ARG_WITH(cracklib-dict, + [ --with-cracklib-dict=FILE filename of the dictionaries (without extension)], [ if test ! -f "${withval}.hwm"; then AC_MSG_ERROR([cracklib dictionary ${withval}.hwm does not exist]) @@ -74,13 +139,14 @@ AC_ARG_WITH(crack-dict, if test ! -f "${withval}.pwi"; then AC_MSG_ERROR([cracklib dictionary ${withval}.pwi does not exist]) fi - CFLAGS="$CFLAGS -DCRACKLIB_DICTPATH='\"${withval}\"'" + CFLAGS="${CFLAGS} -DCRACKLIB_DICTPATH='\"${withval}\"'" + CRACKLIB_DICTPATH="${withval}" ] ) -AC_ARG_WITH(dotconf, - [ --with-dotconf=PATH path to the dotconf installation], +AC_ARG_WITH(dotconf-dir, + [ --with-dotconf-dir=PATH path to the dotconf installation], [ - CFLAGS="$CFLAGS -I${withval}/include" + CFLAGS="${CFLAGS} -I${withval}/include" CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -88,10 +154,10 @@ AC_ARG_WITH(dotconf, fi ] ) -AC_ARG_WITH(gpgme, - [ --with-gpgme=PATH path to the gpgme installation], +AC_ARG_WITH(gpgme-dir, + [ --with-gpgme-dir=PATH path to the gpgme installation], [ - CFLAGS="$CFLAGS -I${withval}/include" + CFLAGS="${CFLAGS} -I${withval}/include" CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -104,22 +170,22 @@ AC_ARG_WITH(memlock, WARNING: It is NOT recommended to turn this off! ], [ if test "${withval}" == "no"; then - CFLAGS="$CFLAGS -DNO_MEMLOCK" + CFLAGS="${CFLAGS} -DNO_MEMLOCK" else - CFLAGS="$CFLAGS -DMEMLOCK_LIMIT=${withval}" + CFLAGS="${CFLAGS} -DMEMLOCK_LIMIT=${withval}" fi ] ) -AC_ARG_WITH(xml2, - [ --with-xml2=PATH path to the xml2 installation], +AC_ARG_WITH(xml2-dir, + [ --with-xml2-dir=PATH path to the xml2 installation], [ PATH="${withval}/bin:${withval}:${PATH}" ] ) -AC_ARG_WITH(zlib, - [ --with-zlib=PATH path to the zlib installation], +AC_ARG_WITH(zlib-dir, + [ --with-zlib-dir=PATH path to the zlib installation], [ - CFLAGS="$CFLAGS -I${withval}/include" + CFLAGS="${CFLAGS} -I${withval}/include" CPPFLAGS="$CPPFLAGS -I${withval}/include" LDFLAGS="$LDFLAGS -L${withval}/lib" if test -n "${need_dash_r}"; then @@ -128,9 +194,9 @@ AC_ARG_WITH(zlib, ] ) -# echo "CFLAGS: $CFLAGS" -# echo "CPPFLAGS: $CPPFLAGS" -# echo "LDFLAGS: $LDFLAGS" +# echo "CFLAGS: ${CFLAGS}" +# echo "CPPFLAGS: ${CPPFLAGS}" +# echo "LDFLAGS: ${LDFLAGS}" # Checks for libraries. AC_MSG_NOTICE([checking libraries]) @@ -138,10 +204,6 @@ AC_CHECK_LIB(m, main) if test "${ac_cv_lib_m_main}" != "yes"; then AC_MSG_ERROR([can not find the m library.]) fi -AC_CHECK_LIB(ncurses, initscr) -if test "${ac_cv_lib_ncurses_initscr}" != "yes"; then - AC_MSG_ERROR([can not find the ncurses library.]) -fi AC_CHECK_LIB(cdk, initCDKScreen) if test "${ac_cv_lib_cdk_initCDKScreen}" != "yes"; then AC_MSG_ERROR([can not find the cdk library.]) @@ -170,12 +232,73 @@ AC_CHECK_LIB(z, compress) if test "${ac_cv_lib_z_compress}" != "yes"; then AC_MSG_ERROR([can not find the zlib library.]) fi +# Check if we find a separate libintl library +AC_CHECK_LIB(intl, gettext) + + +# ------------------------------------------------------------------------------ +# try to find the cracklib dictionary +if test ${USE_CRACKLIB} == 1; then + if test -z ${CRACKLIB_DICTPATH}; then + # the -D setting here is necessary, because general.c would not compile + # without this definition + CRACK_H=`${CC} -DCRACKLIB_DICTPATH='\"/\"' ${CFLAGS} ${CPPFLAGS} -M -MG general.c | perl -e 'while (<>) { $_ =~ s/^.*://; $_ =~ s/^\\s+//; $_ =~ s/\\\\//; $_ =~ s/\\s+$//; @tmp = split(/ /, $_); while (@tmp) { $file = shift(@tmp); if ($file =~ m:/crack\\.h$:) { print "$file\\n"; } } }' | sort | uniq` + if test "${CRACK_H}" == ""; then + AC_MSG_ERROR([could not locate the cracklib header file.]) + else + AC_MSG_NOTICE([cracklib header found at ${CRACK_H}.]) + fi + + grep CRACKLIB_DICTPATH ${CRACK_H} > /dev/null 2>&1 + if test ${?} -eq 0; then + AC_MSG_NOTICE([CRACKLIB_DICTPATH probably defined in ${CRACK_H}.]) + elif test ${?} -eq 1; then + AC_MSG_NOTICE([CRACKLIB_DICTPATH not defined in ${CRACK_H}.]) + if test -z "${CRACKLIB_DICTPATH}"; then + for withval in /var/cache/cracklib/cracklib_dict + do + COUNT=0 + if test -f "${withval}.hwm"; then + COUNT=$((${COUNT}+1)) + fi + if test -f "${withval}.pwd"; then + COUNT=$((${COUNT}+1)) + fi + if test -f "${withval}.pwi"; then + COUNT=$((${COUNT}+1)) + fi + + if test ${COUNT} -eq 3; then + # all three files exist, this is a correct version + CFLAGS="${CFLAGS} -DCRACKLIB_DICTPATH='\"${withval}\"'" + CRACKLIB_DICTPATH="${withval}" + break + fi + done + + if test ${COUNT} -eq 3; then + AC_MSG_NOTICE([CRACKLIB_DICTPATH detected as ${CRACKLIB_DICTPATH}.]) + else + AC_MSG_ERROR([CRACKLIB_DICTPATH could not be auto-detected. Please use --with-cracklib-dict to specify.]) + fi + else + AC_MSG_NOTICE([using CRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}.]) + fi + else + AC_MSG_ERROR([grep failed for file ${CRACK_H}.]) + fi + else + AC_MSG_NOTICE([using CRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}.]) + fi +fi # ------------------------------------------------------------------------------ # we check if we can use this CDK version -CDK_H=`gcc ${CFLAGS} -M -MG interface_gui.c | perl -e 'while (<>) { $_ =~ s/^.*://; $_ =~ s/^\\s+//; $_ =~ s/\\\\//; $_ =~ s/\\s+$//; @tmp = split(/ /, $_); while (@tmp) { $file = shift(@tmp); if ($file =~ m:/cdk\\.h$:) { print "$file\\n"; } } }' | sort | uniq` +CDK_H=`${CC} ${CFLAGS} ${CPPFLAGS} -M -MG interface_gui.c | perl -e 'while (<>) { $_ =~ s/^.*://; $_ =~ s/^\\s+//; $_ =~ s/\\\\//; $_ =~ s/\\s+$//; @tmp = split(/ /, $_); while (@tmp) { $file = shift(@tmp); if ($file =~ m:/cdk\\.h$:) { print "$file\\n"; } } }' | sort | uniq` if test "${CDK_H}" == ""; then AC_MSG_ERROR([could not locate CDK header file.]) +else + AC_MSG_NOTICE([CDK header found at ${CDK_H}.]) fi INCOMPATIBLE=`grep "^#define MAX_ITEMS" "${CDK_H}" | grep -c "unused by widgets"` CDK_UNUSABLE=0 @@ -192,20 +315,20 @@ if test ${INCOMPATIBLE} -gt 0; then CDK_VERSION=`grep "CDK_VERSION_PATCH" ${CDK_VERSION_H} | cut -d " " -f 3 | sed -e 's/"//g'` AC_MSG_NOTICE([CDK version patch: ${CDK_VERSION}]) - # only versions newer than 20060220 can be used since Thomas E. Dickey + # only versions newer than 20090215 can be used since Thomas E. Dickey # fixed some bugs I found with the alphalist. - if test ${CDK_VERSION} -ge 20060220; then + if test ${CDK_VERSION} -ge 20090215; then CDK_UNUSABLE=0 CDK_VERSION_DEF="-DCDK_VERSION_5" - CDK_DEBIAN_DEP="libcdk5 (> 5.0.20050424-2)" + CDK_DEBIAN_DEP="libcdk5 (> 5.0.20090215-1)" fi fi fi if test ${CDK_UNUSABLE} -gt 0; then - AC_MSG_NOTICE([Sorry, this version of CDK can not handle empty lists.]) + AC_MSG_NOTICE([Sorry, CPM is not compatible with the current verion of CDK.]) AC_MSG_NOTICE([You must downgrade to a version older than cdk-4.9.11-20031210]) - AC_MSG_NOTICE([or newer than cdk-5.0.20060220.]) + AC_MSG_NOTICE([or newer than cdk-5.0.20090215.]) AC_MSG_ERROR([Incompatible libcdk version found.]) fi AC_SUBST(CDK_VERSION_DEF) @@ -233,7 +356,7 @@ if test -z "$ac_cv_path_GPGME_CONFIG"; then AC_MSG_ERROR([Could not find gpgme anywhere.]) fi -LIBGPGME_VERSION="`$GPGME_CONFIG --version | cut --delimiter='.' --fields 1,2 | sed -e 's/\\.//g'`" +LIBGPGME_VERSION="`$GPGME_CONFIG --version | cut -d '.' -f 1,2 | sed -e 's/\\.//g'`" if test $LIBGPGME_VERSION -lt 10; then AC_MSG_ERROR([GPGME must be version 1.0 or higher.]) fi @@ -242,7 +365,7 @@ if test $LIBGPGME_VERSION -lt 11; then WRAPPER_NECESSARY=1 else AC_MSG_NOTICE([GpgME version 1.1+ found. Enabling automatic recipient detection.]) - CFLAGS="$CFLAGS -DGPGME_HAS_RECIPIENT" + CFLAGS="${CFLAGS} -DGPGME_HAS_RECIPIENT" WRAPPER_NECESSARY=0 fi AC_SUBST(WRAPPER_NECESSARY) @@ -261,13 +384,14 @@ AC_CHECK_HEADERS([fcntl.h getopt.h libintl.h locale.h stdlib.h sys/fsuid.h sys/i # Checks for typedefs, structures, and compiler characteristics. AC_MSG_NOTICE([checking typedefs, structures, and compiler characteristics]) -AC_CHECK_FUNCS([clearenv environ memset mlockall putenv regcomp setlocale strcasecmp strchr strerror tcgetattr]) +AC_CHECK_FUNCS([clearenv memset mlockall putenv regcomp setlocale strcasecmp strchr strerror tcgetattr unsetenv]) AC_C_CONST AC_C_VOLATILE AC_FUNC_FSEEKO AC_FUNC_GETGROUPS AC_FUNC_MEMCMP AC_FUNC_STAT +AC_FUNC_VPRINTF AC_STRUCT_TM AC_SYS_LARGEFILE AC_TYPE_MODE_T @@ -275,11 +399,32 @@ AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIGNAL AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T AC_TYPE_UID_T +# Check what we need to do about the environ extern +AC_CACHE_CHECK([for environ in unistd.h],pac_cv_environ_in_unistd, + [AC_TRY_COMPILE([#include ],[#define __USE_GNU=1; char **x = environ;], + pac_cv_environ_in_unistd=yes,pac_cv_environ_in_unistd=no)]) +if test "$pac_cv_environ_in_unistd" = "yes" ; then + # We have environ defined in unistd.h; we are done + AC_DEFINE(HAVE_EXTERN_ENVIRON,1,[Define if environ extern is available]) +else + # See if we can declare it + AC_CACHE_CHECK([for manually declared extern environ], pac_cv_manual_extern_environ, + [AC_TRY_LINK([#include ],[extern char ** environ; char **x = environ;], + pac_cv_manual_extern_environ=yes,pac_cv_manual_extern_environ=no)]) + if test "$pac_cv_manual_extern_environ" = "yes" ; then + # We can manually declare the extern + AC_DEFINE(MANUAL_EXTERN_ENVIRON,1,[Define if environ decl needed]) + AC_DEFINE(HAVE_EXTERN_ENVIRON,1,[Define if environ extern is available]) + fi +fi + # to compile on AMD64 systems we can't use these checks -# AC_FUNC_MALLOC -# AC_FUNC_REALLOC +# I reenable these until I can find out why exactly it fails on AMD64 systems +AC_FUNC_MALLOC +AC_FUNC_REALLOC AC_MSG_NOTICE([generating files]) AC_CONFIG_FILES([control Makefile tests/decrypt-result.txt tests/encrypt-result.txt]) diff --git a/control.in b/control.in index 25f1b26..fb280ec 100644 --- a/control.in +++ b/control.in @@ -13,3 +13,5 @@ Description: This program is a ncurses based console tool to manage passwords the data for some other purpose. This package is currently in beta stage. You can find more information about cpm at http://www.harry-b.de/ +Homepage: http://www.harry-b.de/dokuwiki/doku.php?id=harry:cpm +Bugs: https://sourceforge.net/tracker2/?group_id=62803&atid=501859 diff --git a/cpm.c b/cpm.c index 5553de6..d9e61ce 100644 --- a/cpm.c +++ b/cpm.c @@ -1,7 +1,7 @@ /* ############################################################################# * program to manage passwords from the commandline * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -51,6 +51,14 @@ RETSIGTYPE sighandler(int signum); void testMemset(void); #endif + +/* ############################################################################# + * global variables + */ +#ifdef MANUAL_EXTERN_ENVIRON +char** environ; +#endif + static struct termios tcsaved; void savetermios(void) { @@ -68,9 +76,21 @@ void restoretermios(void) * Date 2005-03-16 * Arguments int argc - argument counter * char** argv - commandline arguments + * char** envp - process environment (only on Solaris) * Return return code of the program */ +#ifdef HAVE_EXTERN_ENVIRON +/* everything is in place, we have the environ variable */ int main(int argc, char **argv) +#else +#ifdef MANUAL_EXTERN_ENVIRON +/* we can manually declare the variable */ +int main(int argc, char **argv) +#else +/* if don't have any envorin variable at all */ +int main(int argc, char **argv, char **envp) +#endif +#endif { rlim_t memlock_limit = -2; int error = 0, @@ -80,8 +100,17 @@ int main(int argc, char **argv) #ifdef TEST_OPTION int testrun = 0; #endif + char* binaryname; savetermios(); + TRACE(99, "main()", NULL); + +#ifndef HAVE_EXTERN_ENVIRON +#ifndef MANUAL_EXTERN_ENVIRON + /* since in solaris environ does not exist, we manually pass it along */ + environ = envp; +#endif +#endif if (initSecurity(&max_mem_lock, &memory_safe, &ptrace_safe, &memlock_limit)) { exit(1); } @@ -110,7 +139,7 @@ int main(int argc, char **argv) */ signal(SIGINT, sighandler); signal(SIGTERM, sighandler); - /* the SIGWINCH handler is used in set in userInterface() */ + /* the SIGWINCH handler is set in userInterface() */ initConfiguration(); @@ -155,6 +184,11 @@ int main(int argc, char **argv) if (config -> readonly) { runtime -> readonly = 1; } + /* in case our basename is cpmv, we switch to read-only mode */ + binaryname = basename(argv[0]); + if (!strcmp(binaryname, "cpmv")) + { runtime -> readonly = 1; } + initGPG(); if (!error && config -> security) @@ -187,8 +221,13 @@ int main(int argc, char **argv) !error) { fprintf(stderr, _("configuration ok.\n")); } + if (config -> environtmentlist && + !error) + { listEnvironment(); } + if (!error && !config -> configtest && + !config -> environtmentlist && !config -> help && !config -> security && !config -> version) @@ -204,7 +243,7 @@ int main(int argc, char **argv) printf("\n%s %s\n%s\n", _("Maximum security level not reached."), _("Are you sure you want to continue?"), - _("Press CTRL+C to stop now or any other key to continue.")); + _("Press CTRL+C to stop now or ENTER to continue.")); fgetc(stdin); } diff --git a/cpm.h b/cpm.h index 02631fc..a946d0b 100644 --- a/cpm.h +++ b/cpm.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for cpm.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -69,6 +69,17 @@ #endif +/* ############################################################################# + * global variables + */ +#ifndef HAVE_EXTERN_ENVIRON +#ifndef MANUAL_EXTERN_ENVIRON + /* since in solaris environ does not exist, we declare it ourselves */ +extern char** environ; +#endif +#endif + + /* ############################################################################# * default configuration of cpm */ diff --git a/docs/README b/docs/README index 5aa869f..1777b42 100644 --- a/docs/README +++ b/docs/README @@ -16,7 +16,7 @@ encrypt and decrypt the data securely. Copyright --------- -Copyright (C) 2005, 2006 Harry Brueckner +Copyright (C) 2005-2009 Harry Brueckner 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 @@ -73,6 +73,7 @@ Platforms --------- This software has been tested on the following platforms: + - Ubuntu Hardy - Debian Woody, Sid and Sarge - Gentoo Linux - SuSE Linux @@ -120,7 +121,7 @@ Installation requirements ------------------------- To install this program, the following libraries are required: - - cdk (<= 4.9.10) + - cdk (<= 4.9.10 or >= 5.0.20090215) - crack - dotconf - gpgme @@ -132,13 +133,14 @@ which can not handle empty widgets. I reported to the CDK developers on 2005-09-08 and it should be fixed in one of the upcoming version 5 releases. On Debian systems, the package names are: - - libcdk4 - - libcdk-dev - cracklib-runtime - - cracklib2 - - cracklib2-dev + - libcdk5 + - libcdk5-dev + - libcrack2 + - libcrack2-dev - libdotconf1.0 - libdotconf-dev + - libgpg-error-dev - libgpgme11 - libgpgme11-dev - libncurses5 @@ -158,10 +160,11 @@ Installation should be quite simple if all requirements are met: 3. make check (this only works if it's compiled with -DTEST_OPTION) 4. make install -In case the constant CRACKLIB_DICTPATH is not defined in your crack.h file, -you might have to tell configure where the dictionary files of libcrack are. -This can be done by passing e.g. '--with-crack-dict=/usr/lib/cracklib_dict' to -configure. Please note, that the file extension must not be specified. +In case the constant CRACKLIB_DICTPATH is not defined in your crack.h file, you +might have to tell configure where the dictionary files of libcrack are. This +can be done by passing e.g. +'--with-crack-dict=/var/cache/cracklib/cracklib_dict' to configure. +Please note, that the file extension must not be specified. If you don't have cracklib installed, you can turn off it's use by passing --without-crack-lib to the configure command. @@ -178,17 +181,19 @@ For debugging, testing and configuration these labels can be defined: it looks like version 5. 2. -DKEY_DEBUG can be used to get information about the used keys during the signing process; it's use is for development only. - 3. -DMEMDEBUG can be used to find memory leaks and such nasty staff - all memory operations show what they do and how much memory they + 3. -DMEMDEBUG can be used to find memory leaks and such nasty stuff. + All memory operations show what they do and how much memory they allocate or free. 4. -DMEMLOCK_LIMIT is used to define the memory limit to be defined for the max. locked memory check. See --with-memlock configure argument. 5. -DNO_CRACKLIB can be used to not use the crack library - this reduces the security level of the application though (this gets automatically added if configure is started with --without-crack-lib). - 6. -DTEST_OPTION can be used to run some tests for the final program - it enables the command line option --testrun thus 'make check' can + 6. -DTEST_OPTION can be used to run some tests for the final program. + It enables the command line option --testrun thus 'make check' can be used. + 7. -DTRACE_DEBUG enable can be used to enable the TRACE() function for + debugging. Configuration @@ -307,18 +312,6 @@ The following import formats are supported: The PMS interface can read CSV files created by pms_export -Important Note --------------- - -At the moment it's a little annoying to not be able to automatically reencrypt -a file to the same recipients. Right now, this feature is available in the -development version of GpgMe only. -As soon as this is available, I will add this feature to cpm. - -Right now this feature is handled by a wrapper script which extracts the -necessary information using gpg directly. - - Structure of the XML file ------------------------- diff --git a/docs/cpm.1.gz b/docs/cpm.1.gz index 2dfbfca4eaf033fb643c70b23b67173f60906f84..aaafda9851ba5b93aa52520b07424888a3fcaa04 100644 GIT binary patch literal 2286 zcmVvl0Ov(v$6%*F#YxMjCPHtZBnnU}C+!#31|tw_hApnI zC|u<|{nUCDubTa>P%_w&S&JrD*(&~&rse^OgS{nN0(qEsHRS-tbmgy=KTM^Q` zC>l!n$@-n&auJcnq?a_Fphm0tw=`nvXfL|=yAhBtTjx5M#_XfXa#GdCMfXV9X%@y)|uYSFdvR1P;D*Nnx9 zh#Y!FDp8aQ==9mesNu#DrM`j zl+lKpw2piugEshzBLTEC!$xRhm#{aLf4~C(35!5E!4UG7sakpHXSz%7J*P>QG7o^* zgw?IMzDL(V-yx6a@b}0b`>cIi-M+JDsoWD?-J%TA5F0kP6~3j9=_- znvs3T(+D7Y#r!NC_E+bry$6u$b zm2J@dMBHZSJNu3wZrFIWTe_Nkh8~iHC4Xbz&^#EzUH`aK87|ON%~kuF#|6IhKrTq#XWV9|>Q7Mgbr+h+P53SmmkBCnF2;Zq~ZtC^~JYT#y#fqcFz09IC5i)dM9*rpaS!!73E_5 zTgNE0a$SwV->@6Rj0h2SY05{-s*Q}CHNc_%YUw0er3k6f3{G2!2*!Xr;)1;jH#IC5 zPPF_NYS%_sP@Q%tWW*h$AOt64Q_#K{{GfdijzixO`_IsK&VC$GCgb|6|-^w^u*>?8UnNEZ!A?K|*j(pf#x~O7s zOE$&0dDQLM_aT_dl84U5=+>g)gMVt}l~ zkW@9wKn6V=BcX$XOrqkI;u||mE0ZSBMqwZjEEi>qplY0yks8TO5-UTgk)bp)w`+L; zn^ndTbd+j!q>%w}w0}Wl>C`x4>lH?GhQs!~;n?Lo9wEWG1L1#eC>Kv}8}1h5Y+q6| zJ>KZ-RThx8)PRJd2k^VXJ(vj*C%)hH54x@8(&+#cn5Y8eddc#{IXg$6lL^&j=)=*~iHPXQ&V_!Rz zZ$WN{lZ$Jp4$en6quB%5CD7$)HXcr=*-?H#_k+o7bTPjfOz3_-xxbqZ4{0hy72z_v zCa8lfXSTJ4;WE@f;sF`PG?#`x4gy<&OnX9ZZO_}$KiL)L@*RXSKV>Ql2m54(F`6_x zK9~x`XCwnmN~T+w%ZDE~3%8}Yi^(GL4)O1_Z;OFP&modSQ-fQVGT4*)Wf;e*OXsmR zR_%5`$0z;%aj*aWxZkDubg*Z;i#RgeGoLB%iG5SlJC1HsOs8wRRJc^&4MF`AP9INC zPT!X=K|>*;$L`K(5kjVX>Ri5atqRiB&)r|B`SYNKqVr_6;&G^( z$pXixh0lNudaQTH?k?G7D}T#^l%*@Sq62n7=j=RTNz7u+G#(-r2`1>C-E+pVgzuWI z@j@{bvXHKL+2uF(jh@&Obix<(UaL8qOC}-7Fau#w2M>FsSOuNm01ZKnzu2%x=}d`wgInC;4)>8dyJp~v?(+LM4$yz=ngf!WqTVy z0cv0h3;b(nfjxUfFdjtUm$3{RzzO`SL}i>n1X3`AniJ?aW%u6XX3JjKi}xuw6sk@k zV9K7{_MT&PgQZsMf?Xi4;ARBTh>hTK_y zDdSlY^dgj;Z^$e~olIxdf23&=)fBhRD!i-+vr+(363Tc%GN$!X21|Mtn_0qvsEpIh z5LZgR2u)A@@$lfohm(ICbQ?`Ar-YMyI?K>5mCtx*Cp%E-pV`-VX2YE(a5$-r%Cb zZgM%EU>6Msw~v2oQnRV5IH%aUUBNUJu}3raJK{_Mt%D?vHnd7Y(IlyBwpEAdEt=^Yn_3z3YS8R_pKjXek@?Y)r>F1wzyh%zX}!~_?|gnLZt&n z_zMGkOk(|YD3)aHS)&D4sOl*V%B?7xM|?qc9IIz{VQb8Ect7b62OZYfmun}6#&R!g*L1=Bsy~*;3;YEL zOWSkGdy4@Ag}T-H#6DsCz}#6HG$){%CsCBFZJ%^KAmUjJP=kDImLBWthrTTZ#bo-i z>e^q~uk<_n9rLrrHVjd*VzH(e!EE&^S1G&JY1oe;$s!;kkvFUDE_hXAHNep0nOa16 z6p=KVbT+eVx``_cw@DOA^F5YLyKfxAMX|LFm^3Pxh?{l*>w0F?+`>5HI*aJ+) zGh7b&`zOKuPk#;w4Rlw4F;QFBZU-g{@=uuj7IBs?e(E#`^rEJ0ilo6qVJB7q0iLhe z6|`tI9d1Li=uwowE|2OWUDyhRDjb_Sp=Gl?2QVn@&j-V0f>Y*RFB&5Skt3$oS`r+;}#a1lukt8a*__m6mMXoqHNx)-F z0$T|pd{ry{z^tlYYF6_CXwT?%uUFdL`v6#*d+;HG4F5~{jX4X7;@90q!E_LoVelbo z(+$%E(gjbY;2a5u$t;715PJWF?P@cf{d=|QX!9@N>N5=tF#`DO2Vdt(0G}u6M#;s} z(9h?;(DBjHN!$LuryI+R&QykzM=Vrp=MhX?xeM_)M+_qo=4K7#Pid264p4;-qK%TX z40Q&*1dcew*%9Xndm|u=;WdjxM2kOes8tbZ*MkST7O^{L-e)t^ak`a(h|xVTx21MP zFKsfS)|V6P%4##-YC~5E*t-UBN<#X$+zwaAxuh-IHbFZcZ&13RNNab2VW~T>&E8oT z=JV1L$3r|I!eQ@PA{7u-HdBhgLs@7;WsJ)7r9ZhDKDd+XBiSSFs5h8Ap1L740Rg(a z=Zdh5q@7OT4<6&3mlT%}cbB8{8*J;H^>6!=M{B`Ve=@inkKGBmNB6zaq<{W!+Z)mS z!{~lEzUp=(yWGvaPiH?x@?QhjDLL*UppJ@W6bmW<@pU=q|&g zx3uO$q(XgwX5C{>^x@?A*yd|(NX94-3(~gR{P&F WRNwCLHc5YU!Tl#p{#tP`7XScVC_SD4 diff --git a/docs/cpm.pod b/docs/cpm.pod new file mode 100644 index 0000000..898dbbc --- /dev/null +++ b/docs/cpm.pod @@ -0,0 +1,195 @@ +=head1 NAME + +cpm - Console Password Manager + +=head1 SYNOPSIS + +cpm [--config FILE] [--configtest] [--encoding] [--file FILE] [--help] + [--key KEY] [--noencryption] [--readonly] [--security] [--testrun TYPE] + [--version] [PATH] + +=head1 DESCRIPTION + +Keep a password database safe and encrypted. + +=head1 OPTIONS + +=over 8 + +=item B<-c>, B<--config> + +configuration file to use [~/.cpmrc] + +=item B<--configtest> + +verify the configuration file and exit + +=item B<-e>, B<--encoding> + +the encoding in which keyboard input arrives [ISO-8859-1] + +=item B<-f>, B<--file> + +database file to use [~/.cpmdb] + +=item B<-h>, B<--help> + +display this help + +=item B<--key> + +overwrite the default encryption keys and use this key instead; repeat for several keys + +=item B<--noencryption> + +turn off file encryption WARNING: THIS IS FOR DEVELOPMENT AND TESTING ONLY! + +=item B<-r>, B<--readonly> + +open the database in read-only mode + +=item B<-s>, B<--security> + +run a security check and show the current security status + +=item B<--testrun> + +run one of the testmodes + +backup run test on the backupfile creation + +compress[fB-6] + run compression test 1-6 + +decrypt + run test on the decryption code + +encrypt + run test on the encryption code + +environment + run test on the environment validation + +garbage + run test on garbage input files + +searchpattern + run test on the search patterns This only works when the + application has been compiled with the compiler flag - DTEST_OPTION. + +=item B<--version> + +display the version and exit + +=head1 KEYS + +=over 8 + +=item B<^A> + +add a new node to the current node. + +=item B<^D> + +delete the currently selected node and all its subnodes. + +=item B<^E> + +edit the currently selected node. + +=item B<^H> + +show the help screen. + +=item B<^K> + +edit the currently used encryption keys. + +=item B<^N> + +edit the name of the current level. + +=item B<^O> + +edit the comment of the selected node. + +=item B<^P> + +edit the current node and suggest a password. + +=item B<^W> + +write the database to disk. + +=head1 ENVIRONMENT + +The following environment variables are used by the application, +all other variables are discarded at program startup: + +=item B + +If set directory used instead of "~/.gnupg". + +=item B + +Used to locate the gpg-agent + +=item B + +Used to locate the default home directory. + +=item B + +Used to determine the user’s language. + +=item B + +Used to size some displays to the full size of the screen. + +=item B + +Used to size some displays to the full size of the screen. + +=item B + +Terminal settings of the currently used terminal. + +=item B + +Terminal settings of the currently used terminal. + +=head1 IMPORT + +The data import utilities are installed in /usr/share/cpm and the following formats can be imported: + +=item . csv + +=item . passwordsafe + +=item . pms + +=head1 SEE ALSO + +gpg(1) + +=head1 REPORTING BUGS + +Report bugs to . + +=head1 COPYRIGHT + +Copyright (C) 2005, 2006 Harry Brueckner + +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 any later +version. This program is distributed in the hope that it will be use- +ful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- +eral 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 St, Fifth +Floor, Boston, MA 02110-1301, USA. + +Contact: Harry Brueckner Muenchener Strasse 12a 85253 +Kleinberghofen Germany diff --git a/docs/cpm.txt b/docs/cpm.txt index 27eebc4..e054fd4 100644 --- a/docs/cpm.txt +++ b/docs/cpm.txt @@ -11,7 +11,9 @@ DESCRIPTION --config, -c configuration file to use [~/.cpmrc] --configtest verify the configuration file and exit + --debuglevel debuglevel (0=off, 1 - 99) --encoding, -e the encoding in which keyboard input arrives [ISO-8859-1] + --environment list the environment after cleanup --file, -f database file to use [~/.cpmdb] --help, -h display this help --key overwrite the default encryption keys and use this key @@ -55,6 +57,9 @@ ENVIRONMENT * COLUMNS Used to size some displays to the full size of the screen. * LINES Used to size some displays to the full size of the screen. + * NCURSES_NO_UTF8_ACS + Used to configure terminal behaviour with special + charaters, see ncurses(3). * TERMCAP Terminal settings of the currently used terminal. * TERM Terminal settings of the currently used terminal. @@ -68,13 +73,13 @@ IMPORT * pms SEE ALSO - gpg(1) + gpg(1), ncurses(3) REPORTING BUGS Report bugs to . COPYRIGHT - Copyright (C) 2005, 2006 Harry Brueckner + Copyright (C) 2005-2009 Harry Brueckner 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 diff --git a/general.c b/general.c index be280fa..924a7aa 100644 --- a/general.c +++ b/general.c @@ -1,7 +1,7 @@ /* ############################################################################# * general functions for all parts of the program * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -27,11 +27,19 @@ #include "cpm.h" #ifdef HAVE_CRACKLIB #include + + #ifndef CRACKLIB_DICTPATH + #error CRACKLIB_DICTPATH not defined. + #define CRACKLIB_DICTPATH "" + #endif #endif #include "configuration.h" #include "general.h" #include "memory.h" #include "string.h" +#ifdef TRACE_DEBUG + #include +#endif /* ############################################################################# @@ -40,6 +48,37 @@ char* createRealPassword(int length); +/* ############################################################################# + * + * Description print debug information to stderr + * Author Harry Brueckner + * Date 2008-09-29 + * Arguments char* filename - filename where the trace call is + * int line - line number of tha call + * char* fmt - printf like format string + * ... - arguments to printf + * Return void + */ +#ifdef TRACE_DEBUG +void cpm_trace(const char* filename, int line, int level, char* fmt, ...) + { + va_list ap; + + if (!config || + config -> debuglevel == 0 || + config -> debuglevel < level) + { return; } + + fprintf(stderr, "[trace] %s, line %d: ", filename, line); + va_start(ap, fmt); + /* Flawfinder: ignore */ + vfprintf(stderr, fmt, ap); + va_end(ap); + fprintf(stderr, "\n"); + } +#endif + + /* ############################################################################# * * Description create a backup file of the given file @@ -60,6 +99,8 @@ int createBackupfile(char* filename, SHOWERROR_FN showerror_cb) char* newname; char* tmpbuffer; + TRACE(99, "createBackupfile()", NULL); + if (!config -> createbackup) { /* if we don't want backup files at all, we just do nothing*/ return 0; @@ -179,6 +220,8 @@ char* createPassword(int length) char* dictionary; char* password; + TRACE(99, "createPassword()", NULL); + dictionary = memAlloc(__FILE__, __LINE__, strlen(CRACKLIB_DICTPATH) + 1); strStrncpy(dictionary, CRACKLIB_DICTPATH, strlen(CRACKLIB_DICTPATH) + 1); @@ -203,6 +246,8 @@ char* createPassword(int length) #else char* createPassword(int length) { + TRACE(99, "createPassword()", NULL); + return createRealPassword(length); } #endif @@ -224,6 +269,8 @@ char* createRealPassword(int length) rnd; char* password; + TRACE(99, "createRealPassword()", NULL); + /* Flawfinder: ignore */ rnd = open("/dev/random", O_RDONLY); @@ -262,6 +309,8 @@ int fileExists(char* filename) { struct stat filestat; + TRACE(99, "fileExists()", NULL); + if (stat(filename, &filestat)) { return 0; } else @@ -284,12 +333,16 @@ int fileExists(char* filename) int fileLockCreate(char* filename, char* extension, char** errormsg) { pid_t pid; + ssize_t len, + wsize; int fd, size; char* fullname; /* Flawfinder: ignore */ char pidstring[32]; + TRACE(99, "fileLockCreate()", NULL); + /* create the filename for the backup */ size = strlen(filename) + 1 + strlen(extension) + 1; fullname = memAlloc(__FILE__, __LINE__, size); @@ -324,11 +377,16 @@ int fileLockCreate(char* filename, char* extension, char** errormsg) pid = getpid(); snprintf(pidstring, 32, "%d\n", pid); - write(fd, pidstring, strlen(pidstring)); + len = strlen(pidstring); + wsize = write(fd, pidstring, len); lockf(fd, F_ULOCK, 0L); close(fd); - return 0; + + if (wsize == strlen(pidstring)) + { return 0; } + else + { return 1; } } } @@ -350,6 +408,8 @@ int fileLockOpen(char* filename, int flags, mode_t mode, char** errormsg) lockmode, try = 0; + TRACE(99, "fileLockOpen()", NULL); + *errormsg = NULL; if (mode == -1) @@ -441,6 +501,8 @@ int fileLockOpen(char* filename, int flags, mode_t mode, char** errormsg) */ int fileLockRemove(char** errormsg) { + TRACE(99, "fileLockRemove()", NULL); + *errormsg = NULL; if (!runtime -> lockfile) @@ -472,6 +534,8 @@ char* isGoodPassword(char* password) char* dictionary; char* result; + TRACE(99, "isGoodPassword()", NULL); + dictionary = memAlloc(__FILE__, __LINE__, strlen(CRACKLIB_DICTPATH) + 1); strStrncpy(dictionary, CRACKLIB_DICTPATH, strlen(CRACKLIB_DICTPATH) + 1); @@ -484,6 +548,8 @@ char* isGoodPassword(char* password) #else char* isGoodPassword(char* password) { + TRACE(99, "isGoodPassword()", NULL); + return NULL; } #endif @@ -508,6 +574,8 @@ int isReadonly(char* filename) GETGROUPS_T egid; uid_t euid; + TRACE(99, "isReadonly()", NULL); + #ifndef HAVE_GETGROUPS /* if getgroups() does not exist, we can't check this */ return 0; @@ -579,6 +647,8 @@ char* resolveFilelink(char* filename) char* newfile; char* tmpbuffer; + TRACE(99, "resolveFilelink()", NULL); + tmpbuffer = memAlloc(__FILE__, __LINE__, STDBUFFERLENGTH); /* Flawfinder: ignore */ diff --git a/general.h b/general.h index 3b991cd..f1058a2 100644 --- a/general.h +++ b/general.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for general.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -26,6 +26,9 @@ /* ############################################################################# * prototypes */ +#ifdef TRACE_DEBUG +void cpm_trace(const char* filename, int line, int level, char* fmt, ...); +#endif int createBackupfile(char* filename, SHOWERROR_FN showerror_cb); char* createPassword(int length); int fileExists(char* filename); @@ -40,6 +43,17 @@ char* resolveFilelink(char* filename); #endif +/* ############################################################################# + * Macro to call the trace routine + */ + +#ifdef TRACE_DEBUG +#define TRACE(level, fmt, args...) cpm_trace(__FILE__, __LINE__, level, fmt, ##args) +#else +#define TRACE(level, fmt, args...) ; +#endif + + #endif /* ############################################################################# diff --git a/gpg.c b/gpg.c index 4082b52..64d9927 100644 --- a/gpg.c +++ b/gpg.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for all the cryptography, handled via the GPGME library * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -26,6 +26,7 @@ */ #include "cpm.h" #include "configuration.h" +#include "general.h" #include "gpg.h" #include "interface_keys.h" #include "interface_utf8.h" @@ -79,6 +80,8 @@ char* lastrealm = NULL; */ void freeGPG(void) { + TRACE(99, "freeGPG()", NULL); + if (lastrealm) { memFreeString(__FILE__, __LINE__, lastrealm); @@ -107,6 +110,8 @@ int gpgCheckSignResult(SHOWERROR_FN showerror_cb, gpgme_sign_result_t result, char* buffer; char* hashname; + TRACE(99, "gpgCheckSignResult()", NULL); + buffer = memAlloc(__FILE__, __LINE__, STDBUFFERLENGTH); if (!result) @@ -256,6 +261,8 @@ int gpgCheckVerifyResult(SHOWERROR_FN showerror_cb, char* buffer; char* validity; + TRACE(99, "gpgCheckVerifyResult()", NULL); + buffer = memAlloc(__FILE__, __LINE__, STDBUFFERLENGTH); if (!result) @@ -364,6 +371,8 @@ char* gpgData2Char(gpgme_data_t dh, int* newsize) char* newbuffer; char* tmpbuffer; + TRACE(99, "gpgData2Char()", NULL); + newbuffer = NULL; *newsize = 0; @@ -406,6 +415,8 @@ char* gpgData2Char(gpgme_data_t dh, int* newsize) #ifdef TEST_OPTION void gpgDebugKey(gpgme_key_t key) { + TRACE(99, "gpgDebugKey()", NULL); + gpgme_subkey_t skey; gpgme_user_id_t uid; @@ -540,6 +551,8 @@ int gpgDecrypt(char* buffer, int size, char** newbuffer, int* newsize, char* agent; char* tmpbuffer = NULL; + TRACE(99, "gpgDecrypt()", NULL); + /* we set our passphrase callback function */ passphrase_callback = password_cb; @@ -668,6 +681,8 @@ int gpgEncrypt(char* buffer, int size, char** newbuffer, int* newsize, char* fpr; char* tmpbuffer = NULL; + TRACE(99, "gpgEncrypt()", NULL); + /* we set our passphrase callback function */ passphrase_callback = password_cb; @@ -813,6 +828,8 @@ char* gpgGetFingerprint(char* keyname, int secret_only) gpgme_error_t error; char* identifier = NULL; + TRACE(99, "gpgGetFingerprint()", NULL); + if (!config -> encryptdata) { return NULL; } @@ -893,6 +910,8 @@ char* gpgGetRealm(const char* desc) char* start; int size = 0; + TRACE(99, "gpgGetRealm()", NULL); + if (!desc) { return NULL; } @@ -932,6 +951,8 @@ int gpgGetRecipients(gpgme_recipient_t recipients, char* keyname = NULL; char* tmpbuffer = NULL; + TRACE(99, "gpgGetRecipients()", NULL); + while (recipient) { /* if the keyid is NULL, we skip this key */ @@ -983,8 +1004,12 @@ int gpgGetRecipients(gpgme_recipient_t recipients, gpgme_error_t gpgRequestPassphrase(void *hook, const char *uid_hint, const char *passphrase_info, int last_was_bad, int fd) { + ssize_t len, + wsize; char* ptr; + TRACE(99, "gpgRequestPassphrase()", NULL); + if (!uid_hint) { return GPG_ERR_GENERAL; } @@ -1030,10 +1055,14 @@ gpgme_error_t gpgRequestPassphrase(void *hook, const char *uid_hint, ptr = memAlloc(__FILE__, __LINE__, strlen(runtime -> passphrase) + 2); snprintf(ptr, strlen(runtime -> passphrase) + 2, "%s\n", runtime -> passphrase); - write(fd, ptr, strlen(ptr)); + len = strlen(ptr); + wsize = write(fd, ptr, len); memFreeString(__FILE__, __LINE__, ptr); - return GPG_ERR_NO_ERROR; + if (wsize == len) + { return GPG_ERR_NO_ERROR; } + else + { return GPG_ERR_GENERAL; } } @@ -1053,6 +1082,8 @@ int gpgIsSecretKey(char* keyname) gpgme_error_t error; int secret = 0; + TRACE(99, "gpgIsSecretKey()", NULL); + if (!config -> encryptdata) { return 0; } @@ -1135,6 +1166,8 @@ char* gpgValidateEncryptionKey(char* keyname) char* tcomment; char* tname; + TRACE(99, "gpgValidateEncryptionKey()", NULL); + if (!config -> encryptdata) { return NULL; } @@ -1181,9 +1214,9 @@ char* gpgValidateEncryptionKey(char* keyname) if (tcomment && strlen(tcomment)) { /* a comment exists for this key */ size = strlen(key -> subkeys -> keyid) + 1 + - strlen(tname) + 2 + - strlen(tcomment) + 2 + - strlen(key -> uids -> email) + 1 + 1; + strlen(tname) + 1 + + strlen(tcomment) + 2 + 1 + + strlen(key -> uids -> email) + 2 + 1; identifier = memAlloc(__FILE__, __LINE__, size); snprintf(identifier, size, "%s %s (%s) <%s>", key -> subkeys -> keyid, @@ -1194,8 +1227,8 @@ char* gpgValidateEncryptionKey(char* keyname) else { /* no comment exists */ size = strlen(key -> subkeys -> keyid) + 1 + - strlen(tname) + 2 + - strlen(key -> uids -> email) + 1 + 1; + strlen(tname) + 1 + + strlen(key -> uids -> email) + 2 + 1; identifier = memAlloc(__FILE__, __LINE__, size); snprintf(identifier, size, "%s %s <%s>", key -> subkeys -> keyid, @@ -1248,6 +1281,8 @@ void initGPG(void) gpgme_check_version(NULL); + TRACE(99, "initGPG()", NULL); + error = gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP); if (error) { diff --git a/gpg.h b/gpg.h index a9763ca..6945850 100644 --- a/gpg.h +++ b/gpg.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for gpg.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/interface_cli.c b/interface_cli.c index aa607fa..097d26b 100644 --- a/interface_cli.c +++ b/interface_cli.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for handling the CLI interface * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -26,7 +26,9 @@ */ #include "cpm.h" #include -#include +#ifdef HAVE_TERMIOS_H + #include +#endif #include "configuration.h" #include "general.h" #include "interface_cli.h" @@ -74,6 +76,8 @@ const char* cliDialogPassphrase(int retry, char* realm) int ret, size = 0; + TRACE(99, "cliDialogPassphrase()", NULL); + printf(_("enter your passphrase (try #%d)\n%s\n"), retry, realm); @@ -108,6 +112,8 @@ void cliEchoOff(void) { struct termios new_settings; + TRACE(99, "cliEchoOff()", NULL); + tcgetattr(0, &terminalsettings); new_settings = terminalsettings; @@ -127,6 +133,8 @@ void cliEchoOff(void) */ void cliEchoOn(void) { + TRACE(99, "cliEchoOn()", NULL); + if(terminalsettings.c_lflag){ tcsetattr(0, TCSANOW, &terminalsettings); } @@ -151,6 +159,8 @@ int cliInterface(void) char*** path = NULL; char* errormsg; + TRACE(99, "cliInterface()", NULL); + if (!initUTF8Encoding(config -> encoding)) { fprintf(stderr, _("error: %s\n"), @@ -161,6 +171,8 @@ int cliInterface(void) if (xmlDataFileRead(runtime -> dbfile, &errormsg, cliDialogPassphrase, cliShowError)) { + if (!errormsg) + { errormsg = "(null)"; } fprintf(stderr, _("error: %s\n"), errormsg); exit(1); } @@ -190,6 +202,8 @@ int cliInterface(void) if (xmlDataFileWrite(runtime -> dbfile, &errormsg, cliDialogPassphrase, cliShowError)) { + if (!errormsg) + { errormsg = "(null)"; } fprintf(stderr, _("error: %s\n"), errormsg); exit(1); } @@ -298,6 +312,8 @@ int cliInterface(void) */ void cliShowError(const char* headline, const char* message) { + TRACE(99, "cliShowError()", NULL); + fprintf(stderr, _("error: %s %s\n"), headline, message); } @@ -323,6 +339,8 @@ int cliTreeWalk(char** path) char* cstring = NULL; char* cresult = NULL; + TRACE(99, "cliTreeWalk()", NULL); + while (pattern && pattern[i]) { cstring = NULL; @@ -393,6 +411,8 @@ int prepareSearchexpression(void) result; char* errormsg; + TRACE(99, "prepareSearchexpression()", NULL); + if (runtime -> searchtype == SEARCH_REGULAR) { /* for the regular search we don't need anything */ return 1; diff --git a/interface_cli.h b/interface_cli.h index ccbbcdb..2988670 100644 --- a/interface_cli.h +++ b/interface_cli.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for interface_cli.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/interface_gui.c b/interface_gui.c index 857b73b..7147d80 100644 --- a/interface_gui.c +++ b/interface_gui.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for handling the GUI interface * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -25,6 +25,15 @@ * includes */ #include "cpm.h" +#ifdef HAVE_LIBNCURSES + #include +#endif +#ifdef HAVE_LIBNCURSESW + #include +#endif +#ifdef HAVE_TERMIOS_H + #include +#endif #include "configuration.h" #include "general.h" #include "interface_gui.h" @@ -66,7 +75,6 @@ WINDOW* statusline = NULL; int checkForSecretKey(void); void clearStatusline(void); void commentFormat(char** infodata, char* comment); -void destroyScreen(int line, char* message); void drawStatusline(int level); int getInfodataLength(void); char* getListtitle(int level); @@ -99,6 +107,8 @@ int guiDialogWrite(EObjectType cdktype, void* object, void* clientdata, chtype key); int guiDialogYesNo(int level, char** message); int guiDialogYesNoCancel(int level, char** message); +char** guiMessageFormat(char** message); +void guiMessageClear(char** message); void guiUpdateInfo(CDKLABEL* infobox, char** infodata, int id); void freshAlphalist(CDKALPHALIST* widget); int initializeScreen(void); @@ -117,18 +127,30 @@ RETSIGTYPE resizehandler(int signum); int checkForSecretKey(void) { int i, - secret = 0; + j, + secret = 0, + size; char* key; + char* keyptr; + + TRACE(99, "checkForSecretKey()", NULL); for (i = keyCount() - 1; i >= 0; i--) { key = keyGet(i); - /* we skip the id at the beginning and start with the name */ - while (*key && *key != ' ') - { key++; } - key++; - switch (gpgIsSecretKey(key)) + /* we create a copy of the key id string */ + size = strlen(key) + 1; + + /* extract the mail address listed in <...> at the end of the string */ + keyptr = key + size; + for (j = size; j >= 0; j--, keyptr--) + { + if (keyptr[0] == '<') + { break; } + } + + switch (gpgIsSecretKey(keyptr)) { case -1: case 0: @@ -157,6 +179,8 @@ int checkForSecretKey(void) */ void clearStatusline(void) { + TRACE(99, "clearStatusline()", NULL); + if (statusline) { werase(statusline); @@ -186,6 +210,8 @@ void commentFormat(char** infodata, char* comment) char* ptr; char* wstart; + TRACE(99, "commentFormat()", NULL); + if (!comment) { return; } @@ -248,6 +274,8 @@ void commentFormat(char** infodata, char* comment) */ void destroyScreen(int line, char* message) { + TRACE(99, "destroyScreen()", NULL); + /* clear and destroy the statusline */ clearStatusline(); @@ -292,6 +320,8 @@ void drawStatusline(int level) max_x, max_y; + TRACE(99, "drawStatusline()", NULL); + getmaxyx(curseswin, max_y, max_x); if (!statusline) { statusline = newwin(1, max_x, max_y - 1, 0); } @@ -310,26 +340,29 @@ void drawStatusline(int level) waddstr(statusline, " | "); - wattron(statusline, A_BOLD | COLOR_PAIR(3)); - waddstr(statusline, "^A"); - wattroff(statusline, A_BOLD | COLOR_PAIR(3)); - waddstr(statusline, _(" Add")); + if (!runtime -> readonly) + { + wattron(statusline, A_BOLD | COLOR_PAIR(3)); + waddstr(statusline, "^A"); + wattroff(statusline, A_BOLD | COLOR_PAIR(3)); + waddstr(statusline, _(" Add")); - waddstr(statusline, " | "); + waddstr(statusline, " | "); - wattron(statusline, A_BOLD | COLOR_PAIR(3)); - waddstr(statusline, "^E"); - wattroff(statusline, A_BOLD | COLOR_PAIR(3)); - waddstr(statusline, _(" Edit")); + wattron(statusline, A_BOLD | COLOR_PAIR(3)); + waddstr(statusline, "^E"); + wattroff(statusline, A_BOLD | COLOR_PAIR(3)); + waddstr(statusline, _(" Edit")); - waddstr(statusline, " | "); + waddstr(statusline, " | "); - wattron(statusline, A_BOLD | COLOR_PAIR(3)); - waddstr(statusline, "^O"); - wattroff(statusline, A_BOLD | COLOR_PAIR(3)); - waddstr(statusline, _(" Comment")); + wattron(statusline, A_BOLD | COLOR_PAIR(3)); + waddstr(statusline, "^O"); + wattroff(statusline, A_BOLD | COLOR_PAIR(3)); + waddstr(statusline, _(" Comment")); - waddstr(statusline, " | "); + waddstr(statusline, " | "); + } wattron(statusline, A_BOLD | COLOR_PAIR(3)); waddstr(statusline, "ENTER"); @@ -364,6 +397,8 @@ int getInfodataLength(void) int max_x, max_y; + TRACE(99, "getInfodataLength()", NULL); + getmaxyx(curseswin, max_y, max_x); #ifdef CDK_VERSION_5 @@ -397,6 +432,8 @@ char* getListtitle(int level) char* templatename; char* title; + TRACE(99, "getListtitle()", NULL); + title = memAlloc(__FILE__, __LINE__, 7 + 1); strStrncpy(title, "", 7 + 1); subtitle = memAlloc(__FILE__, __LINE__, 7 + 1); @@ -481,6 +518,8 @@ int keyPreProcess(EObjectType cdktype, void* object, void* clientdata, nodes; char** nodenames; + TRACE(99, "keyPreProcess()", NULL); + list = event -> widget; if (event -> preprocessfunction) @@ -532,10 +571,18 @@ void freshAlphalist(CDKALPHALIST* widget) int nodes; char** nodenames; + TRACE(99, "freshAlphalist()", NULL); + nodenames = xmlInterfaceGetNames(); nodes = listCount(nodenames); setCDKAlphalistContents(widget, nodenames, nodes); + /* TODO: add support to place the cursor at last added/modified item */ +#ifdef CDK_VERSION_5 + setCDKScrollCurrentTop(widget -> scrollField, 0); + setCDKAlphalistCurrentItem(widget, 0); + drawCDKAlphalist(widget, BorderOf(widget)); +#endif xmlInterfaceFreeNames(nodenames); } @@ -557,6 +604,8 @@ const char* guiDialogPassphrase(int retry, char* realm) char* trealm; char* title; + TRACE(99, "guiDialogPassphrase()", NULL); + if (strlen(runtime -> passphrase)) { return runtime -> passphrase; } @@ -593,8 +642,7 @@ const char* guiDialogPassphrase(int retry, char* realm) destroyCDKEntry(entry); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(0); } @@ -621,6 +669,8 @@ int guiDialogAddEncryptionKey(EObjectType cdktype, void* object, KEYEVENT* event = (KEYEVENT*)clientdata; char* data; + TRACE(99, "guiDialogAddEncryptionKey()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; @@ -650,8 +700,14 @@ int guiDialogAddEncryptionKey(EObjectType cdktype, void* object, destroyCDKEntry(entry); - /* redraw the screen */ - drawCDKScreen(cdkscreen); +#ifdef CDK_VERSION_5 + /* tell the widget that it has to exit */ + /* I am not sure if this is a bug in CDK or not, but it can be + * solved this way. */ + EarlyExitOf((CDKSCROLL*)object) = vESCAPE_HIT; +#endif + + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -682,6 +738,8 @@ int guiDialogAddNode(EObjectType cdktype, void* object, void* clientdata, char* status = NULL; char* title; + TRACE(99, "guiDialogAddNode()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; if (runtime -> readonly) @@ -713,7 +771,7 @@ int guiDialogAddNode(EObjectType cdktype, void* object, void* clientdata, memFree(__FILE__, __LINE__, title, STDBUFFERLENGTH); /* set the data of the input field */ - setCDKEntry(entry, event -> selection, 0, STDSTRINGLENGTH, SHOW_BOX); + setCDKEntry(entry, NULL, 0, STDSTRINGLENGTH, SHOW_BOX); data = activateCDKEntry(entry, (chtype*)NULL); if (entry -> exitType == vNORMAL) @@ -748,8 +806,7 @@ int guiDialogAddNode(EObjectType cdktype, void* object, void* clientdata, destroyCDKEntry(entry); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -777,6 +834,8 @@ int guiDialogDeleteEncryptionKey(EObjectType cdktype, void* object, int counter, length; + TRACE(99, "guiDialogDeleteEncryptionKey()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; @@ -789,12 +848,11 @@ int guiDialogDeleteEncryptionKey(EObjectType cdktype, void* object, return 1; } - /* we insert the key's name */ + /* we ask if this key should be deleted */ length = strlen(keyGet(counter)) + 9 + 1; - msgDeleteNode[0] = _("Are you sure you want to delete the encryption key "); + msgDeleteNode[0] = _("Are you sure you want to delete the encryption key"); msgDeleteNode[1] = memAlloc(__FILE__, __LINE__, length); - snprintf(msgDeleteNode[1], length, "%s?", keyGet(counter)); - + snprintf(msgDeleteNode[1], length, "%s?", keyGet(counter)); if (guiDialogYesNo(event -> level, msgDeleteNode) == 1) { /* we really want to delete this key */ @@ -804,6 +862,13 @@ int guiDialogDeleteEncryptionKey(EObjectType cdktype, void* object, memFree(__FILE__, __LINE__, msgDeleteNode[1], length); +#ifdef CDK_VERSION_5 + /* tell the widget that it has to exit */ + /* I am not sure if this is a bug in CDK or not, but it can be + * solved this way. */ + EarlyExitOf((CDKSCROLL*)object) = vESCAPE_HIT; +#endif + return 1; } @@ -827,6 +892,8 @@ int guiDialogDeleteNode(EObjectType cdktype, void* object, void* clientdata, int length; char* label; + TRACE(99, "guiDialogDeleteNode()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; if (runtime -> readonly) @@ -845,7 +912,7 @@ int guiDialogDeleteNode(EObjectType cdktype, void* object, void* clientdata, length = strlen(label) + 15 + 1; msgDeleteNode[0] = _("Are you sure you want to delete"); msgDeleteNode[1] = memAlloc(__FILE__, __LINE__, length); - snprintf(msgDeleteNode[1], length, _("entry %s?"), label); + snprintf(msgDeleteNode[1], length, _("entry %s?"), label); if (guiDialogYesNo(event -> level, msgDeleteNode) == 1) { /* we really want to delete this node */ @@ -883,6 +950,8 @@ int guiDialogEditComment(EObjectType cdktype, void* object, void* clientdata, char* comment; char* label; + TRACE(99, "guiDialogEditComment()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; if (runtime -> readonly) @@ -937,8 +1006,7 @@ int guiDialogEditComment(EObjectType cdktype, void* object, void* clientdata, /* free our old comment */ memFreeString(__FILE__, __LINE__, comment); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -967,6 +1035,8 @@ int guiDialogEditEncryptionKey(EObjectType cdktype, void* object, int counter; char* data; + TRACE(99, "guiDialogEditEncryptionKey()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; @@ -1005,8 +1075,14 @@ int guiDialogEditEncryptionKey(EObjectType cdktype, void* object, destroyCDKEntry(entry); - /* redraw the screen */ - drawCDKScreen(cdkscreen); +#ifdef CDK_VERSION_5 + /* tell the widget that it has to exit */ + /* I am not sure if this is a bug in CDK or not, but it can be + * solved this way. */ + EarlyExitOf((CDKSCROLL*)object) = vESCAPE_HIT; +#endif + + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -1041,6 +1117,8 @@ int guiDialogEditNode(EObjectType cdktype, void* object, void* clientdata, char* status = NULL; char* title; + TRACE(99, "guiDialogEditNode()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; if (runtime -> readonly) @@ -1094,8 +1172,7 @@ int guiDialogEditNode(EObjectType cdktype, void* object, void* clientdata, /* free the infobox */ destroyCDKLabel(randombox); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -1144,8 +1221,7 @@ int guiDialogEditNode(EObjectType cdktype, void* object, void* clientdata, destroyCDKEntry(entry); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -1174,6 +1250,8 @@ int guiDialogHandleKeys(EObjectType cdktype, void* object, void* clientdata, done = 0, selection; + TRACE(99, "guiDialogHandleKeys()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; if (runtime -> readonly) @@ -1187,7 +1265,7 @@ int guiDialogHandleKeys(EObjectType cdktype, void* object, void* clientdata, counter = keyCount(); scroll = newCDKScroll(cdkscreen, CENTER, CENTER, RIGHT, - LINES * 2 / 3, 60, + LINES * 2 / 3, COLS - 20, _("Keys to encrypt the database with"), keyGetList(), counter, NONUMBERS, A_REVERSE, SHOW_BOX, SHOW_SHADOW); @@ -1214,7 +1292,6 @@ int guiDialogHandleKeys(EObjectType cdktype, void* object, void* clientdata, &keyevent); selection = activateCDKScroll(scroll, NULL); - if (scroll -> exitType == vNORMAL) { keyevent.selectionid = scroll -> currentItem; @@ -1226,8 +1303,7 @@ int guiDialogHandleKeys(EObjectType cdktype, void* object, void* clientdata, destroyCDKScroll(scroll); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } } @@ -1265,6 +1341,8 @@ int guiDialogHelp(EObjectType cdktype, void* object, void* clientdata, }; KEYEVENT* event = (KEYEVENT*)clientdata; + TRACE(99, "guiDialogHelp()", NULL); + msgHelp[ 0] = _(" ^A - add a new node to the current one."); msgHelp[ 2] = _(" ^D - delete the currently selected node and all its subnodes."); msgHelp[ 4] = _(" ^E - edit the currently selected node."); @@ -1278,8 +1356,7 @@ int guiDialogHelp(EObjectType cdktype, void* object, void* clientdata, guiDialogOk(event -> level, msgHelp); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -1307,8 +1384,11 @@ void guiDialogOk(int level, char** message) nlines, selection; char** display = NULL; + char** tmessage; char* ptr; + TRACE(99, "guiDialogOk()", NULL); + buttons[0] = _("Ok"); while (message[lines]) @@ -1344,11 +1424,13 @@ void guiDialogOk(int level, char** message) do { + tmessage = guiMessageFormat(display); question = newCDKDialog(cdkscreen, CENTER, CENTER, - display, nlines, + tmessage, nlines, buttons, 1, A_REVERSE, TRUE, SHOW_BOX, SHOW_SHADOW); + guiMessageClear(tmessage); if (!question) { destroyScreen(__LINE__, _("can not create dialog.")); } @@ -1361,8 +1443,7 @@ void guiDialogOk(int level, char** message) destroyCDKDialog(question); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(level); } } @@ -1372,8 +1453,7 @@ void guiDialogOk(int level, char** message) { memFreeString(__FILE__, __LINE__, display[i]); } memFree(__FILE__, __LINE__, display, sizeof(char*) * (nlines + 1)); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(level); } } @@ -1391,6 +1471,8 @@ void guiDialogShowError(const char* headline, const char* message) { static char* msgError[] = { NULL, NULL, NULL }; + TRACE(99, "guiDialogShowError()", NULL); + msgError[0] = memAlloc(__FILE__, __LINE__, strlen(headline) + 8 + 1); snprintf(msgError[0], strlen(headline) + 8 + 1, "%s", headline); msgError[1] = (char*)message; @@ -1418,6 +1500,8 @@ int guiDialogTemplateName(EObjectType cdktype, void* object, void* clientdata, int is_static; char* data; + TRACE(99, "guiDialogTemplateName()", NULL); + /* we tell our caller, that an external event modified it's data */ event -> bindused = 1; if (runtime -> readonly) @@ -1452,8 +1536,7 @@ int guiDialogTemplateName(EObjectType cdktype, void* object, void* clientdata, destroyCDKEntry(entry); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(event -> level); } @@ -1478,6 +1561,9 @@ int guiDialogYesNo(int level, char** message) int lines = 0, selection, status = 0; + char** tmessage; + + TRACE(99, "guiDialogYesNo()", NULL); buttons[0] = _("Yes"); buttons[1] = _("No"); @@ -1485,11 +1571,13 @@ int guiDialogYesNo(int level, char** message) while (message[lines]) { lines++; } + tmessage = guiMessageFormat(message); question = newCDKDialog(cdkscreen, CENTER, CENTER, - message, lines, + tmessage, lines, buttons, 2, A_REVERSE, TRUE, SHOW_BOX, SHOW_SHADOW); + guiMessageClear(tmessage); if (!question) { destroyScreen(__LINE__, _("can not create dialog.")); } @@ -1504,8 +1592,7 @@ int guiDialogYesNo(int level, char** message) destroyCDKDialog(question); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(level); } @@ -1533,6 +1620,8 @@ int guiDialogWrite(EObjectType cdktype, void* object, void* clientdata, KEYEVENT* event = (KEYEVENT*)clientdata; char* errormsg; + TRACE(99, "guiDialogWrite()", NULL); + msgEncryptError[0] = _("Error encrypting the data."); msgNoKeys[0] = _("You did not specify any encryption keys."); msgSaveDone[0] = _("The database has been written to disk."); @@ -1585,6 +1674,9 @@ int guiDialogYesNoCancel(int level, char** message) int lines = 0, selection, status = 2; + char** tmessage; + + TRACE(99, "guiDialogYesNoCancel()", NULL); buttons[0] = _("Yes"); buttons[1] = _("No"); @@ -1593,11 +1685,13 @@ int guiDialogYesNoCancel(int level, char** message) while (message[lines]) { lines++; } + tmessage = guiMessageFormat(message); question = newCDKDialog(cdkscreen, CENTER, CENTER, - message, lines, + tmessage, lines, buttons, 3, A_REVERSE, TRUE, SHOW_BOX, SHOW_SHADOW); + guiMessageClear(tmessage); if (!question) { destroyScreen(__LINE__, _("can not create dialog.")); } @@ -1624,8 +1718,7 @@ int guiDialogYesNoCancel(int level, char** message) destroyCDKDialog(question); - /* redraw the screen */ - drawCDKScreen(cdkscreen); + /* redraw the statusline */ if (statusline) { drawStatusline(level); } @@ -1633,6 +1726,80 @@ int guiDialogYesNoCancel(int level, char** message) } +/* ############################################################################# + * + * Description Clear the given message array + * Author Harry Brueckner + * Date 2007-01-24 + * Arguments char** message - message array to format, terminated by NULL + * Return void + */ +void guiMessageClear(char** message) + { + int lines = 0; + + TRACE(99, "guiMessageClear()", NULL); + + if (!message) + { return; } + + /* free all strings */ + while (message[lines]) + { + memFreeString(__FILE__, __LINE__, message[lines]); + lines++; + } + + /* free the array of strings */ + memFree(__FILE__, __LINE__, message, sizeof(char*) * (lines + 1)); + } + + +/* ############################################################################# + * + * Description format the given message to match the current terminal width + * Author Harry Brueckner + * Date 2007-01-24 + * Arguments char** message - message array to format, terminated by NULL + * Return char** cut off message strings + */ +#define WIDTHDELTA 10 +char** guiMessageFormat(char** message) + { + int columns, + i, + lines = 0; + char** nmessage; + + TRACE(99, "guiMessageFormat()", NULL); + + if (!message) + { return NULL; } + + /* count strings */ + while (message[lines]) + { lines++; } + + nmessage = memAlloc(__FILE__, __LINE__, sizeof(char*) * (lines + 1)); + nmessage[lines] = NULL; + + columns = getInfodataLength(); + columns = max(WIDTHDELTA * 2, columns); + + for (i = 0; i < lines; i++) + { + int size; + + size = min(columns - WIDTHDELTA + 1, strlen(message[i]) + 1); + nmessage[i] = memAlloc(__FILE__, __LINE__, size); + strStrncpy(nmessage[i], message[i], size); + } + + return nmessage; + } +#undef WIDTHDELTA + + /* ############################################################################# * * Description initialization of the ncurses screen @@ -1643,6 +1810,8 @@ int guiDialogYesNoCancel(int level, char** message) */ int initializeScreen(void) { + TRACE(99, "initializeScreen()", NULL); + curseswin = NULL; cdkscreen = NULL; @@ -1695,6 +1864,8 @@ void guiUpdateInfo(CDKLABEL* infobox, char** infodata, int id) char* modified_by; char* modified_on; + TRACE(99, "guiUpdateInfo()", NULL); + /* we have to fit the comment into the infodata array */ for (i = 2; i < config -> infoheight; i++) { @@ -1769,6 +1940,8 @@ void interfaceLoop(void) char* selection; char* title; + TRACE(99, "interfaceLoop()", NULL); + infodata = memAlloc(__FILE__, __LINE__, sizeof(char*) * (config -> infoheight + 1)); for (id = 0; id < config -> infoheight; id++) @@ -1937,7 +2110,7 @@ void interfaceLoop(void) { xmlInterfaceTemplateGet(++level, &is_static); if (config -> templatelock && !is_static) - { /* if it's not a static template we can't go there*/ + { /* if it's not a static template we can't go there */ xmlInterfaceNodeUp(); Beep(); level--; @@ -1948,7 +2121,7 @@ void interfaceLoop(void) { xmlInterfaceTemplateGet(++level, &is_static); if (config -> templatelock && !is_static) - { /* if it's not a static template we can't go there*/ + { /* if it's not a static template we can't go there */ Beep(); level--; } @@ -1991,8 +2164,10 @@ char* isNodename(KEYEVENT* event) int id; char* label = NULL; + TRACE(99, "isNodename()", NULL); + list = event -> widget; - if (list -> scrollField -> lastItem > 0) + if (list -> scrollField -> listSize > 0) { id = list -> scrollField -> currentItem; if (id >= 0) @@ -2051,6 +2226,8 @@ void userInterface(void) char* errormsg; char* errormsg2; + TRACE(99, "userInterface()", NULL); + msgEncryptError[0] = _("Error encrypting the data."); msgNoKeys[0] = _("You did not specify any encryption keys."); msgNoKeys[1] = _("Quit without saving?"); diff --git a/interface_gui.h b/interface_gui.h index bb659e6..de221d9 100644 --- a/interface_gui.h +++ b/interface_gui.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for interface_gui.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -33,6 +33,7 @@ /* ############################################################################# * prototypes */ +void destroyScreen(int line, char* message); void userInterface(void); diff --git a/interface_keys.c b/interface_keys.c index 541f6f3..1e7ce41 100644 --- a/interface_keys.c +++ b/interface_keys.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for all things regarding the key list. * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -26,6 +26,7 @@ */ #include "cpm.h" #include "configuration.h" +#include "general.h" #include "gpg.h" #include "interface_keys.h" #include "interface_utf8.h" @@ -49,6 +50,8 @@ char** encrypttionkeylist; */ void freeKeys(void) { + TRACE(99, "freeKeys()", NULL); + encrypttionkeylist = listFree(encrypttionkeylist); } @@ -63,6 +66,8 @@ void freeKeys(void) */ void initKeys(void) { + TRACE(99, "initKeys()", NULL); + encrypttionkeylist = NULL; } @@ -80,11 +85,14 @@ int keyAdd(char* key) char* identifier; char* tname; + TRACE(99, "keyAdd()", NULL); + if (!key || !strlen(key)) { return 0; } tname = (char*)convert2xml(key); identifier = gpgValidateEncryptionKey(tname); + if (identifier) { if (keyGetId(identifier) == -1) @@ -118,6 +126,8 @@ int keyChange(int id, char* key) char* identifier; char* tname; + TRACE(99, "keyChange()", NULL); + if (!key || !strlen(key)) { return 0; } @@ -159,6 +169,8 @@ int keyChange(int id, char* key) */ int keyCount(void) { + TRACE(99, "keyCount()", NULL); + return listCount(encrypttionkeylist); } @@ -175,6 +187,8 @@ void keyDefaults(void) { int i; + TRACE(99, "keyDefaults()", NULL); + for (i = listCount(config -> defaultkeys); i > 0; i--) { if (!keyAdd(config -> defaultkeys[i - 1])) @@ -197,6 +211,8 @@ void keyDefaults(void) */ void keyDelete(int id) { + TRACE(99, "keyDelete()", NULL); + encrypttionkeylist = listDelete(encrypttionkeylist, id); } @@ -211,6 +227,8 @@ void keyDelete(int id) */ char* keyGet(int id) { + TRACE(99, "keyGet()", NULL); + return encrypttionkeylist[id]; } @@ -226,12 +244,12 @@ char* keyGet(int id) int keyGetId(char* key) { int i; - char* tname; - tname = (char*)convert2xml(key); + TRACE(99, "keyGetId()", NULL); + for (i = listCount(encrypttionkeylist); i > 0; i--) { - if (!strcmp(encrypttionkeylist[i - 1], tname)) + if (!strcmp(encrypttionkeylist[i - 1], key)) return i - 1; } @@ -249,6 +267,8 @@ int keyGetId(char* key) */ char** keyGetList(int id) { + TRACE(99, "keyGetList()", NULL); + return encrypttionkeylist; } diff --git a/interface_keys.h b/interface_keys.h index ba8eed1..42ee052 100644 --- a/interface_keys.h +++ b/interface_keys.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for interface_keys.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/interface_utf8.c b/interface_utf8.c index 1b5cabb..6e2be8d 100644 --- a/interface_utf8.c +++ b/interface_utf8.c @@ -1,7 +1,7 @@ /* ############################################################################# * interface to the xml library's UFT-8 conversion * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -25,6 +25,7 @@ * includes */ #include "cpm.h" +#include "general.h" #include "interface_utf8.h" #include "memory.h" #include "string.h" @@ -55,6 +56,8 @@ char* convert(int direction, char* instring) ret, tmp; + TRACE(199, "convert()", NULL); + if (!instring) return NULL; @@ -110,6 +113,8 @@ char* convert(int direction, char* instring) */ char* convert2terminal(xmlChar* instring) { + TRACE(199, "convert2terminal()", NULL); + return convert(1, (char*)instring); } @@ -124,6 +129,8 @@ char* convert2terminal(xmlChar* instring) */ xmlChar* convert2xml(char* instring) { + TRACE(199, "convert2xml()", NULL); + return (xmlChar*)convert(0, instring); } @@ -138,6 +145,8 @@ xmlChar* convert2xml(char* instring) */ void freeUTF8Interface(void) { + TRACE(99, "freeUTF8Interface()", NULL); + if (convertbuffer) { memFreeString(__FILE__, __LINE__, convertbuffer); @@ -166,6 +175,8 @@ int initUTF8Encoding(char* encoding) char* tstring1 = NULL; char* tstring2 = NULL; + TRACE(99, "initUTF8Encoding()", NULL); + /* we first try to find the encode by it's name */ encoder = xmlParseCharEncoding(encoding); if (encoder <= 0) diff --git a/interface_utf8.h b/interface_utf8.h index 2df9996..31d12c6 100644 --- a/interface_utf8.h +++ b/interface_utf8.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for interface_utf8.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/interface_xml.c b/interface_xml.c index 1e13ead..a4a8779 100644 --- a/interface_xml.c +++ b/interface_xml.c @@ -1,7 +1,7 @@ /* ############################################################################# * interface to the xml library * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -28,6 +28,7 @@ #include #include #include "configuration.h" +#include "general.h" #include "interface_utf8.h" #include "interface_xml.h" #include "listhandler.h" @@ -76,6 +77,8 @@ void createEditorsNode(void) xmlNode* rootnode; char* prop; + TRACE(99, "createEditorsNode()", NULL); + /* we walk along the root node to find the template node */ rootnode = xmlGetDocumentRoot(); curnode = rootnode -> children; @@ -121,6 +124,7 @@ void createEditorsNode(void) prop = convert2terminal(xmlGetProp(curnode, BAD_CAST "uid")); if (prop) { /* we found a user */ + /* Flawfinder: ignore */ maxeditor = max(maxeditor, atoi(prop)); } } @@ -143,6 +147,8 @@ void createTemplateNode(void) xmlNode* curnode; xmlNode* rootnode; + TRACE(99, "createTemplateNode()", NULL); + /* we walk along the root node to find the template node */ rootnode = xmlGetDocumentRoot(); curnode = rootnode -> children; @@ -194,6 +200,8 @@ int editorAdd(xmlChar* editor) /* Flawfinder: ignore */ char uid[10]; + TRACE(99, "editorAdd()", NULL); + if (!editorsnode) { createEditorsNode(); } @@ -234,6 +242,8 @@ char* editorFindById(int uid) char* result; char* user; + TRACE(99, "editorFindById()", NULL); + if (!editorsnode) { createEditorsNode(); } @@ -249,6 +259,7 @@ char* editorFindById(int uid) prop = convert2terminal(xmlGetProp(curnode, BAD_CAST "uid")); if (prop) { /* we found a user */ + /* Flawfinder: ignore */ if (uid == atoi(prop)) { user = convert2terminal(xmlNodeGetContent(curnode)); @@ -278,9 +289,12 @@ char* editorFindById(int uid) int editorFindByName(char* editor) { xmlNode* curnode; + int uid; char* prop; char* user; + TRACE(99, "editorFindByName()", NULL); + if (!editorsnode) { createEditorsNode(); } @@ -299,7 +313,12 @@ int editorFindByName(char* editor) prop = convert2terminal(xmlGetProp(curnode, BAD_CAST "uid")); if (prop) { /* we found a user */ - return atoi(prop); + /* Flawfinder: ignore */ + uid = atoi(prop); + if (uid > 0) + { return uid; } + else + { return -1; } } } } @@ -321,6 +340,8 @@ int editorFindByName(char* editor) */ void freeXMLInterface(void) { + TRACE(99, "freeXMLInterface()", NULL); + if (xmlwalklist) { memFree(__FILE__, __LINE__, xmlwalklist, maxlevel * sizeof(xmlNode*)); @@ -339,6 +360,8 @@ void freeXMLInterface(void) */ void initXMLInterface(void) { + TRACE(99, "initXMLInterface()", NULL); + level = 0; maxlevel = 0; @@ -363,6 +386,8 @@ xmlNode* nodeFind(char* label) xmlNode* newnode; char* prop; + TRACE(99, "nodeFind()", NULL); + if (!level || !label) { return 0; } @@ -402,6 +427,8 @@ static int nodeSort(const void* node1, const void* node2) char** label1 = (char**)node1; char** label2 = (char**)node2; + TRACE(99, "nodeSort()", NULL); + return strcmp(label1[0], label2[0]); } @@ -418,6 +445,8 @@ void xmlInterfaceAddNode(char* label) { xmlNode* node; + TRACE(99, "xmlInterfaceAddNode()", NULL); + node = xmlNewChild(xmlwalklist[level - 1], NULL, BAD_CAST "node", @@ -446,6 +475,8 @@ void xmlInterfaceDeleteNode(char* label) { xmlNode* node; + TRACE(99, "xmlInterfaceDeleteNode()", NULL); + node = nodeFind(label); if (!node) { return; } @@ -467,6 +498,8 @@ void xmlInterfaceEditNode(char* label_old, char* label_new) { xmlNode* node; + TRACE(99, "xmlInterfaceEditNode()", NULL); + node = nodeFind(label_old); if (!node) { return; } @@ -486,6 +519,8 @@ void xmlInterfaceEditNode(char* label_old, char* label_new) */ void xmlInterfaceFreeNames(char** list) { + TRACE(99, "xmlInterfaceFreeNames()", NULL); + listFree(list); } @@ -506,6 +541,8 @@ char* xmlInterfaceGetComment(char* label) char* comment; char* result; + TRACE(99, "xmlInterfaceGetComment()", NULL); + node = nodeFind(label); if (!node) { return NULL; } @@ -550,6 +587,8 @@ void xmlInterfaceGetCreationLabel(char* label, char** by, char**on) char* propby; char* propon; + TRACE(99, "xmlInterfaceGetCreationLabel()", NULL); + *by = NULL; *on = NULL; @@ -560,6 +599,7 @@ void xmlInterfaceGetCreationLabel(char* label, char** by, char**on) propby = convert2terminal(xmlGetProp(node, BAD_CAST "created-by")); if (!propby || !strlen(propby)) { propby = "0"; } + /* Flawfinder: ignore */ *by = editorFindById(atoi(propby)); propon = convert2terminal(xmlGetProp(node, BAD_CAST "created-on")); @@ -586,6 +626,8 @@ void xmlInterfaceGetModificationLabel(char* label, char** by, char**on) char* propby; char* propon; + TRACE(99, "xmlInterfaceGetModificationLabel()", NULL); + *by = NULL; *on = NULL; @@ -596,6 +638,7 @@ void xmlInterfaceGetModificationLabel(char* label, char** by, char**on) propby = convert2terminal(xmlGetProp(node, BAD_CAST "modified-by")); if (!propby || !strlen(propby)) { propby = "0"; } + /* Flawfinder: ignore */ *by = editorFindById(atoi(propby)); propon = convert2terminal(xmlGetProp(node, BAD_CAST "modified-on")); @@ -623,6 +666,8 @@ char** xmlInterfaceGetNames(void) int counter = 0, i = 0; + TRACE(99, "xmlInterfaceGetNames()", NULL); + /* first we count how many children there are */ curnode = xmlwalklist[level - 1] -> children; while (curnode) @@ -681,6 +726,8 @@ int xmlInterfaceNodeDown(char* label) { xmlNode* newnode; + TRACE(99, "xmlInterfaceNodeDown()", NULL); + if (!level) { /* we start out with the root node */ newnode = xmlGetDocumentRoot(); @@ -719,6 +766,8 @@ int xmlInterfaceNodeDown(char* label) */ int xmlInterfaceNodeExists(char* label) { + TRACE(99, "xmlInterfaceNodeExists()", NULL); + if (nodeFind(label)) { return 1; } else @@ -736,6 +785,8 @@ int xmlInterfaceNodeExists(char* label) */ char* xmlInterfaceNodeGet(int id) { + TRACE(99, "xmlInterfaceNodeGet()", NULL); + if (id < 1 || id >= level) { return NULL; } @@ -754,6 +805,8 @@ char* xmlInterfaceNodeGet(int id) */ void xmlInterfaceNodeUp(void) { + TRACE(99, "xmlInterfaceNodeUp()", NULL); + if (level > 0 && xmlwalklist[level - 1]) { xmlwalklist[level - 1] = NULL; } @@ -778,6 +831,8 @@ void xmlInterfaceSetComment(char* label, char* comment) xmlNode* curnode; xmlNode* node; + TRACE(99, "xmlInterfaceSetComment()", NULL); + node = nodeFind(label); if (!node) { return; } @@ -848,6 +903,8 @@ char* xmlInterfaceTemplateGet(int id, int* is_static) xmlNode* curnode; char* prop; + TRACE(99, "xmlInterfaceTemplateGet()", NULL); + *is_static = 1; if (!templatenode) @@ -866,6 +923,7 @@ char* xmlInterfaceTemplateGet(int id, int* is_static) { prop = convert2terminal(xmlGetProp(curnode, BAD_CAST "level")); if (prop && + /* Flawfinder: ignore */ atoi(prop) == id) { /* we found the title for the id */ return convert2terminal(xmlNodeGetContent(curnode)); @@ -900,8 +958,11 @@ char* xmlInterfaceTemplateGet(int id, int* is_static) int xmlInterfaceTemplateGetId(char* title) { xmlNode* curnode; + int tid; char* prop; + TRACE(99, "xmlInterfaceTemplateGetId()", NULL); + if (!templatenode) { createTemplateNode(); } if (!templatenode) @@ -916,7 +977,14 @@ int xmlInterfaceTemplateGetId(char* title) { /* we found the title */ prop = convert2terminal(xmlGetProp(curnode, BAD_CAST "level")); if (prop) - { return atoi(prop); } + { + /* Flawfinder: ignore */ + tid = atoi(prop); + if (tid > 0) + { return tid; } + else + { return -1; } + } } curnode = curnode -> next; @@ -941,6 +1009,8 @@ void xmlInterfaceTemplateSet(char* title) /* Flawfinder: ignore */ char levelstr[32]; + TRACE(99, "xmlInterfaceTemplateSet()", NULL); + if (!templatenode) { createTemplateNode(); } if (!templatenode) @@ -954,6 +1024,7 @@ void xmlInterfaceTemplateSet(char* title) { prop = convert2terminal(xmlGetProp(curnode, BAD_CAST "level")); if (prop && + /* Flawfinder: ignore */ atoi(prop) == level) { /* we found the title for the current level */ xmlNodeSetContent(curnode, convert2xml(title)); @@ -1002,6 +1073,8 @@ int xmlInterfaceTreeWalk(xmlNode* node, char*** path, WALKFN walker) int found = 0, level = listCount(*path); + TRACE(99, "xmlInterfaceTreeWalk()", NULL); + if (!node) { /* if we did not get a node, we start at the root element */ node = xmlGetDocumentRoot(); @@ -1056,6 +1129,8 @@ void xmlInterfaceUpdateTimestamp(xmlChar* uidlabel, xmlChar* timelabel, /* Flawfinder: ignore */ char udisplay[10]; + TRACE(99, "xmlInterfaceUpdateTimestamp()", NULL); + if (!curnode) { return; } diff --git a/interface_xml.h b/interface_xml.h index 7e1ae8c..7ce6f38 100644 --- a/interface_xml.h +++ b/interface_xml.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for interface_xml.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/listhandler.c b/listhandler.c index 82abcb5..61614e9 100644 --- a/listhandler.c +++ b/listhandler.c @@ -1,7 +1,7 @@ /* ############################################################################# * general list handler which handles any NULL terminated lists * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -25,6 +25,7 @@ * includes */ #include "cpm.h" +#include "general.h" #include "memory.h" #include "listhandler.h" #include "string.h" diff --git a/listhandler.h b/listhandler.h index 69c535a..43b8dd5 100644 --- a/listhandler.h +++ b/listhandler.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for listhandler.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/memory.c b/memory.c index eb15337..5ae7960 100644 --- a/memory.c +++ b/memory.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for memory allocation handling * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/memory.h b/memory.h index 069fa2e..2cd1998 100644 --- a/memory.h +++ b/memory.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for memory.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/options.c b/options.c index 66501a7..2b1ac3f 100644 --- a/options.c +++ b/options.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for all commandline argument handling * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -25,6 +25,9 @@ * includes */ #include "cpm.h" +#ifdef __linux__ + #include +#endif #ifdef HAVE_GETOPT_H #include #endif @@ -60,6 +63,8 @@ void getDefaultOptions(void) int found = 0; char* home; + TRACE(99, "getDefaultOptions()", NULL); + /* Flawfinder: ignore */ home = getenv("HOME"); @@ -122,6 +127,8 @@ char* getFilePath(char* path, char* filename) { char* result; + TRACE(99, "getFilePath()", NULL); + if (path) { /* we got a path and a filename */ result = memAlloc(__FILE__, __LINE__, @@ -153,6 +160,8 @@ int getOptions(int argc, char **argv) { int error = 0; + TRACE(99, "getOptions()", NULL); + while (1) { int code; @@ -165,19 +174,21 @@ int getOptions(int argc, char **argv) { { "config", required_argument, 0, 0 }, /* 0 */ { "configtest", no_argument, 0, 0 }, /* 1 */ - { "encoding", required_argument, 0, 0 }, /* 2 */ - { "file", required_argument, 0, 0 }, /* 3 */ - { "help", no_argument, 0, 0 }, /* 4 */ - { "ignore", no_argument, 0, 0 }, /* 5 */ - { "key", required_argument, 0, 0 }, /* 6 */ - { "noencryption", no_argument, 0, 0 }, /* 7 */ - { "noignore", no_argument, 0, 0 }, /* 8 */ - { "readonly", no_argument, 0, 0 }, /* 9 */ - { "regex", no_argument, 0, 0 }, /* 10 */ - { "regular", no_argument, 0, 0 }, /* 11 */ - { "security", no_argument, 0, 0 }, /* 12 */ - { "testrun", required_argument, 0, 0 }, /* 13 */ - { "version", no_argument, 0, 0 }, /* 14 */ + { "debuglevel", optional_argument, 0, 0 }, /* 2 */ + { "encoding", required_argument, 0, 0 }, /* 3 */ + { "environment", no_argument, 0, 0 }, /* 4 */ + { "file", required_argument, 0, 0 }, /* 5 */ + { "help", no_argument, 0, 0 }, /* 6 */ + { "ignore", no_argument, 0, 0 }, /* 7 */ + { "key", required_argument, 0, 0 }, /* 8 */ + { "noencryption", no_argument, 0, 0 }, /* 9 */ + { "noignore", no_argument, 0, 0 }, /* 10 */ + { "readonly", no_argument, 0, 0 }, /* 11 */ + { "regex", no_argument, 0, 0 }, /* 12 */ + { "regular", no_argument, 0, 0 }, /* 13 */ + { "security", no_argument, 0, 0 }, /* 14 */ + { "testrun", optional_argument, 0, 0 }, /* 15 */ + { "version", no_argument, 0, 0 }, /* 16 */ { 0, 0, 0, 0 } }; @@ -196,19 +207,25 @@ int getOptions(int argc, char **argv) case 1: /* configtest */ config -> configtest = 1; break; - case 2: /* encoding */ + case 2: /* debuglevel */ + code = 'd'; + break; + case 3: /* encoding */ code = 'e'; break; - case 3: /* file */ + case 4: /* environment */ + config -> environtmentlist = 1; + break; + case 5: /* file */ code = 'f'; break; - case 4: /* help */ + case 6: /* help */ code = 'h'; break; - case 5: /* ignore */ + case 7: /* ignore */ code = 'i'; break; - case 6: /* key */ + case 8: /* key */ if (!runtime -> commandlinekeys) { /* if we find the first key on the commandline, we * free the list and start collecting those keys @@ -219,28 +236,28 @@ int getOptions(int argc, char **argv) config -> defaultkeys = listAdd(config -> defaultkeys, optarg); break; - case 7: /* noencryption */ + case 9: /* noencryption */ config -> encryptdata = 0; break; - case 8: /* noignore */ + case 10: /* noignore */ runtime -> casesensitive = 1; break; - case 9: /* readonly */ + case 11: /* readonly */ config -> readonly = 1; break; - case 10: /* regex */ + case 12: /* regex */ code = 'r'; break; - case 11: /* regular */ + case 13: /* regular */ runtime -> searchtype = SEARCH_REGULAR; break; - case 12: /* security */ + case 14: /* security */ code = 's'; break; - case 14: /* version */ + case 16: /* version */ config -> version = 1; break; - case 13: /* testrun */ + case 15: /* testrun */ #ifdef TEST_OPTION if (!optarg) { @@ -301,6 +318,28 @@ int getOptions(int argc, char **argv) strStrncpy(config -> rcfile, optarg, strlen(optarg) + 1); } break; + case 'd': + if (!optarg) + { config -> debuglevel = 1; } + else if (strlen(optarg) > 3) + { + fprintf(stderr, + _("error: --debuglevel argument too long.\n")); + error = 1; + } + else + { + /* Flawfinder: ignore */ + config -> debuglevel = atoi(optarg); + if (config -> debuglevel < 0 || + config -> debuglevel > 999) + { + fprintf(stderr, + _("error: --debuglevel must be 0-999.\n")); + error = 1; + } + } + break; case 'e': if (!optarg) { @@ -411,12 +450,18 @@ int getOptions(int argc, char **argv) */ void showHelp(void) { + TRACE(99, "showHelp()", NULL); + printf(_("usage: cpm [--config FILE] [--help] [PATH] ...\n")); printf(_(" --config, -c configuration file to use [~/%s]\n"), DEFAULT_RC_FILE); printf(_(" --configtest verify the configuration file and exit\n")); +#ifdef TRACE_DEBUG + printf(_(" --debuglevel debuglevel (0=off, 1 - 999)\n")); +#endif printf(_(" --encoding, -e the encoding in which keyboard input arrives [%s]\n"), DEFAULT_ENCODING); + printf(_(" --environment list the environment after cleanup\n")); printf(_(" --file, -f database file to use [~/%s]\n"), DEFAULT_DB_FILE); printf(_(" --help, -h display this help\n")); @@ -455,7 +500,26 @@ void showHelp(void) */ void showVersion(void) { - printf("%s\n", PACKAGE_STRING); + TRACE(99, "showVersion()", NULL); + +#ifdef __linux__ +/* we just want to make 32- and 64-bit systems visible */ +#ifdef __WORDSIZE + #define CPM_WORDSIZE __WORDSIZE +#elif _MIPS_SZPTR + #define CPM_WORDSIZE _MIPS_SZPTR +#elif _LP64 + #define CPM_WORDSIZE 64 +#else + #define CPM_WORDSIZE 32 +#endif + + printf("%s (%d bit)\n", PACKAGE_STRING, CPM_WORDSIZE); +#elif __sun__ + printf("%s (solaris)\n", PACKAGE_STRING); +#else + printf("%s (unknown)\n", PACKAGE_STRING); +#endif #ifdef CDK_VERSION_H printf(_("CDK version %s.%s (%s).\n"), CDK_VERSION_MAJOR, @@ -469,8 +533,14 @@ void showVersion(void) #else printf(_("GpgME version %s.\n"), GPGME_VERSION); #endif - printf(_("ncurses version %s (%ld).\n"), +#ifdef HAVE_LIBNCURSESW + printf(_("ncursesw version %s (%d).\n"), + NCURSES_VERSION, NCURSES_VERSION_PATCH); +#endif +#ifdef HAVE_LIBNCURSES + printf(_("ncurses version %s (%d).\n"), NCURSES_VERSION, NCURSES_VERSION_PATCH); +#endif printf(_("XML2 version %s.\n"), LIBXML_DOTTED_VERSION); printf(_("zlib version %s.\n"), ZLIB_VERSION); #ifdef HAVE_CRACKLIB @@ -479,6 +549,8 @@ void showVersion(void) printf(_("cracklib is disabled.\n")); #endif printf(_("Written by Harry Brueckner .\n")); + +#undef CPM_WORDSIZE } diff --git a/options.h b/options.h index e4fb2a4..1f835ad 100644 --- a/options.h +++ b/options.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for options.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/patternparser.c b/patternparser.c index 97b43ce..15cfb89 100644 --- a/patternparser.c +++ b/patternparser.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for handling the pattern parsing for the search patterns. * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -26,6 +26,7 @@ */ #include "cpm.h" #include "configuration.h" +#include "general.h" #include "interface_xml.h" #include "listhandler.h" #include "memory.h" @@ -64,6 +65,8 @@ void freePatternparser(void) SEARCHPATTERN* next; int i; + TRACE(99, "freePatternparser()", NULL); + if (patterndata || resultdata) { for (i = 0; i < patterncount; i++) @@ -119,6 +122,8 @@ void freePatternparser(void) */ int getPatternResultString(int id, char** path, char** string) { + TRACE(99, "getPatternResultString()", NULL); + return getPatternString(resultdata[id], path, string); } @@ -136,6 +141,8 @@ int getPatternResultString(int id, char** path, char** string) */ int getPatternSearchString(int id, char** path, char** string) { + TRACE(99, "getPatternSearchString()", NULL); + return getPatternString(patterndata[id], path, string); } @@ -158,6 +165,8 @@ int getPatternString(SEARCHPATTERN* pattern, char** path, char** string) int maxlevel = listCount(path); char* concat; + TRACE(99, "getPatternString()", NULL); + *string = NULL; while (cpattern) { @@ -210,6 +219,8 @@ int getPatternString(SEARCHPATTERN* pattern, char** path, char** string) */ void initPatternparser(void) { + TRACE(99, "initPatternparser()", NULL); + patterndata = NULL; resultdata = NULL; patterncount = 0; @@ -236,6 +247,8 @@ int patternCreate(char* patternstring, SEARCHPATTERN* pattern) char* cbuffer; char* ptr; + TRACE(99, "patternCreate()", NULL); + if (!patternstring) return 1; @@ -401,6 +414,8 @@ void patternDump(SEARCHPATTERN* pattern) { SEARCHPATTERN* cur = pattern; + TRACE(99, "patternDump()", NULL); + printf("pattern"); while (cur) { @@ -436,6 +451,8 @@ int patternParse(void) int error = 0, i; + TRACE(99, "patternParse()", NULL); + patterncount = listCount(runtime -> searchpatterns); patterndata = memAlloc(__FILE__, __LINE__, sizeof(SEARCHPATTERN*) * patterncount); @@ -482,6 +499,8 @@ int patternTemplateId(char* template) int i, id; + TRACE(99, "patternTemplateId()", NULL); + /* first we look into the database templates */ id = xmlInterfaceTemplateGetId(template); if (id != -1) diff --git a/patternparser.h b/patternparser.h index fd2a9af..a0ab97b 100644 --- a/patternparser.h +++ b/patternparser.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for patternparser.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/po/de_DE.mo b/po/de_DE.mo index 7b55cf3d072fc36e7c5b9fb02f336f7b37639f2e..6f332e056e6fbbf8cddcd40afd8a2057fa80dd22 100644 GIT binary patch delta 6005 zcmaLZ33OD|9mnyTO)!8!3=o3AgBX&Sg#=D$)wp-6|>y?U7n-)gwnw^|asL%;lJJdVGifeD1yT=5GJ{ zURbszVbzX=$VX|(YYo>4;yhw(Cu4>u7&G@AwHlLqt}&A_52xTltiU}u3BR*eq#HAh z`f^nJ5gdW%_KMf5aS-*@sP^qR#+Zot8--#T2KP3m3TNR++=yy_1BYNzA7je#0@Oft zScp$z8GdNLPtP!BJoV`~99QEEd;xWT&%VZ#;5Zz?_+}x6t~5M~-Eb#r;1^I6`UZ#M z=uBe<;&rG2Z$WjmA4~BYWJM;oAG?M1n2f721>2F$H5;%qKA?8SH(Tuu+pW(ai#E?& z-$WK?{%%bqPifRMaU>RE7P{CSSE91F0SDj~)PxRVDt=}C0V7>#=+xil3LWazr~$4+ zb$BC^PIDVF2lF6afcuc_nUkpd{)6XZcSaqIrKla7gTrt!>I`f}vSD5w!2YY@uQX@{ zow!@M&PR1ri%iliMh$!?>WAA=_aDO1_yw~2Cf6~BY?+Ht3%DA!z!uEM8!#KUpvF1k zMB+30mIig)huLVQ#i$ilq6TU~t>{iv2fM5vT9f#)hW0!x!bPZlHlu@kP$~ETb+%II z^g=9)P|()2B8xCvP&0c4b?E+yxj2yR&n3C@^Bfl7G31}=MsLj3l%jrrIjX`MK%I%++^mTXv(7{f z)Pgz#%aL2nT6A!q_2ZZkT9}Ro7=${_(A)DeRB@*)SuD$-g?Nra?alpjNmN6Y*i}fsdlT z-;H|ZzJYqTCsR?!<)||-0kz_5QTMOJp7;>5X!A7kQ*#_Ok@R8gzj9i@5!JwD$Yjk- z?19TL4cA~N+>A;11d?vE12w==9GgHYu#$RyY5cF`LevgEi4*Y~TQ3_C|0C8Gp-{~i zFQabk!C#gNycD_Dtg-cjIGK71FMO?FI*!4cQ1|b_a{LY*ETN+NYjFl{ME&k0R$=C- z_TS}eea+qas?{q>rsd70J1i7 z9GRQx%iC%a&crEt{?}2^3*=+$f@jf-wmJ=!+f3Bq%ChZ6w!I9`qJ13p!7A*H*I*{L zVqd%i&%>>#i5^59Vy(6>m@CxL7m^SQ+kE15=to21?uI4q=Q_yu>{Jk+0 zwKJ9253jT?Lb7Mp*zXTvcj_NueuTo8Dq!aL_`A6Z^@Dk+m94`J+=hA&97JvDKTsW3e<{sp?2gg)I>i=vS!ZVB&wfkjA)De6w+`7YQ=Y>I@*GI8s0?>(1{b8 zg{A1=<*1b|MeW#H)b9>re>{bH9Meg74pyL2?cy9|?14#DlH9eNk_n0Dh)P=Dpfp))S({jqH_`>z{6r6C71 z_*SVHkNSZRHL(q-?{}gGIEn)?iD!2(W?>#y;Q(yGT)Z8#a5rjaj-vYSGBy4}8X2LG zO@oX2;jPH7nXRZp`6a3&{g+pdPabMVJm}y$)Xwa}3-Ei?1kbODPk0*UQ4e80-iu1< zA=G`5?p8;;tM8q^D8xiyN)@d?z9^qvtv?IoxIs!)ft1vS7*?1InQ`b&5| z^>0xV$-Fq$f5cQ#D5POAYKu3cw(KyfgRk%${Ly~j^^*8XOHnzThnhe;YA5%icI-H6 zqFrak--J1+`vR!PcLV0@`G1E3FFli38$U#2Q9ICTeGE0BPf$5enH7ILv$2HwTr9%X zNVd#g9EP1QjrThSm6}#m>h4D^>}?#t_~sJ|+5s~=ZV`5-Iv4eLxv2NRGAzIisK@qY z)C!MbGX5L&+?&hdXQ@AGrDJhCE=Bdb2enfNFrt~Aq@aP)c_@2gF%HFvI2?nhfgVB4 zd_O9ehp`yH#x%^jJpOmR3_DSuiiuc@x_>sR|29m(r}X~Ubp`QAtQ7zFwJpDmb;M#@ zS7(j3tci5IMp7y3&~TKp7I!C6P5gp5NOZgo+3{m-kMg;j@Y*}>!O_HeLeKbi;(B5O zp-X4t1LAgq4K!rY+(IlRJj5tM2T_mb7DAU^cDfc2O3gT}pYs>X%M&<}=t}6s>smxy z6Dx6mtm(MJmYY#qy_~qowuwIzy=?uL);G~5t|RUy4iJ&Q@Nq4n>q&yA%si|LmvWU9 zEB*BG48@hUs+?a${E5gR^g zMLbSq6S~F_yn{_#$5|t#>ozaTI=fEP$)YTEzLNYJlISKhu!9uu-D({ zgab~<4byS6m!1Qoo$PvN!Nhh?MSirpe{Et;k<;up2ZBo-U!ZP5fm7ES4BC4NoMz7w zTTYFxADESpQaR(&%G&5bXJ2B(GvDW`bFaTH=z2nwne`c?nA!f*w`mS%tgFMft^WW2 zy}P8vtqZ&Ljz19gguMa3Q|}3T_@NuUFYBhH{%lE*oyyH~f^JJ7s5?D=#|;Jp!J^b? zznlpPiR?*3Zb?GwPkCtHpEn@mr>fK3%AU`6o#H~061_FgliaU9uPD{{*^7`HTI?)x zgCUKb9ddHBqhA!>lh|!kVR30;@o=Yj)acUk=(^%A$v>NRPiv?{+BcL=D(jeE$C==7 zbG?l&hb8FDZf@iNkvYGou8EdrXQCT)y?(y;x6kXq>gxlH^D*CloR`l;v6FU}cej8tV zS{rP-qn?V-5=*9gmJ~VDFrKU*PITGoRN^@wW%O2v9rQ)ciH;rz?x|(KYL^r%v_iFU$q`&tpET3 delta 4926 zcmYk<3v|x+9mnzS^CaRDiMS+)M4lv4*IW@P5kVwrrLJXdr!?vz$RZM2m+C`ZT4Ri~ zE=6gv8m;27TI;r=7%jS0*f~A4XFW4=wzYK5#>or4}$XD%LJnOFxZ*W6D3}HI@K^*qQd}OjV zA6ac%hZ^}l)XYv|cf5!xcpueKBBRn_D@L_D4K=~VsP;FYCU7Jn;Qa79H`G8QpJR6{ z;d&(MEWCwk;4<>ZZt<6vJe*#1XnSKGPR1Wn4OYZn}j8u*+56^&$v zd*ck|a(&0W&S1D|U>s^Di?K6qMh*BBs-s(|cABxiEP|z?mbk=qD)Psc@mCMrgK9T$ zl?uPLpHK}X)2bRQM9pL}w#1F7GqDFXgIY|(pOBwg8m(zXMx(ZD0qT@*KppN6P+NEg zwdLO+0}a>%D(WDPX=!iMP#p|JA5L>!;rbq`;m=Wr^IK$f?Vfub$B#9kEL6K=(T8QO z%TeFojmdicKXX6$&i$Yz)8IT>Pt@Zy67@11hiZ5lGHF|dYUm(p1!_?9u)>}$$VQ44@GUkO!VOz)KVWneeWCBrflS3t}{`e&qnR- z4*t?set~N52W*D1ybhx<1+^8~7@#d1L8S@4gxag6$m`p-pc>eZn%Ncf;%!tz|3)ibtvTl0My>rWdN!usej%0vxdA~wZ&sE(H)e{3s% zspE^Nv+^}I#yc2-_mRc4pHLliqtRRs!697FWt9E#IBMk{WU~H)s0`$&>&6lsif8dL zY{PVPe?01k?_e+d+P#kEqKNC!*bg^h4qibYM)BU&=b1PR=b|Qh77Ove0V;al^LfkU z;{w!+4D7e5kD)jXFC4q-ooVe8nzf0Y*IP{4+iZ zdGIW-iAp$?6R4%UfZDrS)S6j*%r&j=2(Urz--rrsFhlQI^Ab68tbqPdibyd#<*r7i)X`7 zpD)E0_$F$lcGt`P*HY2x^s zZbc?(Cs6G?K&?#D0O#=LVsrYp;Z)SnIOO2k3RDM&F&Y1kK5U-v%rF)8{l_pK=b$FA z4m;y<)ZX5}pJ5~iNr!nd#^OFq#Pb+XNB^LrLlw)TK-Gq$uGgSCIE_C17PSJ6cqG(8 z9%^O$sK;&-s=d=#jCYU+#d0}$`d%e!0KY*E^pgViUk%;lMgm6hkS1XU>J>Q}JK_S= z3^!vkeu`Rwo2b2PSLpn=UIC_XU4{DH24oC&2svzaAJt9-&!nD;?4p1((+Y0*xUn6z z0;f*>PHQ<2DMU$F&wXBB-WumzlU8h zkW}I>)AM^2_s0PzVIV+Td8qj!D2g|V~?!j=-}X>xjK|T7XHY*lhw9*8=s^`VyrjOyV}w33jT|L! zk{zU>yg+3ld68t1cZdeSylf8HNYsD*0h0}7ER|2lXYP$bs6+XCvXopRD%x)q9jK4$ zYtBll`aJnHIZVDFdx_qXTG1(F4OyZ7^@dW>jNc_EiI#UT(SfWXD#heW@&?hWRFlo* z8S)C5PZkoDUyxd&RXt4_3TM<_b1yi2_PXZJcG-E7PgL^A8R93~Nkb{1qLbcGUZ%p% z*lPEN_OuyUPWF%w$ZQfMDo>LwWC0mZ_K_o6f1T=Cq>LOQDwj!*`kM2Ph7Q>zr4Om6Otk?gv)77eB{PxBfQnBs0hfvWqm758cY#h8x)3 ztq;e~$pP|9GM&6c9w)1airytE%^d>vDwX5TMg9MBxz&0W^Y@eFIr0`!8Ake&q2yOY zWvYYy4)waObg#vyWCF=1QKUafAS!=!&cE~j?;D(Z_0RZZ>VI;t|KR#8o+Fb;G+9L6 zBm2obqB4YRBYj8+Q5i#alVn{`!bk=AEg2BtueKzf93<;V61hNB&XNd{Nm`JG(vM0J z8AqOSZ;rrR(uSNOYI`7QD95P8xEB{Oh3HV%mqOQ%G1aYKajn9cWSM)Nh>w!>q$#Oc z)FwLEzjd9r=INNC;MJH*-r&jhe+%{aYTnQ99=zLels8zNnBa*ht(fbZF{{j9<(uxG z8(g1s%p3eTWkX1CX4e6pX1VEu@=~gE69?r54|L1)1k-zr3H6i*w`OeiMr5aE^hwRk z@@3@o?b$0>+%r6so+4}3_DQR`8WS08o^#t9OzfA^sAfWbY-IV}>gUV+6}}f|l$ZM} zYR2d11o!6O@CMHeF7UMUPp$C#N-HM$tNgwvORH!3gHc18gakJhKNlMGJ+aZ#YRJ@z gSyiP|d=CxhpF diff --git a/po/de_DE.po b/po/de_DE.po index db8f127..341ea5d 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -1,5 +1,5 @@ # This is the German translation for cpm. -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # This file is distributed under the same license as the cpm package. # Harry Brueckner , 2005. # @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: cpm 0.4beta\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-07-12 08:34+0200\n" +"POT-Creation-Date: 2009-04-03 09:48+0200\n" "PO-Revision-Date: 2005-04-20 14:19+001\n" "Last-Translator: Harry Brueckner \n" "Language-Team: de_DE \n" @@ -16,50 +16,49 @@ msgstr "" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: cpm.c:87 +#: cpm.c:117 #, c-format msgid "Tree support not compiled in to libxml2 %s\n" msgstr "Baum support ist nicht in libxml2 %s eincompiliert\n" -#: cpm.c:117 +#: cpm.c:147 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Versuchen Sie `%s --help' für weitere Informationen.\n" -#: cpm.c:176 +#: cpm.c:211 #, c-format msgid "configuration ok.\n" msgstr "Konfigurationsdatei ok.\n" -#: cpm.c:193 +#: cpm.c:233 msgid "Maximum security level not reached." msgstr "Die maximale Sicherheitsstufe ist nicht aktiv." -#: cpm.c:194 +#: cpm.c:234 msgid "Are you sure you want to continue?" msgstr "Sind Sie sicher, daß Sie fortfahren wollen?" -#: cpm.c:195 -msgid "Press CTRL+C to stop now or any other key to continue." -msgstr "" -"Drücken Sie STRG+C um abzubrechen oder eine andere Taste um fortzufahren." +#: cpm.c:235 +msgid "Press CTRL+C to stop now or ENTER to continue." +msgstr "Drücken Sie STRG+C um abzubrechen oder ENTER um fortzufahren." -#: cpm.c:226 +#: cpm.c:266 #, c-format msgid "error: memory leak detected.\n" msgstr "Fehler: Es wurde ein Speicherleck enteckt.\n" -#: cpm.c:229 +#: cpm.c:269 #, c-format msgid "%ld byte of memory were not freed.\n" msgstr "%ld Byte Speicher wurden nicht freigegeben.\n" -#: cpm.c:235 +#: cpm.c:275 #, c-format msgid "%ld byte of memory were freed without being allocated.\n" msgstr "%ld Byte Speicher wurden freigegeben aber nicht belegt.\n" -#: cpm.c:239 +#: cpm.c:279 #, c-format msgid "" "Please send a report about this problem to Harry Brueckner .\n" @@ -67,142 +66,142 @@ msgstr "" "Bitte senden Sie einen Bericht über dieses Problem an Harry Brueckner " ".\n" -#: general.c:79 +#: general.c:120 #, c-format msgid "error %d (%s) removing file '%s'." msgstr "Fehler %d (%s) beim Löschen der Datei '%s'." -#: general.c:83 general.c:126 general.c:143 xml.c:249 xml.c:380 xml.c:404 -#: xml.c:514 xml.c:531 +#: general.c:124 general.c:167 general.c:184 xml.c:257 xml.c:388 xml.c:412 +#: xml.c:522 xml.c:539 msgid "file error" msgstr "Dateifehler" -#: general.c:139 xml.c:527 +#: general.c:180 xml.c:535 #, c-format msgid "error %d (%s) writing file '%s'." msgstr "Fehler %d (%s) beim Schreiben der Datei '%s'." -#: general.c:372 +#: general.c:432 #, c-format msgid "error %d (%s) opening file '%s'." msgstr "Fehler %d (%s) beim Öffnen von '%s'." -#: general.c:385 +#: general.c:445 #, c-format msgid "error %d (%s) seeking in file '%s'." msgstr "Fehler %d (%s) beim Positionieren in Datei '%s'." -#: general.c:412 +#: general.c:472 #, c-format msgid "could not exclusively open '%s'." msgstr "Datei '%s' konnte nicht exklusiv geöffnet werden." -#: general.c:421 +#: general.c:481 #, c-format msgid "error %d (%s) locking file '%s'." msgstr "Fehler %d (%s) beim exklusiven Öffnen von '%s'." -#: gpg.c:114 +#: gpg.c:119 #, c-format msgid "signature could not be created" msgstr "Signatur konnte nicht erstellt werden" -#: gpg.c:120 +#: gpg.c:125 #, c-format msgid "Invalid signer found: %s" msgstr "Ungütiger Signierer gefunden: %s" -#: gpg.c:149 +#: gpg.c:154 #, c-format msgid "Unexpected number of signatures created" msgstr "Unerwartete Anzahl Signaturen generiert" -#: gpg.c:155 +#: gpg.c:160 #, c-format msgid "Wrong type of signature created" msgstr "Falscher Signaturtyp generiert" -#: gpg.c:162 +#: gpg.c:167 #, c-format msgid "Wrong pubkey algorithm reported: %i" msgstr "Ungütiger Public-Key Algorithmus gefunden: %i" -#: gpg.c:218 +#: gpg.c:223 #, c-format msgid "Wrong hash algorithm reported: %i (%s)" msgstr "Ungütiger Hashalgorithmus gemeldet: %i (%s)" -#: gpg.c:226 +#: gpg.c:231 #, c-format msgid "Wrong signature class reported: %u" msgstr "Ungültige Signaturklasse gefunden: %u" -#: gpg.c:232 gpg.c:343 gpg.c:552 gpg.c:585 gpg.c:628 gpg.c:758 gpg.c:791 -#: gpg.c:954 +#: gpg.c:237 gpg.c:350 gpg.c:565 gpg.c:598 gpg.c:641 gpg.c:773 gpg.c:806 +#: gpg.c:975 msgid "GpgMe error" msgstr "GpgMe Fehler" -#: gpg.c:263 +#: gpg.c:270 #, c-format msgid "no signature result found" msgstr "Kein Signaturergebnis gefunden" -#: gpg.c:273 +#: gpg.c:280 #, c-format msgid "Unexpected number of signatures found" msgstr "Unerwartete Anzahl Signaturen gefunden" -#: gpg.c:280 +#: gpg.c:287 #, c-format msgid "Unexpected signature summary: 0x%x" msgstr "Unerwartetes Signatursummary: 0x%x" -#: gpg.c:287 +#: gpg.c:294 #, c-format msgid "Unexpected signature status: %s" msgstr "Unerwarteter Signaturstatus: %s" -#: gpg.c:294 +#: gpg.c:301 #, c-format msgid "Unexpected notation data" msgstr "Unerwartete Notationsdaten" -#: gpg.c:300 +#: gpg.c:307 #, c-format msgid "Unexpectedly wrong key usage" msgstr "Unerwartete ungültige Schlüsselbenutzung" -#: gpg.c:330 +#: gpg.c:337 #, c-format msgid "Unexpected validity: %i (%s)" msgstr "Unerwartete Validität: %i (%s)" -#: gpg.c:337 +#: gpg.c:344 #, c-format msgid "Unexpected validity reason: %s" msgstr "Unerwarteter Gültigkeitsbereich Grund: %s" -#: gpg.c:583 +#: gpg.c:596 #, c-format msgid "unsupported algorithm: %s\n" msgstr "Nicht unterstützter Algorithmus: %s\n" -#: gpg.c:756 +#: gpg.c:771 #, c-format msgid "Invalid recipient encountered: %s" msgstr "Auf falschen Empfänger gestoßen: %s" -#: gpg.c:953 +#: gpg.c:974 #, c-format msgid "unknown recipient id %s" msgstr "Unbekannte Empfänger-ID %s" -#: gpg.c:1260 +#: gpg.c:1295 #, c-format msgid "GpgMe error: invalid library version (%s).\n" msgstr "GpgMe Fehler: ungültige Library Version (%s).\n" -#: interface_cli.c:77 +#: interface_cli.c:81 #, c-format msgid "" "enter your passphrase (try #%d)\n" @@ -211,78 +210,78 @@ msgstr "" "Geben Sie Ihre Passphrase ein (Versuch #%d)\n" "%s\n" -#: interface_cli.c:154 interface_cli.c:162 interface_cli.c:191 +#: interface_cli.c:164 interface_cli.c:174 interface_cli.c:205 #, c-format msgid "error: %s\n" msgstr "Fehler: %s\n" -#: interface_cli.c:155 interface_gui.c:2080 +#: interface_cli.c:165 interface_gui.c:2257 msgid "failed to initialize the character encoding." msgstr "Die Zeichenkonvertierung kann nicht initialisiert werden." -#: interface_cli.c:205 +#: interface_cli.c:219 #, c-format msgid "error: no searchpattern given.\n" msgstr "Fehler: Kein Suchmuster angegeben.\n" -#: interface_cli.c:271 +#: interface_cli.c:285 #, c-format msgid "no match found.\n" msgstr "Kein Suchergebnis gefunden.\n" -#: interface_cli.c:274 +#: interface_cli.c:288 #, c-format msgid "1 match found.\n" msgstr "1 Suchergebnis gefunden.\n" -#: interface_cli.c:277 +#: interface_cli.c:291 #, c-format msgid "%d matches found.\n" msgstr "%d Suchergebnisse gefunden.\n" -#: interface_cli.c:299 +#: interface_cli.c:315 #, c-format msgid "error: %s %s\n" msgstr "Fehler: %s %s\n" -#: interface_gui.c:274 +#: interface_gui.c:302 #, c-format msgid "t-error: %s (%d)\n" msgstr "t-error: %s (%d)\n" -#: interface_gui.c:309 +#: interface_gui.c:339 msgid " Help" msgstr " Hilfe" -#: interface_gui.c:316 +#: interface_gui.c:348 msgid " Add" msgstr " Hinzufügen" -#: interface_gui.c:323 +#: interface_gui.c:355 msgid " Edit" msgstr " Ändern" -#: interface_gui.c:330 +#: interface_gui.c:362 msgid " Comment" msgstr " Kommentar" -#: interface_gui.c:337 +#: interface_gui.c:370 msgid " Choose" msgstr " Auswahl" -#: interface_gui.c:345 +#: interface_gui.c:378 msgid " Exit" msgstr " Beenden" -#: interface_gui.c:347 +#: interface_gui.c:380 msgid " Back" msgstr " Zurück" -#: interface_gui.c:435 +#: interface_gui.c:472 msgid "password" msgstr "Passwort" -#: interface_gui.c:568 +#: interface_gui.c:617 #, c-format msgid "" "enter your passphrase (try #%d)\n" @@ -291,283 +290,283 @@ msgstr "" "Geben Sie Ihre Passphrase ein (Versuch #%d)\n" "%s" -#: interface_gui.c:578 interface_gui.c:634 interface_gui.c:711 -#: interface_gui.c:911 interface_gui.c:989 interface_gui.c:1076 -#: interface_gui.c:1353 interface_gui.c:1436 interface_gui.c:1494 -#: interface_gui.c:1602 +#: interface_gui.c:627 interface_gui.c:684 interface_gui.c:769 +#: interface_gui.c:980 interface_gui.c:1059 interface_gui.c:1154 +#: interface_gui.c:1435 interface_gui.c:1520 interface_gui.c:1582 +#: interface_gui.c:1696 msgid "can not create dialog." msgstr "Der Dialog kann nicht erstellt werden." -#: interface_gui.c:628 +#: interface_gui.c:678 msgid "add a new encryption key" msgstr "Neuen Schlüssel hinzufügen" -#: interface_gui.c:646 interface_gui.c:1001 +#: interface_gui.c:696 interface_gui.c:1071 msgid "The key you entered could not be validated." msgstr "Der angegebene Schlüssel kann nicht validiert werden." -#: interface_gui.c:695 +#: interface_gui.c:753 #, c-format msgid "add new %s" msgstr "%s hinzufügen" -#: interface_gui.c:731 interface_gui.c:1123 +#: interface_gui.c:789 interface_gui.c:1200 msgid "The password you have chosen is unsuitable." msgstr "Das eingegebene Passwort ist nicht geeignet." -#: interface_gui.c:794 -msgid "Are you sure you want to delete the encryption key " +#: interface_gui.c:853 +msgid "Are you sure you want to delete the encryption key" msgstr "Sind Sie sicher, dass Sie den Schlüssel löschen wollen" -#: interface_gui.c:846 +#: interface_gui.c:913 msgid "Are you sure you want to delete" -msgstr "Sind Sie sicher, dass Sie löschen wollen" +msgstr "Wollen Sie den Datensatz" -#: interface_gui.c:848 +#: interface_gui.c:915 #, c-format -msgid "entry %s?" -msgstr "Eintrag %s?" +msgid "entry %s?" +msgstr "%s löschen?" -#: interface_gui.c:905 +#: interface_gui.c:974 msgid "edit comment" msgstr "Kommentar editieren" -#: interface_gui.c:983 +#: interface_gui.c:1053 msgid "edit encryption key" msgstr "Schlüssel editieren" -#: interface_gui.c:1060 +#: interface_gui.c:1138 #, c-format msgid "edit %s" msgstr "%s editieren" -#: interface_gui.c:1082 +#: interface_gui.c:1160 msgid "If it looks like the program is stuck" msgstr "Falls es so aussieht, als ob das Programm still" -#: interface_gui.c:1083 +#: interface_gui.c:1161 msgid "move the mouse to create more entropy" msgstr "steht, bewegen Sie die Maus um mehr Entropie" -#: interface_gui.c:1084 +#: interface_gui.c:1162 msgid "for the random generator." msgstr "für den Zufallszahlengenerator zu generieren." -#: interface_gui.c:1089 +#: interface_gui.c:1167 msgid "can not create randombox." msgstr "Die Randombox kann nicht erstellt werden." -#: interface_gui.c:1191 +#: interface_gui.c:1269 msgid "Keys to encrypt the database with" msgstr "Schlüssel zum Verschlüsseln der Datenbank" -#: interface_gui.c:1195 +#: interface_gui.c:1273 msgid "can not create scroll list." msgstr "Die Scrollliste kann nicht erstellt werden." -#: interface_gui.c:1268 +#: interface_gui.c:1346 msgid " ^A - add a new node to the current one." msgstr " ^A - Zum aktuellen Node einen neuen hinzufügen." -#: interface_gui.c:1269 +#: interface_gui.c:1347 msgid " ^D - delete the currently selected node and all its subnodes." msgstr " ^D - den selektieren Node und alle Subnotes löschen." -#: interface_gui.c:1270 +#: interface_gui.c:1348 msgid " ^E - edit the currently selected node." msgstr " ^E - den selektierten Node ändern." -#: interface_gui.c:1271 +#: interface_gui.c:1349 msgid " ^H - this help screen." msgstr " ^H - diese Hilfeseite." -#: interface_gui.c:1272 +#: interface_gui.c:1350 msgid " ^K - edit the currently used encryption keys." msgstr " ^K - die aktuell benutzten Schlüssel ändern." -#: interface_gui.c:1273 +#: interface_gui.c:1351 msgid " ^N - edit the name of the current level." msgstr " ^N - den namen des aktuellen Templates ändern." -#: interface_gui.c:1274 +#: interface_gui.c:1352 msgid " ^O - edit the comment of the selected node." msgstr " ^O - den Kommentar zum aktuell selektierten Eintrag ändern." -#: interface_gui.c:1275 +#: interface_gui.c:1353 msgid " (use \\n to add line breaks)" msgstr " (benutzen Sie \\n um Zeilenumbrüche einzufügen)" -#: interface_gui.c:1276 +#: interface_gui.c:1354 msgid " ^P - edit the current node and suggest a password." msgstr "" " ^P - den aktuellen Eintrag ändern und ein Passwort vorschlagen." -#: interface_gui.c:1277 +#: interface_gui.c:1355 msgid " ^W - Write the database to disk." msgstr " ^W - Speichern der Datenbank." -#: interface_gui.c:1312 +#: interface_gui.c:1392 msgid "Ok" msgstr "Ok" -#: interface_gui.c:1430 +#: interface_gui.c:1514 msgid "template name" msgstr "Templatename" -#: interface_gui.c:1482 interface_gui.c:1589 +#: interface_gui.c:1568 interface_gui.c:1681 msgid "Yes" msgstr "Ja" -#: interface_gui.c:1483 interface_gui.c:1590 +#: interface_gui.c:1569 interface_gui.c:1682 msgid "No" msgstr "Nein" -#: interface_gui.c:1536 interface_gui.c:2054 +#: interface_gui.c:1625 interface_gui.c:2231 msgid "Error encrypting the data." msgstr "Fehler beim Verschlüsseln der Daten." -#: interface_gui.c:1537 interface_gui.c:2055 +#: interface_gui.c:1626 interface_gui.c:2232 msgid "You did not specify any encryption keys." msgstr "Sie haben keinen Schlüssel zum Verschlüsseln angegeben." -#: interface_gui.c:1538 +#: interface_gui.c:1627 msgid "The database has been written to disk." msgstr "Die Datenbank wurde gespeichert." -#: interface_gui.c:1591 +#: interface_gui.c:1683 msgid "Cancel" msgstr "Abbrechen" -#: interface_gui.c:1719 +#: interface_gui.c:1890 #, c-format msgid " modified by %s" msgstr "Modifiziert von %s" -#: interface_gui.c:1721 +#: interface_gui.c:1892 #, c-format msgid " modified on %s" msgstr "Modifiziert am %s" -#: interface_gui.c:1726 +#: interface_gui.c:1897 #, c-format msgid " created by %s" msgstr "Erstellt von %s" -#: interface_gui.c:1728 +#: interface_gui.c:1899 #, c-format msgid " created on %s" msgstr "Erstellt am %s" -#: interface_gui.c:1790 +#: interface_gui.c:1963 msgid "can not create infobox." msgstr "Die Infobox kann nicht erstellt werden." -#: interface_gui.c:1845 +#: interface_gui.c:2018 msgid "can not create alpha list." msgstr "Die Alphaliste kann nicht erstellt werden." -#: interface_gui.c:2056 +#: interface_gui.c:2233 msgid "Quit without saving?" msgstr "Beenden ohne zu speichern?" -#: interface_gui.c:2057 +#: interface_gui.c:2234 msgid "The database file could not be opened exclusively." msgstr "Die Datenbank konnte nicht exclusiv geöffnet werden." -#: interface_gui.c:2058 +#: interface_gui.c:2235 msgid "The file is opened in read-only mode and" msgstr "Die Datei wurde read-only geöffnet und" -#: interface_gui.c:2059 +#: interface_gui.c:2236 msgid "you can not modify any data at the moment." msgstr "Sie können keine Daten modifizieren." -#: interface_gui.c:2060 +#: interface_gui.c:2237 msgid "warning" msgstr "Warnung" -#: interface_gui.c:2061 +#: interface_gui.c:2238 msgid "You did not specify any of your secret keys to" msgstr "Sie haben keinen Ihrer Secret-Keys zum Verschlüsseln" -#: interface_gui.c:2062 +#: interface_gui.c:2239 msgid "encrypt the database." msgstr "der Datenbank angegeben." -#: interface_gui.c:2063 +#: interface_gui.c:2240 msgid "You won't be able to read this file yourself!" msgstr "Sie werden die Datei selbst nicht mehr lesen können!" -#: interface_gui.c:2064 +#: interface_gui.c:2241 msgid "Do you want to continue?" msgstr "Wollen Sie fortfahren?" -#: interface_gui.c:2065 +#: interface_gui.c:2242 msgid "The lockfile could not be removed." msgstr "Das Lockfile konnte nicht gelöscht werden." -#: interface_gui.c:2066 +#: interface_gui.c:2243 msgid "You will have to manually remove it." msgstr "Sie müssen es manuell entfernen." -#: interface_gui.c:2067 +#: interface_gui.c:2244 msgid "Do you really want to quit?" msgstr "Wollen Sie wirklich beenden?" -#: interface_gui.c:2068 +#: interface_gui.c:2245 msgid "The database file is read-only." msgstr "Die Datenbank ist nur lesbar." -#: interface_gui.c:2069 +#: interface_gui.c:2246 msgid "You can not modify any data at the moment." msgstr "Sie können im Moment keine Daten ändern." -#: interface_gui.c:2070 +#: interface_gui.c:2247 msgid "A lockfile exists for this database." msgstr "Ein Lockfile existiert für diese Datenbank." -#: interface_gui.c:2071 +#: interface_gui.c:2248 msgid "Do you want to remove the lockfile?" msgstr "Wollen Sie das Lockfile entfernen?" -#: interface_gui.c:2072 +#: interface_gui.c:2249 msgid "The database was updated to the latest version." msgstr "Die Datenbank wurde auf die neuste Version aktualisiert." -#: interface_gui.c:2075 +#: interface_gui.c:2252 msgid "can not initialize the screen." msgstr "Der Bildschirm kann nicht initialisiert werden." -#: interface_gui.c:2087 +#: interface_gui.c:2264 msgid "file read error." msgstr "Fehler beim Lesen einer Datei." -#: interface_gui.c:2182 +#: interface_gui.c:2359 msgid "Data has been modified" msgstr "Daten wurden modifiziert" -#: interface_gui.c:2183 +#: interface_gui.c:2360 msgid "Do you want to save the database encrypted for these keys?" msgstr "Wollen Sie die Daten für folgende Schlüssel verschlüsseln?" -#: interface_keys.c:183 +#: interface_keys.c:197 #, c-format msgid "error: encryption key %s could not be validated; not using it.\n" msgstr "" "Fehler: Schlüssel %s konnte nicht validiert werden; wird übersprungen.\n" -#: interface_utf8.c:86 +#: interface_utf8.c:89 #, c-format msgid "conversion failed for string '%s' (%d).\n" msgstr "Konvertieren der Zeichenfolge '%s' (%d) schlug fehl.\n" -#: interface_xml.c:104 interface_xml.c:171 interface_xml.c:211 -#: interface_xml.c:427 interface_xml.c:820 interface_xml.c:975 +#: interface_xml.c:107 interface_xml.c:177 interface_xml.c:219 +#: interface_xml.c:456 interface_xml.c:875 interface_xml.c:1046 #, c-format msgid "XML error: can not create XML structure (line %d)." msgstr "XML Fehler: die XML-Struktur kann nicht angelegt werden (Zeile %d)." -#: interface_xml.c:887 +#: interface_xml.c:945 #, c-format msgid "level %d" msgstr "Stufe %d" @@ -582,105 +581,125 @@ msgstr "out of memory error - es wurde versucht %d Byte zu belegen.\n" msgid "out of memory error - tried to reallocate %d byte.\n" msgstr "out of memory error - es wurde versucht %d Byte neu zu belegen.\n" -#: options.c:248 +#: options.c:265 #, c-format msgid "error: no argument given for --testrun.\n" msgstr "Fehler: Es wurde kein Argument für --testrun angegeben.\n" -#: options.c:256 +#: options.c:273 #, c-format msgid "error: --testrun argument too long.\n" msgstr "Fehler: --testrun Argument ist zu lang.\n" -#: options.c:269 +#: options.c:286 #, c-format msgid "error: the program was not compiled with the -DTEST_OPTION option.\n" msgstr "" "Fehler: Das Programm wurde nicht mit der Option -DTEST_OPTION kompiliert.\n" -#: options.c:275 +#: options.c:292 #, c-format msgid "error: getopt returned unknown long option %d.\n" msgstr "Fehler: getopt hat eine unbekannt lange Option %d entdeckt.\n" -#: options.c:288 +#: options.c:305 #, c-format msgid "error: no filename given for --config.\n" msgstr "Fehler: Für --config wurde kein Dateiname angegeben.\n" -#: options.c:294 +#: options.c:311 #, c-format msgid "error: --config argument too long.\n" msgstr "Fehler: --config Argument ist zu lang.\n" -#: options.c:308 +#: options.c:327 +#, c-format +msgid "error: --debuglevel argument too long.\n" +msgstr "error: --debuglevel Argument ist zu lang.\n" + +#: options.c:338 +#, c-format +msgid "error: --debuglevel must be 0-999.\n" +msgstr "Fehler: --debuglevel muss im Bereich 0-999 liegen.\n" + +#: options.c:347 #, c-format msgid "error: no argument given for --encoding.\n" msgstr "Fehler: Es wurde kein Argument für --encoding angegeben.\n" -#: options.c:314 +#: options.c:353 #, c-format msgid "error: --encoding argument too long.\n" msgstr "Fehler: --encoding Argument ist zu lang.\n" -#: options.c:328 +#: options.c:367 #, c-format msgid "error: no filename given for --file.\n" msgstr "Fehler: Es wurde kein Argument für --file angegeben.\n" -#: options.c:334 +#: options.c:373 #, c-format msgid "error: --file argument too long.\n" msgstr "Fehler: --file Argument ist zu lang.\n" -#: options.c:362 +#: options.c:401 #, c-format msgid "error: getopt returned character code 0x%x\n" msgstr "Fehler: getopt lieferte Zeichencode 0x%x\n" -#: options.c:378 +#: options.c:417 #, c-format msgid "error: argument too long.\n" msgstr "Fehler: Argument zu lang.\n" -#: options.c:414 +#: options.c:455 #, c-format msgid "usage: cpm [--config FILE] [--help] [PATH] ...\n" msgstr "Syntax: cpm [--config FILE] [--help] [PATH] ...\n" -#: options.c:415 +#: options.c:456 #, c-format msgid " --config, -c configuration file to use [~/%s]\n" msgstr " --config, -c zu benutzende Konfigurationsdatei [~/%s]\n" -#: options.c:417 +#: options.c:458 #, c-format msgid " --configtest verify the configuration file and exit\n" msgstr "" " --configtest nur die Konfigurationsdatei validieren und beenden\n" -#: options.c:418 +#: options.c:460 +#, c-format +msgid " --debuglevel debuglevel (0=off, 1 - 999)\n" +msgstr " --debuglevel debuglevel (0=aus, 1 - 999)\n" + +#: options.c:462 #, c-format msgid " --encoding, -e the encoding in which keyboard input arrives [%s]\n" msgstr " --encoding, -e Encoding für die Tastatureingaben [%s]\n" -#: options.c:420 +#: options.c:464 +#, c-format +msgid " --environment list the environment after cleanup\n" +msgstr " --environment Anzeige der Umgebung nach dem Bereinigen\n" + +#: options.c:465 #, c-format msgid " --file, -f database file to use [~/%s]\n" msgstr " --file, -f zu benutzendes Datenbankfile [~/%s]\n" -#: options.c:422 +#: options.c:467 #, c-format msgid " --help, -h display this help\n" msgstr " --help, -h diese Hilfe\n" -#: options.c:423 +#: options.c:468 #, c-format msgid " --ignore, -i search case insensitive in cli mode\n" msgstr "" " --ignore, -i suche ohne Gross-/Kleinunterscheidung im CLI Modus\n" -#: options.c:424 +#: options.c:469 #, c-format msgid "" " --key overwrite the default encryption keys and use this key\n" @@ -688,175 +707,180 @@ msgstr "" " --key überschreiben der Standard Schlüssel und Benutzung " "dieser\n" -#: options.c:425 +#: options.c:470 #, c-format msgid " instead; repeat for several keys\n" msgstr " stattdessen; wiederholen für mehrere Schlüssel\n" -#: options.c:426 +#: options.c:471 #, c-format msgid " --noencryption turn off file encryption\n" msgstr " --noencryption Verschlüsselung ausschalten\n" -#: options.c:427 +#: options.c:472 #, c-format msgid "" " WARNING: THIS IS FOR DEVELOPMENT AND TESTING ONLY!\n" msgstr " ACHTUNG: DIESE OPTION DIENT NUR ZUR ENTWICKLUNG!\n" -#: options.c:428 +#: options.c:473 #, c-format msgid " --noignore search case sensitive in cli mode\n" msgstr "" " --noignore suche mit Gross-/Kleinunterscheidung im CLI Modus\n" -#: options.c:429 +#: options.c:474 #, c-format msgid " --readonly open the database in read-only mode\n" msgstr " --readonly Öffnen der Datenbank im Read-Only-Modus\n" -#: options.c:430 +#: options.c:475 #, c-format msgid " --regex, -r search with regular expressions in cli mode\n" msgstr " --regex, -r suche mit regulären Ausdrücken im CLI Modus\n" -#: options.c:431 +#: options.c:476 #, c-format msgid " --regular use regular search in cli mode\n" msgstr " --regular suche mit normalem Vergleich im CLI Modus\n" -#: options.c:432 +#: options.c:477 #, c-format msgid "" " --security, -s run a security check and show the current security " "status\n" msgstr " --security, -s ausführen und anzeigen des Sicherheitschecks\n" -#: options.c:434 +#: options.c:479 #, c-format msgid " --testrun run one of the testmodes\n" msgstr " --testrun einen der Tests ausführen\n" -#: options.c:435 +#: options.c:480 #, c-format msgid "" " backup - run test on the backupfile creation\n" msgstr " backup - Backupfiletest ausführen\n" -#: options.c:436 +#: options.c:481 #, c-format msgid " compress[1-6] - run compression test 1-6\n" msgstr " compress[1-6] - Kompressionstest 1-6 ausführen\n" -#: options.c:437 +#: options.c:482 #, c-format msgid " decrypt - run test on the decryption code\n" msgstr " decrypt - Enschlüsselungstest ausführen\n" -#: options.c:438 +#: options.c:483 #, c-format msgid " encrypt - run test on the encryption code\n" msgstr " encrypt - Verschlüsselungstest ausführen\n" -#: options.c:439 +#: options.c:484 #, c-format msgid "" " environment - run test on the environment validation\n" msgstr "" " environment - Test der Umgebungsvariablenvalidierung\n" -#: options.c:440 +#: options.c:485 #, c-format msgid " garbage - run test on garbage input files\n" msgstr "" " garbage - Tests mit defekten Dateien ausführen\n" -#: options.c:441 +#: options.c:486 #, c-format msgid " searchpattern - run test on the search patterns\n" msgstr " searchpattern - Suchmustertest ausführen\n" -#: options.c:443 +#: options.c:488 #, c-format msgid " --version display the version and exit\n" msgstr " --version Versionsnummer anzeigen und beenden\n" -#: options.c:444 +#: options.c:489 #, c-format msgid " PATH path to display the password for\n" msgstr " PATH Pfad um ein Passwort anzuzeigen\n" -#: options.c:460 +#: options.c:524 #, c-format msgid "CDK version %s.%s (%s).\n" msgstr "CDK version %s.%s (%s).\n" -#: options.c:465 +#: options.c:529 #, c-format msgid "CDK version 4 (unknown version).\n" msgstr "CDK version 4 (unbekannte Version).\n" -#: options.c:468 +#: options.c:532 #, c-format msgid "GpgME version %s (rcpt).\n" msgstr "GpgME version %s (rcpt).\n" -#: options.c:470 +#: options.c:534 #, c-format msgid "GpgME version %s.\n" msgstr "GpgME version %s.\n" -#: options.c:472 +#: options.c:537 #, c-format -msgid "ncurses version %s (%ld).\n" -msgstr "ncurses version %s (%ld).\n" +msgid "ncursesw version %s (%d).\n" +msgstr "ncursesw version %s (%d).\n" -#: options.c:474 +#: options.c:541 +#, c-format +msgid "ncurses version %s (%d).\n" +msgstr "ncurses version %s (%d).\n" + +#: options.c:544 #, c-format msgid "XML2 version %s.\n" msgstr "XML2 version %s.\n" -#: options.c:475 +#: options.c:545 #, c-format msgid "zlib version %s.\n" msgstr "zlib version %s.\n" -#: options.c:477 +#: options.c:547 #, c-format msgid "cracklib is enabled.\n" msgstr "cracklib ist aktiv.\n" -#: options.c:479 +#: options.c:549 #, c-format msgid "cracklib is disabled.\n" msgstr "cracklib ist nicht aktiv.\n" -#: options.c:481 +#: options.c:551 #, c-format msgid "Written by Harry Brueckner .\n" msgstr "Verfasst von Harry Brueckner .\n" -#: patternparser.c:260 patternparser.c:347 +#: patternparser.c:273 patternparser.c:360 #, c-format msgid "error: tag not closed in pattern '%s'.\n" msgstr "Fehler: Marker im Muster nicht geschlossen '%s'.\n" -#: patternparser.c:297 +#: patternparser.c:310 #, c-format msgid "error: tag not opened in pattern '%s'.\n" msgstr "Fehler: Marker im Muster nicht geöffnet '%s'.\n" -#: patternparser.c:324 +#: patternparser.c:337 #, c-format msgid "error: unknown template '%s' in pattern '%s'.\n" msgstr "Fehler: unbekanntes Template '%s' in Muster '%s'.\n" -#: patternparser.c:353 +#: patternparser.c:366 #, c-format msgid "error: string not terminated in pattern '%s'.\n" msgstr "Fehler: Zeichenfolge in Muster '%s' nicht terminiert.\n" -#: patternparser.c:380 +#: patternparser.c:393 #, c-format msgid "error: pattern too long ('%s').\n" msgstr "Fehler: Muster zu lang ('%s').\n" @@ -898,127 +922,179 @@ msgstr "Ung msgid "error in configuration file.\n" msgstr "Fehler in der Konfigurationsdatei.\n" -#: security.c:78 +#: security.c:80 #, c-format msgid "can not check null environment variable.\n" msgstr "Umgebungsvariable mit dem Wert null kann nicht validiert werden.\n" -#: security.c:160 +#: security.c:164 msgid "unlimited" msgstr "unlimitiert" -#: security.c:167 +#: security.c:171 msgid "Running without root privileges:" msgstr "Ausführung ohne Root Privilegien:" -#: security.c:171 security.c:195 security.c:211 security.c:225 security.c:241 -#: security.c:254 +#: security.c:175 security.c:199 security.c:215 security.c:230 security.c:247 +#: security.c:259 msgid "yes" msgstr "ja" -#: security.c:177 security.c:201 security.c:217 security.c:231 security.c:247 -#: security.c:258 +#: security.c:181 security.c:205 security.c:221 security.c:236 security.c:253 msgid "no" msgstr "nein" -#: security.c:183 security.c:476 +#: security.c:187 security.c:571 msgid "Can not read RLIMIT_CORE resources." msgstr "Die Resource RLIMIT_CORE kann nicht ermittelt werden." -#: security.c:191 +#: security.c:195 msgid "Memory protection from core dumps:" msgstr "Speicherschutz vor Coredumps:" -#: security.c:207 +#: security.c:211 msgid "Memory protection from swap writings:" msgstr "Speicherschutz vor Speicherauslagerung:" -#: security.c:221 +#: security.c:226 msgid "Max. memory lock ok:" msgstr "Max. Speichersperre ist ok:" -#: security.c:237 +#: security.c:243 msgid "Memory protection from ptrace spying:" msgstr "Speicherauslagerung vor ptrace Spionage:" -#: security.c:251 +#: security.c:258 msgid "Validation of environment variables:" msgstr "Validierung der Umgebungsvariablen:" -#: security.c:278 +#: security.c:280 #, c-format msgid "illegal environment variable found (%s%s).\n" msgstr "Ungültige Umgebungsvariable gefunden (%s%s).\n" -#: security.c:409 +#: security.c:293 +msgid "Unable to set the environment" +msgstr "Setzen der Umgebungsvariable fehlgeschlagen" + +#: security.c:352 +#, c-format +msgid "clearenv() reported an error.\n" +msgstr "clearenv() hat einen Fehler gemeldet.\n" + +#: security.c:374 +msgid "Unable to unset the environment" +msgstr "Löschen der Umgebungsvariable fehlgeschlagen" + +#: security.c:461 msgid "Can not read RLIMIT_MEMLOCK resources." msgstr "Die Resource RLIMIT_MEMLOCK kann nicht ermittelt werden." -#: security.c:425 +#: security.c:474 +#, c-format +msgid "Max. memory lock, curr: %d kB, max: %d kB\n" +msgstr "Max. Memory Lock, aktuell: %d kB, maximal: %d kB\n" + +#: security.c:476 +#, c-format +msgid "Attempting to set limit to: %d kB" +msgstr "Limit setzen auf: %d kB" + +#: security.c:484 +#, c-format +msgid " %sfailed%s\n" +msgstr " %sfehlgeschlagen%s\n" + +#: security.c:485 +#, c-format +msgid "Unable to increase the limit to: %d kB" +msgstr "Erhöhen des Limits nicht möglich: %d kB" + +#: security.c:490 +#, c-format +msgid " %ssuccess%s\n" +msgstr " %serfolgt%s\n" + +#: security.c:504 security.c:520 msgid "The process is suid root, but memory paging can't be locked." msgstr "" "Der Prozess ist suid root aber der Speicher kann nicht geschützt werden." -#: security.c:449 security.c:463 +#: security.c:544 security.c:558 msgid "Cannot drop root privileges." msgstr "Root Privilegien können nicht abgelegt werden." -#: security.c:485 +#: security.c:580 msgid "Cannot disable core file generation." msgstr "Coredumps können nicht ausgeschaltet werden." -#: security.c:502 +#: security.c:597 msgid "stdin, stdout and/or stderr are invalid." msgstr "stdin, stdout and/or stderr sind ungültig." -#: xml.c:297 +#: xml.c:305 msgid "could not decrypt database file." msgstr "Die Datenbank konnte nicht entschlüsselt werden." -#: xml.c:329 xml.c:363 xml.c:502 +#: xml.c:337 xml.c:371 xml.c:510 msgid "warning" msgstr "Warnung" -#: xml.c:329 +#: xml.c:337 msgid "the database file is read in unecrypted mode." msgstr "Das Datenbankfile wird unverschlüsselt gelesen." -#: xml.c:341 xml.c:464 +#: xml.c:349 xml.c:472 #, c-format msgid "error (%s) compressing file '%s'." msgstr "Fehler (%s) beim Komprimieren von '%s'." -#: xml.c:344 xml.c:467 +#: xml.c:352 xml.c:475 msgid "compression error" msgstr "Kompressionsfehler" -#: xml.c:361 +#: xml.c:369 #, c-format msgid "database '%s' was not compressed." msgstr "Datenbankfile '%s' war nicht komprimiert." -#: xml.c:378 +#: xml.c:386 #, c-format msgid "failed to parse xml document '%s'." msgstr "Fehler beim Parsen des XML-Dokuments '%s'." -#: xml.c:402 +#: xml.c:410 #, c-format msgid "failed to validate xml document '%s'." msgstr "Das XML Dokument '%s' konnte nicht validiert werden." -#: xml.c:494 +#: xml.c:502 msgid "could not encrypt database file." msgstr "Die Datenbank konnte nicht verschlüsselt werden." -#: xml.c:503 +#: xml.c:511 msgid "the database file is written in unecrypted mode." msgstr "Das Datenbankfile wird unverschlüsselt geschrieben." -#: xml.c:644 +#: xml.c:660 msgid "validation error" msgstr "Validierungsfehler" -#: xml.c:678 +#: xml.c:696 msgid "validation warning" msgstr "Validierungswarning" + +#~ msgid "error: --debuglevel must be 0-99.\n" +#~ msgstr "error: --debuglevel muss 0-99 sein.\n" + +#~ msgid " --debuglevel debuglevel (0=off, 1 - 99)\n" +#~ msgstr " --debuglevel debuglevel (0=aus, 1 - 99)\n" + +#~ msgid "ncurses version %s (%ld).\n" +#~ msgstr "ncurses version %s (%ld).\n" + +#~ msgid "Are you sure you want to delete the encryption key " +#~ msgstr "Sind Sie sicher, dass Sie den Schlüssel löschen wollen" + +#~ msgid "entry %s?" +#~ msgstr "Eintrag %s?" diff --git a/resource.c b/resource.c index 4d4c07e..ba0de70 100644 --- a/resource.c +++ b/resource.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for the resource handling which is done by the dot conf library * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/resource.h b/resource.h index 78e7af1..eba8a19 100644 --- a/resource.h +++ b/resource.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for resource.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/security.c b/security.c index f312ccd..1e06313 100644 --- a/security.c +++ b/security.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for general security like handling the memory protection * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -72,6 +72,8 @@ int checkEnvValue(int showerror, int type, char* value) char* errormsg; char* pattern; + TRACE(99, "checkEnvValue()", NULL); + if (!value) { if (showerror) @@ -154,6 +156,8 @@ int checkSecurity(int silent) /* Flawfinder: ignore */ char memlimit[24]; + TRACE(99, "checkSecurity()", NULL); + if (runtime -> memlock_limit == -2) { snprintf(memlimit, 24, "%s", "---"); } else if (runtime -> memlock_limit == -1) @@ -217,6 +221,7 @@ int checkSecurity(int silent) { printf("%s%s%s\n", STAT_RED, _("no"), STAT_OFF); } } +#ifdef __linux__ if (!silent) { printf("%-50s", _("Max. memory lock ok:")); } if (runtime -> max_mem_lock) @@ -231,6 +236,7 @@ int checkSecurity(int silent) { printf("%s%s%s (%s)\n", STAT_RED, _("no"), STAT_OFF, memlimit); } } #endif +#endif #endif if (!silent) @@ -248,15 +254,11 @@ int checkSecurity(int silent) } if (!silent) - { printf("%-50s", _("Validation of environment variables:")); } -#if (defined(HAVE_CLEARENV) || defined(HAVE_ENVIRON)) - if (!silent) - { printf("%s%s%s\n", STAT_GREEN, _("yes"), STAT_OFF); } + { + printf("%-50s", _("Validation of environment variables:")); + printf("%s%s%s\n", STAT_GREEN, _("yes"), STAT_OFF); + } level++; -#else - if (!silent) - { printf("%s%s%s\n", STAT_RED, _("no"), STAT_OFF); } -#endif return level; } @@ -285,7 +287,17 @@ int checkSecurity(int silent) { \ /* Flawfinder: ignore */ \ strcpy(eptr, ptr); \ - putenv(eptr); \ + if (putenv(eptr)) \ + { \ + fprintf(stderr, "%s (%s, %s, %d)\n", \ + _("Unable to set the environment"), \ + eptr, \ + strerror(errno), \ + errno \ + ); \ + memFreeString(__FILE__, __LINE__, ptr); \ + return 1; \ + } \ } \ else \ { \ @@ -297,18 +309,23 @@ int checkSecurity(int silent) int clearEnvironment(void) { + int i; + extern char** environ; char* columns; char* gnupghome; char* gpg_agent_info; char* home; char* lang; char* lines; + char* no_utf8_acs; char* term; char* termcap; char* eptr; char* ptr; + TRACE(99, "clearEnvironment()", NULL); + /* Flawfinder: ignore */ columns = getenv("COLUMNS"); /* Flawfinder: ignore */ @@ -322,20 +339,48 @@ int clearEnvironment(void) /* Flawfinder: ignore */ lines = getenv("LINES"); /* Flawfinder: ignore */ + no_utf8_acs = getenv("NCURSES_NO_UTF8_ACS"); + /* Flawfinder: ignore */ termcap = getenv("TERMCAP"); /* Flawfinder: ignore */ term = getenv("TERM"); /* we clear the environment */ #ifdef HAVE_CLEARENV - clearenv (); -#else -#ifdef HAVE_ENVIRON - { - extern char **environ; - environ = NULL; - } -#endif + if (clearenv()) + { + fprintf(stderr, _("clearenv() reported an error.\n")); + return 1; + } +#elif HAVE_UNSETENV + while (environ && environ[0]) + { + ptr = environ[0]; + + i = 0; + /* count how many chars the variable name has */ + while (ptr[i] && ptr[i] != '=') + { i++; } + + if (ptr[i] == '=') + { /* we really found a variable */ + eptr = memAlloc(__FILE__, __LINE__, i + 1); + strStrncpy(eptr, ptr, i + 1); + + /* unset the variable */ + if (unsetenv(eptr)) + { + fprintf(stderr, "%s (%s, %s, %d)\n", + _("Unable to unset the environment"), + eptr, + strerror(errno), + errno + ); + } + + memFree(__FILE__, __LINE__, eptr, i + 1); + } + } #endif /* general */ @@ -345,6 +390,7 @@ int clearEnvironment(void) /* terminal */ PutEnv(eptr, ptr, STRTYPE_NUMERIC, "COLUMNS=", columns); PutEnv(eptr, ptr, STRTYPE_NUMERIC, "LINES=", lines); + PutEnv(eptr, ptr, STRTYPE_NUMERIC, "NCURSES_NO_UTF8_ACS=", no_utf8_acs); PutEnv(eptr, ptr, STRTYPE_ALPHANUMERIC, "TERM=", term); PutEnv(eptr, ptr, STRTYPE_NOCHECK, "TERMCAP=", termcap); @@ -373,6 +419,9 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, rlim_t* memlock_limit) { struct rlimit rl; +#ifdef __linux__ + rlim_t rl_old; +#endif int canary; #ifndef NO_MEMLOCK #ifdef HAVE_MLOCKALL @@ -380,6 +429,8 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, #endif #endif + TRACE(99, "initSecurity()", NULL); + /* we initialize our flags */ *memlock_limit = -2; *max_mem_lock = 0; @@ -402,6 +453,7 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, */ #ifndef NO_MEMLOCK #ifdef HAVE_MLOCKALL +#ifdef __linux__ /* check if our max memory lock size is acceptable */ if (getrlimit(RLIMIT_MEMLOCK, &rl) == -1) { @@ -412,6 +464,33 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, ); return 1; } + + /* we try to raise the current limit to the maximum, in case it */ + /* is not there yet. */ + /* This patch was provided by Kurt Neufeld */ + /* */ + if(rl.rlim_cur < rl.rlim_max) + { + fprintf(stderr, _("Max. memory lock, curr: %d kB, max: %d kB\n"), + (int)rl.rlim_cur / 1024, (int)rl.rlim_max / 1024); + fprintf(stderr, _("Attempting to set limit to: %d kB"), + (int)rl.rlim_max / 1024); + + rl_old = rl.rlim_cur; + rl.rlim_cur = rl.rlim_max; + if (setrlimit(RLIMIT_MEMLOCK, &rl) < 0) + { + rl.rlim_cur = rl_old; + fprintf(stderr, _(" %sfailed%s\n"), STAT_RED, STAT_OFF); + fprintf(stderr, _("Unable to increase the limit to: %d kB"), + (int)rl.rlim_max / 1024); + } + else + { + fprintf(stderr, _(" %ssuccess%s\n"), STAT_GREEN, STAT_OFF); + } + } + *memlock_limit = rl.rlim_cur; if (rl.rlim_cur == -1 || rl.rlim_cur >= MEMLOCK_LIMIT * 1024) { /* we only lock memory if the limit is high enough */ @@ -429,6 +508,22 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, else { *memory_safe = 1; } } +#elif __sun__ + /* we dont have any limit, so locking should always work */ + *max_mem_lock = 1; + + /* lock the memory */ + result = mlockall(MCL_CURRENT | MCL_FUTURE); + if (result) + { + fprintf(stderr, "%s\n", + _("The process is suid root, but memory paging can't be locked.") + ); + return 1; + } + else + { *memory_safe = 1; } +#endif #endif #endif @@ -494,21 +589,47 @@ int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, /* check that stderr, stdin and stdout are opened */ /* NOTE: no file must be opened before this test! */ - /* Flawfinder: ignore */ - canary = open("/dev/null", O_CREAT, 0700); - if ((canary >= 0) && (canary <= 2)) + canary = dup(0); + close(canary); + if (canary != 3) { fprintf(stderr, "%s\n", _("stdin, stdout and/or stderr are invalid.")); - close (canary); return 1; } - close (canary); return clearEnvironment(); } +/* ############################################################################# + * + * Description display the current environment, displayed after cleanup + * Author Harry Brueckner + * Date 2008-09-28 + * Arguments void + * Return void + */ +void listEnvironment(void) + { + int i; + extern char** environ; + + TRACE(99, "listEnvironment()", NULL); + + printf("Environment:\n"); + + if (!environ) + { + printf("No environment found.\n"); + return; + } + + for (i = 0; environ[i] && environ[i]; i++) + { printf("%s\n", environ[i]); } + } + + /* ############################################################################# * * Description run several tests against the pattern matcher @@ -531,6 +652,8 @@ void testEnvironment(void) int id, result; + TRACE(99, "testEnvironment()", NULL); + /* a general variable might contain everything except the '=' sign */ id = 0; runTestOk("general", ++id, STRTYPE_GENERAL, "test this"); diff --git a/security.h b/security.h index 3043ff2..e982045 100644 --- a/security.h +++ b/security.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for security.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 @@ -28,16 +28,26 @@ */ int checkSecurity(int silent); int initSecurity(int* max_mem_lock, int* memory_safe, int* ptrace_safe, rlim_t* memlock_limit); +void listEnvironment(void); void testEnvironment(void); #ifndef MEMLOCK_LIMIT #define MEMLOCK_LIMIT 5120 #endif -#ifndef NO_MEMLOCK - #define MAX_SECURITY_LEVEL 6 +#ifdef __sun__ + /* Solaris does not have the max. memory lock check */ + #ifndef NO_MEMLOCK + #define MAX_SECURITY_LEVEL 5 + #else + #define MAX_SECURITY_LEVEL 3 + #endif #else - #define MAX_SECURITY_LEVEL 4 + #ifndef NO_MEMLOCK + #define MAX_SECURITY_LEVEL 6 + #else + #define MAX_SECURITY_LEVEL 4 + #endif #endif diff --git a/share/cpm/convert2cpm.sh b/share/cpm/convert2cpm.sh index 0e4fd85..f211a2f 100755 --- a/share/cpm/convert2cpm.sh +++ b/share/cpm/convert2cpm.sh @@ -3,7 +3,7 @@ # ############################################################################## # this script gets called by all importers and adds the bounding XML structure # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/share/cpm/csv2cpm.pl b/share/cpm/csv2cpm.pl index 324c583..390d445 100755 --- a/share/cpm/csv2cpm.pl +++ b/share/cpm/csv2cpm.pl @@ -3,7 +3,7 @@ # ############################################################################## # this script gets our own CSV format and creates the XML body structure for CPM # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/share/cpm/general/convert.sh b/share/cpm/general/convert.sh index ddc6a29..f66cebc 100755 --- a/share/cpm/general/convert.sh +++ b/share/cpm/general/convert.sh @@ -3,7 +3,7 @@ # ############################################################################## # this script converts an already prepared CSV file # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/share/cpm/import.sh b/share/cpm/import.sh index d5e2f22..a0e13d6 100755 --- a/share/cpm/import.sh +++ b/share/cpm/import.sh @@ -4,7 +4,7 @@ # this script calls the specified conversion script and adds the additional # XML structure and encryption. # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/share/cpm/passwordsafe/convert.pl b/share/cpm/passwordsafe/convert.pl index c260c3e..0778729 100755 --- a/share/cpm/passwordsafe/convert.pl +++ b/share/cpm/passwordsafe/convert.pl @@ -4,7 +4,7 @@ # this script gets a tab separated list from password safe text file and # creates the XML body structure for CPM # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/share/cpm/pms/convert.pl b/share/cpm/pms/convert.pl index 9125da0..63cb78e 100755 --- a/share/cpm/pms/convert.pl +++ b/share/cpm/pms/convert.pl @@ -4,7 +4,7 @@ # this script gets a tab separated list from pms_export and creates the XML # body structure for CPM # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/share/cpm/pms/convert.sh b/share/cpm/pms/convert.sh index 0be8d36..7daab9a 100755 --- a/share/cpm/pms/convert.sh +++ b/share/cpm/pms/convert.sh @@ -3,7 +3,7 @@ # ############################################################################## # this script converts a PMS database to CSV # ############################################################################## -# Copyright (C) 2005, 2006 Harry Brueckner +# Copyright (C) 2005-2009 Harry Brueckner # # 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 diff --git a/string.c b/string.c index f673d79..b7571e3 100644 --- a/string.c +++ b/string.c @@ -1,7 +1,7 @@ /* ############################################################################# * code for string handling * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/string.h b/string.h index db274a0..9dc3148 100644 --- a/string.h +++ b/string.h @@ -1,7 +1,7 @@ /* ############################################################################# * header information for string.c * ############################################################################# - * Copyright (C) 2005, 2006 Harry Brueckner + * Copyright (C) 2005-2009 Harry Brueckner * * 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 diff --git a/tests/encrypt-result.txt b/tests/encrypt-result.txt index 1c8c7d2..8cbd5d1 100644 --- a/tests/encrypt-result.txt +++ b/tests/encrypt-result.txt @@ -38,4 +38,4 @@ ]> -unknown