diff --git a/.gitignore b/.gitignore index 52fb503..4854d05 100644 --- a/.gitignore +++ b/.gitignore @@ -7,20 +7,19 @@ compile autom4te.cache/ bin/ lib/ +src/siggen/siggen +src/tripwire/tripwire +src/twadmin/twadmin +src/twprint/twprint +src/twtest/twtest **/Makefile **/*.o **/*.dylib **/*.a **/*.so **/*.dll -**/siggen -**/tripwire -**/twadmin -**/twprint -**/twtest -**/siggen.exe -**/tripwire.exe -**/twadmin.exe -**/twprint.exe -**/twtest.exe +**/*.exe +**/*~ +**/*.bak +**/.DS_Store releases/ diff --git a/COMMERCIAL b/COMMERCIAL index 5bfad07..5b7d3fc 100644 --- a/COMMERCIAL +++ b/COMMERCIAL @@ -1,6 +1,10 @@ -If you desire enterprise capable software with commercial support, check out -Tripwire, Inc. at http://www.tripwire.com. +Tripwire, Inc also offers several commercial, supported security and compliance solutions: + +* Tripwire for Servers is most similar to Open Source Tripwire (OST was forked from it in 2000), with additional features such as native Windows support, audit event correlation, and Tripwire Manager, a central management console. http://www.tripwire.com/it-security-software/scm/tripwire-for-servers/ + +* Tripwire Enterprise is an enterprise-grade product with features such as real-time file and registry change detection; change monitoring for databases, directory servers, and network devices; and policy compliance monitoring for standards including PCI, HIPAA, and NERC. http://www.tripwire.com/it-security-software/scm/tripwire-enterprise/ + +* Tripwire Configuration Compliance Manager is an agentless solution with some features similar to Tripwire Enterprise, as well as advanced asset discovery capabilities. http://www.tripwire.com/it-security-software/scm/ccm/ + -For a more detailed comparison of the Open Source Tripwire software and -commercial Tripwire(R) product(s) please visit http://www.tripwire.org. diff --git a/ChangeLog b/ChangeLog index 3b1b589..4fa18a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2017-01-15 Brian Cox + * Bump version to 2.4.3.2 + * DOS/DJGPP platform support. + * Use posix_fadvise() to reduce disk cache impact (where available). + * Use O_NOATIME where available, so scans don't update file access times. + * Optional HASH_DIRECT_IO (Linux only) to access files via direct i/o when hashing, per user request. + * Optional support for iconv character conversion, for db/report file portability. + * Improved display of multibyte characters in reports. + * On OSX, use builtin CommonCrypto hashes instead of impls provided with OST. + * Update build system to automake 1.15 + * Cross compiling can use OpenSSL now. + * 'make dist' now creates a buildable source bundle. + * Can use build dir outside of source tree + * Include 'what'-style version strings. + * AROS: Correctly hide passphrases & delete temp files. + * Remove dead code & unused files. + * Optional RESOLVE_IDS_TO_NAMES option to disable uid/gid to name resolution, if needed. + * New --key-size option to twadmin --generate-keys, to generate 1024 (default) or 2048 bit El Gamal keys. 2016-04-20 Brian Cox * Bump version to 2.4.3.1 * Revive old 'twtest' unit test suite (such as it is); move _t.cpp files into twtest dir. @@ -26,7 +44,7 @@ * Add MAILFROMADDRESS config param (see twconfig man page) * Use O_NONBLOCK, to avoid blocking on fifos & mandatory-locked files * Report Solaris door & event port file types correctly - + 2014-01-01 Barry Allard * Bumping version to 2.4.2.3 @@ -59,24 +77,21 @@ * Fixed bug in install script when sendmail isn't installed target system. * Removed some non-existent files from installer - + 2005-08-18 Ron Forrester * Wow, has it been 4+ years? :) - * Starting fresh with Paul's autoconf'ed code base - * Bumped version number, misc cleanup, etc. - 2001-02-25 Ron Forrester * Bumped version to 2.3.1. - + * BSD support, thanks to Paul Herman . The support was added for FreeBSD 4.2, your mileage may vary on other BSD's. - + * Fixed long standing bug with recurse=3 * If TEMPDIRECTORY was missing trailing /, bad things could @@ -88,8 +103,7 @@ file. Additionally, reports were being sliced to global recipients, despite the fact that global recipients should get the full report. - - + 2001-02-03 Ron Forrester * Fixed possible security problem with the handling of temp diff --git a/Makefile.am b/Makefile.am index a68876b..a555745 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ AUTOMAKE_OPTIONS = foreign no-dependencies SUBDIRS = man src -EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK touchconfig.sh contrib policy +EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging README-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer install-data-hook: prefix="$(prefix)" sysconfdir="$(sysconfdir)" \ path_to_vi="$(path_to_vi)" path_to_sendmail="$(path_to_sendmail)" \ - ./install/install.sh + ./installer/install.sh diff --git a/Makefile.in b/Makefile.in index 342ff95..c8e58aa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,67 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -33,50 +85,131 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure COPYING ChangeLog config.guess \ - config.sub install-sh missing mkinstalldirs +target_triplet = @target@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in COPYING \ + ChangeLog compile config.guess config.sub install-sh missing \ + mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -100,6 +233,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -111,6 +245,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -127,21 +262,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -171,35 +309,38 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies SUBDIRS = man src -EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK touchconfig.sh contrib policy +EXTRA_DIST = COMMERCIAL MAINTAINERS TRADEMARK LICENSE Packaging README-2.4.3 README.md autogen.sh autogen.sh.README touchconfig.sh contrib policy installer all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -214,39 +355,46 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 -uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -254,60 +402,20 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -319,114 +427,162 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) dist-bzip2: distdir - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir - $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -434,25 +590,33 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -472,14 +636,24 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -510,16 +684,22 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -539,6 +719,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -546,13 +728,30 @@ info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-recursive + +install-dvi-am: install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -573,30 +772,35 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(am__recursive_targets) all install-am install-data-am \ + install-strip -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-recursive distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-info-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile install-data-hook: prefix="$(prefix)" sysconfdir="$(sysconfdir)" \ path_to_vi="$(path_to_vi)" path_to_sendmail="$(path_to_sendmail)" \ - ./install/install.sh + ./installer/install.sh + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/ReadMe-2.4.3 b/ReadMe-2.4.3 index 6db0662..bbc0ea1 100644 --- a/ReadMe-2.4.3 +++ b/ReadMe-2.4.3 @@ -1,4 +1,38 @@ -What's new in Open Source Tripwire 2.4.3: +What's new in Open Source Tripwire 2.4.3.2: + +* OST now includes optional iconv support when configured with --enable-iconv. +When enabled, binary database & report files store paths as UTF-16, making these files more +portable across machines with different character encodings. This is disabled by default +for the sake of compatibility with existing db & report files. + +* Use posix_fadvise (or equivalent) to avoid filling system disk cache with files we've already +read and aren't about to read again. Also use O_NOATIME where available, to avoid updating +file access times when we read a file. Add an optional new config param "HASH_DIRECT_IO" to use +direct i/o when hashing files. This doesn't seem to be any faster than normal i/o, but +including it anyway due to user request. + +* Add a new config file option RESOLVE_IDS_TO_NAMES to control whether we try to +resolve uid/gid values to user & group names. Static binaries are known to segfault when +doing this given certain nsswitch.conf setups (particularly LDAP/AD), so setting this +to false bypasses name resolution and just displays the numeric uid/gid. + +* Add a new optional --key-size argument to twadmin --generate-keys mode, with available +sizes of 1024 or 2048 bits. Previously twadmin always created 1024-bit El Gamal keys, +and this remains the default if --key-size is not specified, at least for the time being. + +* Fix a compilation issue with C++11 and -Werror=terminate. + +* Move build files to automake 1.15, and make a few build system fixes: "make dist" now +works properly, cross-compiled binaries can now compile with OpenSSL if available, and +specifying a build directory outside the source dir now works as expected. + +* Assorted platform tweaks: Add DOS/FreeDOS + DJGPP as a new platform; support Cygwin +//host/share/path syntax for UNC paths; passphrase & tempfile fixes for AROS. + + +====================================== + +What was new in earlier 2.4.3 versions: * This update fixes compilation errors on modern compilers (GCC 4.7+ and LLVM/clang), as well as some additional errors encountered on various platforms. This is intended @@ -28,6 +62,7 @@ defined incorrectly otherwise. * Added the long-requested MAILFROMADDRESS config param for email reporting. + The update has been tested on a variety of platforms: Linuxes @@ -69,26 +104,25 @@ Other - Sortix 1.0 + gcc 5.3.0 - Icaros 2.1 (AROS) + gcc 4.6.4 - MiNT 1.17 (Atari ST/TT) + gcc 4.6.4 +- FreeDOS 1.1 + gcc 6.1.0 (DJGPP) Building Notes: -* If cross compiling, a '--disable-openssl' argument must be passed to ./configure, -since its OpenSSL existence check currently uses an AC_TRY_RUN macro. Additionally, -generated Makefiles don't automagically find the cross-compiler's 'ar' and try to -use the local one, which fails. Until this is resolved, this can be fixed with a symlink -named 'ar' pointing at the cross-compiler copy, with a path such that make finds it -instead of the local 'ar'. - * The '--enable-static' configure argument is not guaranteed to work on all -platforms, and your mileage may vary. And when it works, it may not be doing -what you expect. For example, even if a program is statically linked with -glibc, the static glibc code may still load shared libraries behind the -scenes, for things like iconv character conversion and nsswitch name lookups. +platforms (it's known not to work on MacOS, for instance) and your mileage may vary. +And when it works, it may not be doing what you expect. For example, even if +a program is statically linked with glibc, the static glibc code may still load +shared libraries behind the scenes, for things like iconv character conversion +and nsswitch name lookups. -* To create PIE (Position-Independent Executable) binaries, add “-fPIE" to CFLAGS -and "-fPIE -pie" to LDFLAGS. This is required by recent Android versions, and -may be desirable elsewhere. It's simplest to add these to configure.in and run -autoreconf -i instead of hand-editing each Makefile individually. +* The build system currently doesn't autodetect clang at configure time +(though it detects llvm-gcc). To use clang, you'll need to set CC and CXX to +point at clang and clang++ before configuring & building. + +* The default compile flags don't include hardening options such as creating +PIE (Position-Independent Executable) binaries. To set these, you'll want to +set CFLAGS/CXXFLAGS/LDFLAGS by hand before running 'configure', or use a tool +such as dpkg-buildflags to set them to recommended values. * Older versions of Open Source Tripwire reportedly do not build on Tru64 UNIX. This is likely to be true with 2.4.3 as well, due to the lack of appropriate diff --git a/aclocal.m4 b/aclocal.m4 index 8c5cd1d..322b108 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.8.5 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,59 +11,62 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.15' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.15], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.8.5])]) +[AM_AUTOMAKE_VERSION([1.15])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# AM_AUX_DIR_EXPAND +# AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -82,7 +85,7 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -100,42 +103,31 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- +# AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 6 +# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -145,43 +137,28 @@ else fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) fi])]) -# serial 7 -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -194,11 +171,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -206,8 +185,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -225,6 +205,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -236,34 +226,49 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -296,7 +301,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -306,85 +311,85 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -#serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -393,7 +398,7 @@ done # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -401,54 +406,22 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- +# Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 7 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if +# This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 11 +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -462,16 +435,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -487,47 +464,125 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl - +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -538,62 +593,44 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 +# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -608,26 +645,13 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- @@ -636,7 +660,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -646,24 +670,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -671,27 +695,13 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# -*- Autoconf -*- +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -700,109 +710,66 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). +# -*- Autoconf -*- +# Obsolete and "removed" macros, that must however still report explicit +# error messages when used, to smooth transition. # -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Helper functions for option handling. -*- Autoconf -*- +AC_DEFUN([AM_CONFIG_HEADER], +[AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl +AC_CONFIG_HEADERS($@)]) -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +AC_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should simply use the 'AC][_PROG_CC' macro instead. +Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', +but upon 'ac_cv_prog_cc_stdc'.])]) -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +AC_DEFUN([AM_C_PROTOTYPES], + [AC_FATAL([automatic de-ANSI-fication support has been removed])]) +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Helper functions for option handling. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 2 +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -810,16 +777,16 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -827,59 +794,126 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # -# Check to make sure that the build environment is sane. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Check to make sure that the build environment is sane. -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -889,45 +923,260 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# One issue with vendor `install' (even GNU) is that you can't +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + m4_include([acinclude.m4]) diff --git a/bin/.fix b/bin/.fix deleted file mode 100644 index 8b0cb99..0000000 --- a/bin/.fix +++ /dev/null @@ -1 +0,0 @@ -needed diff --git a/config.h.in b/config.h.in index 6258a87..387a1cd 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,4 @@ -/* config.h.in. Generated from configure.in by autoheader. */ +/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD @@ -12,6 +12,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_BITS_SIGNUM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + /* Uses the GNU gcc compiler */ #undef HAVE_GCC @@ -48,6 +54,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SHA_H +/* Define to 1 if you have the `posix_fadvise' function. */ +#undef HAVE_POSIX_FADVISE + /* Define to 1 if you have the header file. */ #undef HAVE_SIGNUM_H @@ -72,12 +81,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FS_VX_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MOUNT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATFS_H @@ -96,6 +114,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_USTAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/configure b/configure index e3499db..77ef0de 100755 --- a/configure +++ b/configure @@ -1,6 +1,9 @@ #! /bin/sh +# From configure.ac Revision: 2.4.3.2 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. +# Generated by GNU Autoconf 2.69 for tripwire 2.4.3.2. +# +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -8,6 +11,8 @@ # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +# +# The developer of the original code and/or files is Tripwire, Inc. Portions created by Tripwire, Inc. are copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights reserved. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -264,10 +269,12 @@ fi $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://github.com/Tripwire/tripwire-open-source/issues +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." fi exit 1 fi @@ -575,12 +582,12 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= +PACKAGE_NAME='tripwire' +PACKAGE_TARNAME='tripwire' +PACKAGE_VERSION='2.4.3.2' +PACKAGE_STRING='tripwire 2.4.3.2' +PACKAGE_BUGREPORT='https://github.com/Tripwire/tripwire-open-source/issues' +PACKAGE_URL='https://github.com/Tripwire/tripwire-open-source' ac_unique_file="src/tw/tw.cpp" # Factoring default headers for most tests. @@ -619,7 +626,9 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='LTLIBOBJS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS CORE_CRYPT_O CXXCPP @@ -628,6 +637,7 @@ GREP CPP path_to_sendmail path_to_vi +AR LN LN_S YFLAGS @@ -642,6 +652,7 @@ CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -655,14 +666,21 @@ CPPFLAGS LDFLAGS CFLAGS CC +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR am__leading_dot SET_MAKE AWK mkdir_p +MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh -AMTAR MAKEINFO AUTOHEADER AUTOMAKE @@ -671,6 +689,7 @@ ACLOCAL VERSION PACKAGE CYGPATH_W +am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM @@ -727,9 +746,12 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_static enable_debug enable_dependency_tracking +enable_commoncrypto +enable_iconv enable_openssl with_ssl_dir ' @@ -788,7 +810,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1288,7 +1310,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 this package to adapt to many kinds of systems. +\`configure' configures tripwire 2.4.3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1336,7 +1358,7 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/tripwire] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1358,18 +1380,26 @@ _ACEOF fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of tripwire 2.4.3.2:";; + esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-static compile static binaries --enable-debug compile with debuging enabled - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --disable-openssl don't link against OpenSSL libraries + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-commoncrypto Don't use CommonCrypto hash implementations (OSX only) + --enable-iconv Use iconv for locale-independent report and db files + --disable-openssl Don't link against OpenSSL libraries Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1398,7 +1428,8 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. +Report bugs to . +tripwire home page: . _ACEOF ac_status=$? fi @@ -1461,12 +1492,14 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure +tripwire configure 2.4.3.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. + +The developer of the original code and/or files is Tripwire, Inc. Portions created by Tripwire, Inc. are copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights reserved. _ACEOF exit fi @@ -1700,6 +1733,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ---------------------------------------------------------------------- ## +## Report this to https://github.com/Tripwire/tripwire-open-source/issues ## +## ---------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2205,6 +2242,10 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ---------------------------------------------------------------------- ## +## Report this to https://github.com/Tripwire/tripwire-open-source/issues ## +## ---------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 @@ -2338,7 +2379,7 @@ 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 $as_me, which was +It was created by tripwire $as_me 2.4.3.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2826,7 +2867,8 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version="1.8" +am__api_version='1.15' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -2922,32 +2964,50 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2959,6 +3019,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2969,181 +3039,39 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # Keeping the `.' argument allows $(mkdir_p) to be used without - # argument. Indeed, we sometimes output rules like - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. - # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more - # expensive solution, as it forces Make to start a sub-shell.) - mkdir_p='mkdir -p -- .' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac fi -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=tripwire - VERSION=2.4.3.1 - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -3238,16 +3166,292 @@ else fi fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='tripwire' + VERSION='2.4.3.2' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi ac_config_headers="$ac_config_headers config.h" + + + rm -f src/tripwire/syslog.h 2> /dev/null chmod 755 install-sh 2> /dev/null @@ -3282,197 +3486,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in gcc clang suncc aCC xlC_r xlC cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -3516,7 +3530,7 @@ fi fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in gcc clang suncc aCC xlC_r xlC cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -3571,8 +3585,6 @@ esac fi fi -fi - test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -4064,6 +4076,65 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4072,7 +4143,7 @@ ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -4083,24 +4154,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi @@ -4116,10 +4187,9 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -4129,7 +4199,6 @@ fi - depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4141,8 +4210,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4160,6 +4230,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4171,34 +4246,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4226,9 +4316,7 @@ fi $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -4249,7 +4337,7 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in g++ clang++ sunCC aCC xlC_r xlC cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -4293,7 +4381,7 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + for ac_prog in g++ clang++ sunCC aCC xlC_r xlC cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4507,8 +4595,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4526,6 +4615,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -4537,34 +4631,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -4592,9 +4701,7 @@ fi $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= @@ -4776,6 +4883,101 @@ else $as_echo "no" >&6; } fi + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + # Extract the first word of "vi", so it can be a program name with args. set dummy vi; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5295,7 +5497,7 @@ fi done -for ac_header in sys/ustat.h sys/sysmacros.h sys/syslog.h +for ac_header in sys/ustat.h sys/sysmacros.h sys/syslog.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5308,7 +5510,7 @@ fi done -for ac_header in unistd.h syslog.h iconv.h langinfo.h sys/statfs.h +for ac_header in unistd.h syslog.h langinfo.h sys/statfs.h sys/select.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5347,6 +5549,31 @@ fi done +for ac_header in sys/utsname.h memory.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +for ac_header in sys/fs/vx_ioctl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/fs/vx_ioctl.h" "ac_cv_header_sys_fs_vx_ioctl_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_fs_vx_ioctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_FS_VX_IOCTL_H 1 +_ACEOF + +fi + +done + CPPFLAGS_SAVE="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} -Werror" @@ -5864,6 +6091,51 @@ fi done +for ac_header in fcntl.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FCNTL_H 1 +_ACEOF + for ac_func in posix_fadvise +do : + ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" +if test "x$ac_cv_func_posix_fadvise" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POSIX_FADVISE 1 +_ACEOF + +fi +done + +fi + +done + + +# Check whether --enable-commoncrypto was given. +if test "${enable_commoncrypto+set}" = set; then : + enableval=$enable_commoncrypto; +fi + + +if test "x${enable_commoncrypto}" != "xno" +then + for ac_header in CommonCrypto/CommonDigest.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "CommonCrypto/CommonDigest.h" "ac_cv_header_CommonCrypto_CommonDigest_h" "$ac_includes_default" +if test "x$ac_cv_header_CommonCrypto_CommonDigest_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_COMMONCRYPTO_COMMONDIGEST_H 1 +_ACEOF + +fi + +done + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lc" >&5 $as_echo_n "checking for socket in -lc... " >&6; } @@ -6081,6 +6353,128 @@ fi +# Check whether --enable-iconv was given. +if test "${enable_iconv+set}" = set; then : + enableval=$enable_iconv; +fi + + +if test "x${enable_iconv}" = xyes +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -lc" >&5 +$as_echo_n "checking for iconv in -lc... " >&6; } +if ${ac_cv_lib_c_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 iconv (); +int +main () +{ +return iconv (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_iconv=yes +else + ac_cv_lib_c_iconv=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_iconv" >&5 +$as_echo "$ac_cv_lib_c_iconv" >&6; } +if test "x$ac_cv_lib_c_iconv" = xyes; then : + + for ac_header in iconv.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" +if test "x$ac_cv_header_iconv_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ICONV_H 1 +_ACEOF + +fi + +done + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5 +$as_echo_n "checking for iconv in -liconv... " >&6; } +if ${ac_cv_lib_iconv_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-liconv $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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 iconv (); +int +main () +{ +return iconv (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_iconv_iconv=yes +else + ac_cv_lib_iconv_iconv=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5 +$as_echo "$ac_cv_lib_iconv_iconv" >&6; } +if test "x$ac_cv_lib_iconv_iconv" = xyes; then : + + LIBS="-liconv $LIBS" + for ac_header in iconv.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" +if test "x$ac_cv_header_iconv_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ICONV_H 1 +_ACEOF + +fi + +done + + +else + : +fi + +fi + +fi + + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6586,6 +6980,9 @@ else # Basic test to check for compatible library and # correct linking + if test "$cross_compiling" = yes; then + found_crypto=1 + else if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6616,6 +7013,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test ! -z "$found_crypto" ; then break; @@ -6680,6 +7078,11 @@ done fi fi +ac_config_commands="$ac_config_commands mk_lib" + +ac_config_commands="$ac_config_commands mk_bin" + + ac_config_files="$ac_config_files Makefile man/Makefile man/man4/Makefile man/man5/Makefile man/man8/Makefile src/Makefile src/cryptlib/Makefile src/core/Makefile src/db/Makefile src/fco/Makefile src/fs/Makefile src/tw/Makefile src/twcrypto/Makefile src/twparser/Makefile src/util/Makefile src/twprint/Makefile src/twadmin/Makefile src/siggen/Makefile src/tripwire/Makefile src/twtest/Makefile" @@ -6778,7 +7181,6 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -6793,6 +7195,22 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -7203,7 +7621,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by $as_me, which was +This file was extended by tripwire $as_me 2.4.3.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7263,13 +7681,14 @@ $config_headers Configuration commands: $config_commands -Report bugs to the package provider." +Report bugs to . +tripwire home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -config.status +tripwire config.status 2.4.3.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -7280,6 +7699,7 @@ gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -7399,6 +7819,8 @@ do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "mk_lib") CONFIG_COMMANDS="$CONFIG_COMMANDS mk_lib" ;; + "mk_bin") CONFIG_COMMANDS="$CONFIG_COMMANDS mk_bin" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/man4/Makefile") CONFIG_FILES="$CONFIG_FILES man/man4/Makefile" ;; @@ -7867,6 +8289,11 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -7921,6 +8348,7 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ @@ -7966,21 +8394,22 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;} || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - "$ac_file" | "$ac_file":* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -8007,17 +8436,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ @@ -8040,34 +8480,26 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ @@ -8090,12 +8522,15 @@ $as_echo X"$file" | q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ;; + "mk_lib":C) test -d lib || mkdir lib ;; + "mk_bin":C) test -d bin || mkdir bin ;; esac done # for ac_tag diff --git a/configure.in b/configure.ac similarity index 85% rename from configure.in rename to configure.ac index da9f7fd..7bd14df 100644 --- a/configure.in +++ b/configure.ac @@ -2,12 +2,15 @@ dnl Process this file with autoconf to produce a configure script. dnl dnl -AC_INIT +AC_INIT([tripwire], [2.4.3.2], [https://github.com/Tripwire/tripwire-open-source/issues], [tripwire], [https://github.com/Tripwire/tripwire-open-source]) AC_CONFIG_SRCDIR([src/tw/tw.cpp]) AC_CANONICAL_TARGET([]) -AM_INIT_AUTOMAKE(tripwire, 2.4.3.1) +AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) +AC_COPYRIGHT([The developer of the original code and/or files is Tripwire, Inc. Portions created by Tripwire, Inc. are copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights reserved.]) +AC_REVISION([$Revision: 2.4.3.2 $]) + dnl ################################# dnl Cleanup Cruft Leftover From Patch dnl ################################# @@ -38,12 +41,16 @@ fi dnl ################### dnl Checks for programs dnl ################### -AC_PROG_CC -AC_PROG_CXX +AC_PROG_CC([gcc clang suncc aCC xlC_r xlC cl.exe]) +AC_PROG_CXX([g++ clang++ sunCC aCC xlC_r xlC cl.exe]) AC_PROG_RANLIB AC_PROG_YACC AC_PROG_LN_S AC_PROG_LN +AN_MAKEVAR([AR], [AC_PROG_AR]) +AN_PROGRAM([ar], [AC_PROG_AR]) +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) +AC_PROG_AR AC_PATH_PROG(path_to_vi, vi) AC_PATH_PROG(path_to_sendmail, sendmail, "", [$PATH:/usr/libexec]) @@ -63,10 +70,12 @@ AC_CHECK_HEADERS(sys/mount.h,,, #include #endif ]]) -AC_CHECK_HEADERS(sys/ustat.h sys/sysmacros.h sys/syslog.h) -AC_CHECK_HEADERS(unistd.h syslog.h iconv.h langinfo.h sys/statfs.h) +AC_CHECK_HEADERS(sys/ustat.h sys/sysmacros.h sys/syslog.h sys/socket.h) +AC_CHECK_HEADERS(unistd.h syslog.h langinfo.h sys/statfs.h sys/select.h) AC_CHECK_HEADERS(signum.h bits/signum.h, break ) AC_CHECK_HEADERS(stdarg.h varargs.h, break ) +AC_CHECK_HEADERS(sys/utsname.h memory.h) +AC_CHECK_HEADERS(sys/fs/vx_ioctl.h) dnl # Special case for malloc.h, because it's depreciated on most systems. CPPFLAGS_SAVE="${CPPFLAGS}" @@ -106,6 +115,18 @@ dnl ############################# AC_CHECK_FUNCS(strftime gethostname gethostid) AC_CHECK_FUNCS(mkstemp mktemp, break) +dnl check for posix_fadvise +AC_CHECK_HEADERS(fcntl.h, [AC_CHECK_FUNCS(posix_fadvise)]) + +dnl check for OSX builtin hash algorithms +AC_ARG_ENABLE(commoncrypto, + [ --disable-commoncrypto Don't use CommonCrypto hash implementations (OSX only)]) + +if test "x${enable_commoncrypto}" != "xno" +then + AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h) +fi + dnl ############################################## dnl Checks for various platform specific libraries dnl ############################################## @@ -124,6 +145,22 @@ AC_CHECK_LIB(c, gethostbyname, [:], [ AC_CHECK_LIB(network, gethostbyname, [LIBS="-lnetwork $LIBS"] [:]) ]) ]) + +AC_ARG_ENABLE(iconv, + [ --enable-iconv Use iconv for locale-independent report and db files]) + +if test "x${enable_iconv}" = xyes +then + dnl iconv? check the usual locations + AC_CHECK_LIB(c, iconv, [ + AC_CHECK_HEADERS(iconv.h) + ], [ + AC_CHECK_LIB(iconv, iconv, [ + LIBS="-liconv $LIBS" + AC_CHECK_HEADERS(iconv.h) + ], [:]) ]) +fi + dnl check for stl library AC_LANG_SAVE AC_LANG_CPLUSPLUS @@ -282,7 +319,7 @@ if you are trying to compile a static binary. dnl Check for OpenSSL, now that we have a working compiler AC_ARG_ENABLE(openssl, - [ --disable-openssl don't link against OpenSSL libraries]) + [ --disable-openssl Don't link against OpenSSL libraries]) AC_ARG_WITH(ssl-dir, [ --with-ssl-dir=PATH Specify path to OpenSSL installation ], [ @@ -339,6 +376,9 @@ then # Basic test to check for compatible library and # correct linking + if test "$cross_compiling" = yes; then + found_crypto=1 + else AC_TRY_RUN( [ #include @@ -356,6 +396,7 @@ int main(void) break; ], [] ) + fi if test ! -z "$found_crypto" ; then break; @@ -406,6 +447,9 @@ if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "xnot found") fi fi +AC_CONFIG_COMMANDS([mk_lib], [test -d lib || mkdir lib]) +AC_CONFIG_COMMANDS([mk_bin], [test -d bin || mkdir bin]) + dnl ##################################### dnl Export the variables we use dnl ##################################### diff --git a/clean b/contrib/clean.sh similarity index 100% rename from clean rename to contrib/clean.sh diff --git a/contrib/make-bin-dist b/contrib/make-bin-dist index 7fd07e0..a224d92 100755 --- a/contrib/make-bin-dist +++ b/contrib/make-bin-dist @@ -5,7 +5,7 @@ set -e PRODUCT=tripwire -VERSION=2.4.3.1 +VERSION=2.4.3.2 platform() { case `uname` in diff --git a/contrib/twpolmake.pl b/contrib/twpolmake.pl new file mode 100755 index 0000000..d397d9c --- /dev/null +++ b/contrib/twpolmake.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl +# Tripwire Policy File customize tool +# ---------------------------------------------------------------- +# Copyright (C) 2003 Hiroaki Izumi +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# ---------------------------------------------------------------- +# Usage: +# perl twpolmake.pl {Pol file} +# ---------------------------------------------------------------- +# +$POLFILE=$ARGV[0]; + +open(POL,"$POLFILE") or die "open error: $POLFILE" ; +my($myhost,$thost) ; +my($sharp,$tpath,$cond) ; +my($INRULE) = 0 ; + +while () { + chomp; + if (($thost) = /^HOSTNAME\s*=\s*(.*)\s*;/) { + $myhost = `hostname` ; chomp($myhost) ; + if ($thost ne $myhost) { + $_="HOSTNAME=\"$myhost\";" ; + } + } + elsif ( /^{/ ) { + $INRULE=1 ; + } + elsif ( /^}/ ) { + $INRULE=0 ; + } + elsif ($INRULE == 1 and ($sharp,$tpath,$cond) = /^(\s*\#?\s*)(\/\S+)\b(\s+->\s+.+)$/) { + $ret = ($sharp =~ s/\#//g) ; + if ($tpath eq '/sbin/e2fsadm' ) { + $cond =~ s/;\s+(tune2fs.*)$/; \#$1/ ; + } + if (! -s $tpath) { + $_ = "$sharp#$tpath$cond" if ($ret == 0) ; + } + else { + $_ = "$sharp$tpath$cond" ; + } + } + print "$_\n" ; +} +close(POL) ; diff --git a/install-sh b/install-sh index e9de238..0b0fdcb 100755 --- a/install-sh +++ b/install-sh @@ -1,251 +1,501 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2013-12-25.23; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' +tab=' ' +nl=' ' -IFS="${IFS-${defaultIFS}}" +IFS=" $tab$nl" -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" +# Set DOITPROG to "echo" to test this script. -pathcomp='' +doit=${DOITPROG-} +doit_exec=${doit:-exec} -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift +# Put in absolute file names if you don't have them in your path; +# or use environment vars. - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} - pathcomp="${pathcomp}/" +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi fi -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi -# If we're going to rename the final executable, determine the name now. +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 -# don't allow the sed command to completely eliminate the filename + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi -# Make a temp file name in the proper directory. +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac - dsttmp=$dstdir/#inst.$$# + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else -# Move or copy the file name to the temp name + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi - $doit $instcmd $src $dsttmp && + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg - trap "rm -f ${dsttmp}" 0 && + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi -# and set any options; do chmod last to preserve setuid bits + obsolete_mkdir_used=false -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac -# Now rename the file to the real destination. + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -fi && + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else -exit 0 + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/install/install.cfg b/installer/install.cfg similarity index 100% rename from install/install.cfg rename to installer/install.cfg diff --git a/install/install.sh b/installer/install.sh similarity index 99% rename from install/install.sh rename to installer/install.sh index 68e2554..b8f02f4 100755 --- a/install/install.sh +++ b/installer/install.sh @@ -160,7 +160,7 @@ CLR_CONFIG_FILE="twcfg.txt" CLR_POLICY_FILE="twpol.txt" # Default installation script configuration file. -INSTALL_CONFIG_FILE="./install/install.cfg" +INSTALL_CONFIG_FILE="./installer/install.cfg" # Relative path to dir that contains the pkg files. PKG_DIR="pkg" diff --git a/lib/.keepme b/lib/.keepme deleted file mode 100644 index e69de29..0000000 diff --git a/man/Makefile.in b/man/Makefile.in index ce20121..ffd3622 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,67 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -33,35 +85,108 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = man -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -85,6 +210,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -96,6 +222,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -112,21 +239,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -156,12 +286,16 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies SUBDIRS = man4 man5 man8 all: all-recursive @@ -171,15 +305,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -196,19 +329,28 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: +$(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -216,60 +358,20 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -281,79 +383,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -373,16 +500,22 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -401,18 +534,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -431,21 +584,23 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-recursive distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile #man_MANS = \ @@ -457,6 +612,7 @@ uninstall-info: uninstall-info-recursive # ./man8/twadmin.8 \ # ./man8/twintro.8 \ # ./man8/twprint.8 + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/man/man4/Makefile.in b/man/man4/Makefile.in index 2062ed3..2d5c2f9 100644 --- a/man/man4/Makefile.in +++ b/man/man4/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,67 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -33,31 +85,80 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = man/man4 -DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man4dir = $(mandir)/man4 am__installdirs = "$(DESTDIR)$(man4dir)" NROFF = nroff MANS = $(dist_man_MANS) $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -81,6 +182,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -92,6 +194,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -108,21 +211,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -152,12 +258,16 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies man_MANS = twconfig.4 twpolicy.4 dist_man_MANS = twconfig.4 twpolicy.4 @@ -168,15 +278,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/man4/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/man4/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/man4/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign man/man4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -193,83 +302,84 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -install-man4: $(man4_MANS) $(man_MANS) +$(am__aclocal_m4_deps): +install-man4: $(dist_man_MANS) $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man4dir)" || $(mkdir_p) "$(DESTDIR)$(man4dir)" - @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.4*) list="$$list $$i" ;; \ - esac; \ + @list1=''; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ + test -n "$(man4dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.4[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 4*) ;; \ - *) ext='4' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \ + done; } + uninstall-man4: @$(NORMAL_UNINSTALL) - @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.4*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 4*) ;; \ - *) ext='4' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man4dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man4dir)/$$inst"; \ - done -tags: TAGS -TAGS: + @list=''; test -n "$(man4dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.4[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir) +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -278,7 +388,7 @@ check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man4dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -290,16 +400,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -318,18 +434,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-man +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-man4 +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -348,18 +484,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-man +uninstall-am: uninstall-man uninstall-man: uninstall-man4 -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-man4 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-info-am uninstall-man uninstall-man4 +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man4 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man4 + +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/man/man4/twconfig.4 b/man/man4/twconfig.4 index 38e2ffe..e584343 100644 --- a/man/man4/twconfig.4 +++ b/man/man4/twconfig.4 @@ -215,6 +215,17 @@ parameter; reports displayed by other modes and other commands are not affected. .br Initial value: \fI3\fP +.IP \f(CWHASH_DIRECT_IO\fP +Use direct i/o when hashing files. (Linux-only as of OST 2.4.3.2) +.br +Initial value: \fIfalse\fP +.IP \f(CWRESOLVE_IDS_TO_NAMES\fP +Specifies whether to resolve uid/gid values to user & group names. Static +binaries may segfault while calling getpwuid/getgrgid in certain +nsswitch.conf configurations, and setting this to false will bypass +the name resolution step and prevent the segfault. +.br +Initial value: \fItrue\fP .SS Email Notification Variables .IP \f(CWMAILMETHOD Specifies the protocol to be used by \fITripwire\fR for email @@ -291,7 +302,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR tripwire (8), diff --git a/man/man4/twpolicy.4 b/man/man4/twpolicy.4 index d896ea7..510ffe0 100644 --- a/man/man4/twpolicy.4 +++ b/man/man4/twpolicy.4 @@ -537,7 +537,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR tripwire (8), diff --git a/man/man5/Makefile.in b/man/man5/Makefile.in index 498de26..bf744fb 100644 --- a/man/man5/Makefile.in +++ b/man/man5/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,67 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -33,31 +85,80 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = man/man5 -DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man5dir = $(mandir)/man5 am__installdirs = "$(DESTDIR)$(man5dir)" NROFF = nroff MANS = $(dist_man_MANS) $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -81,6 +182,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -92,6 +194,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -108,21 +211,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -152,12 +258,16 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies man_MANS = twfiles.5 dist_man_MANS = twfiles.5 @@ -168,15 +278,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/man5/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/man5/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/man5/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign man/man5/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -193,83 +302,84 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -install-man5: $(man5_MANS) $(man_MANS) +$(am__aclocal_m4_deps): +install-man5: $(dist_man_MANS) $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)" - @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.5*) list="$$list $$i" ;; \ - esac; \ + @list1=''; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 5*) ;; \ - *) ext='5' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ + done; } + uninstall-man5: @$(NORMAL_UNINSTALL) - @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.5*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 5*) ;; \ - *) ext='5' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ - done -tags: TAGS -TAGS: + @list=''; test -n "$(man5dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.5[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -278,7 +388,7 @@ check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man5dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -290,16 +400,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -318,18 +434,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-man +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-man5 +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -348,18 +484,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-man +uninstall-am: uninstall-man uninstall-man: uninstall-man5 -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-man5 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-info-am uninstall-man uninstall-man5 +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man5 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man5 + +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/man/man5/twfiles.5 b/man/man5/twfiles.5 index 775e86b..4f6de6b 100644 --- a/man/man5/twfiles.5 +++ b/man/man5/twfiles.5 @@ -112,7 +112,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR tripwire (8), diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index 41c700d..4d628ae 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,67 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -33,31 +85,80 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = man/man8 -DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man8dir = $(mandir)/man8 am__installdirs = "$(DESTDIR)$(man8dir)" NROFF = nroff MANS = $(dist_man_MANS) $(man_MANS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -81,6 +182,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -92,6 +194,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -108,21 +211,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -152,12 +258,16 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8 dist_man_MANS = siggen.8 tripwire.8 twadmin.8 twintro.8 twprint.8 @@ -168,15 +278,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/man8/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/man8/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/man8/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign man/man8/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -193,83 +302,84 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -install-man8: $(man8_MANS) $(man_MANS) +$(am__aclocal_m4_deps): +install-man8: $(dist_man_MANS) $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ + @list1=''; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + uninstall-man8: @$(NORMAL_UNINSTALL) - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ - done -tags: TAGS -TAGS: + @list=''; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.8[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) +tags TAGS: -ctags: CTAGS -CTAGS: +ctags CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -278,7 +388,7 @@ check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -290,16 +400,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -318,18 +434,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-man +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-man8 +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -348,18 +484,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-man +uninstall-am: uninstall-man uninstall-man: uninstall-man8 -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-man8 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-info-am uninstall-man uninstall-man8 +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man8 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man8 + +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/man/man8/siggen.8 b/man/man8/siggen.8 index c4bd893..39ca44b 100644 --- a/man/man8/siggen.8 +++ b/man/man8/siggen.8 @@ -67,7 +67,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR tripwire (8), diff --git a/man/man8/tripwire.8 b/man/man8/tripwire.8 index 5017f97..5257735 100644 --- a/man/man8/tripwire.8 +++ b/man/man8/tripwire.8 @@ -567,7 +567,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR twadmin (8), diff --git a/man/man8/twadmin.8 b/man/man8/twadmin.8 index 034c188..ccce0fe 100644 --- a/man/man8/twadmin.8 +++ b/man/man8/twadmin.8 @@ -481,6 +481,10 @@ the local key. .BI \(hyQ " passphrase\fR, " --site-passphrase " passphrase" Specify site passphrase to be used when generating the site key. +.TP +.BI \(hyK " size\fR, " --key-size " size" +Specify the key size (1024 or 2048 bits) when generating +keys. (Default is 1024.) .\" ***************************************** .Hr .if \n(.t<700 .bp @@ -547,7 +551,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR tripwire (8), diff --git a/man/man8/twintro.8 b/man/man8/twintro.8 index 9279cf2..4ba3040 100644 --- a/man/man8/twintro.8 +++ b/man/man8/twintro.8 @@ -99,7 +99,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR tripwire (8), .BR twadmin (8), diff --git a/man/man8/twprint.8 b/man/man8/twprint.8 index ad33f86..6077b2a 100644 --- a/man/man8/twprint.8 +++ b/man/man8/twprint.8 @@ -145,7 +145,7 @@ Permission is granted to copy and distribute modified versions of this man page .PP Permission is granted to copy and distribute translations of this man page into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Tripwire, Inc. .PP -Copyright 2000 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. +Copyright 2000-2017 Tripwire, Inc. Tripwire is a registered trademark of Tripwire, Inc. in the United States and other countries. All rights reserved. .SH SEE ALSO .BR twintro (8), .BR tripwire (8), diff --git a/missing b/missing index 3aef1fb..f62bbae 100755 --- a/missing +++ b/missing @@ -1,7 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,9 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,260 +25,191 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: +case $1 in -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.3 - GNU automake" + echo "missing $scriptversion (GNU Automake)" + exit $? ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version > /dev/null 2>&1); then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar ${1+"$@"} && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar ${1+"$@"} && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; esac -exit 0 +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/mkinstalldirs b/mkinstalldirs index 0ea4d23..55d537f 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -1,40 +1,162 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman + +scriptversion=2009-04-28.21; # UTC + +# Original author: Noah Friedman # Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.1 2001/02/18 15:08:31 pherman Exp $ +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . +nl=' +' +IFS=" "" $nl" errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift + if test -d "$file"; then + shift + else + break + fi +done - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac +case $# in + 0) exit 0 ;; +esac - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the 'mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because '.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac - mkdir "$pathcomp" || lasterr=$? +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi + for d + do + test "x$d" = x && continue - pathcomp="$pathcomp/" - done + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done done exit $errstatus -# mkinstalldirs ends here +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/src/Makefile.am b/src/Makefile.am index 81df04b..f8e10cf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,4 @@ SUBDIRS = cryptlib core db fco fs tw twcrypto twparser util SUBDIRS+= twprint twadmin siggen tripwire twtest +EXTRA_DIST = buildnum.h buildnum.txt buildnuminc.pl dep_addprefix.pl rmcr.pl check_st.pl prime.pl parser test-harness core/md5.cpp core/sha.cpp diff --git a/src/Makefile.in b/src/Makefile.in index f32c498..c5e1faa 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,67 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -33,33 +85,106 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -83,6 +208,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -94,6 +220,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -110,21 +237,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -154,13 +284,19 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -SUBDIRS = cryptlib core db fco fs tw twcrypto twparser util twprint twadmin siggen tripwire twtest +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = cryptlib core db fco fs tw twcrypto twparser util twprint \ + twadmin siggen tripwire twtest +EXTRA_DIST = buildnum.h buildnum.txt buildnuminc.pl dep_addprefix.pl rmcr.pl check_st.pl prime.pl parser test-harness core/md5.cpp core/sha.cpp all: all-recursive .SUFFIXES: @@ -168,15 +304,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -193,19 +328,28 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: +$(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -213,60 +357,20 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -278,79 +382,104 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || mkdir "$(distdir)/$$subdir" \ - || exit 1; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="../$(top_distdir)" \ - distdir="../$(distdir)/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -370,16 +499,22 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -398,18 +533,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -428,21 +583,24 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-tags distdir dvi dvi-am \ + html html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-recursive ctags ctags-recursive \ - distclean distclean-generic distclean-recursive distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/buildnum.txt b/src/buildnum.txt index d00491f..573541a 100644 --- a/src/buildnum.txt +++ b/src/buildnum.txt @@ -1 +1 @@ -1 +0 diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 06fd356..17ac252 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -1,8 +1,9 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libcore.a +libcore_adir=. libcore_a_SOURCES = \ file_unix.cpp unixfsservices.cpp \ archive.cpp charutil.cpp \ @@ -12,16 +13,28 @@ libcore_a_SOURCES = \ errorutil.cpp fileerror.cpp fileheader.cpp fsservices.cpp \ growheap.cpp hashtable.cpp haval.cpp msystem.cpp ntmbs.cpp \ objectpool.cpp refcountobj.cpp serializable.cpp serializer.cpp \ - serializerimpl.cpp serializerutil.cpp serstring.cpp \ + serializerimpl.cpp serializerutil.cpp serstring.cpp \ srefcountobj.cpp srefcounttbl.cpp stdcore.cpp stringutil.cpp \ timebomb.cpp timeconvert.cpp tw_signal.cpp twlimits.cpp twlocale.cpp \ unixexcept.cpp usernotify.cpp usernotifystdout.cpp utf8.cpp \ wchar16.cpp +libcore_a_HEADERS = archive.h charutil.h cmdlineparser.h codeconvert.h \ + core.h coreerrors.h corestrings.h crc32.h debug.h displayencoder.h \ + displayutil.h error.h errorbucket.h errorbucketimpl.h errorgeneral.h \ + errortable.h errorutil.h file.h fileerror.h fileheader.h fixedfilebuf.h \ + fsservices.h growheap.h hashtable.h haval.h md5.h msystem.h ntdbs.h \ + ntmbs.h objectpool.h package.h platform.h refcountobj.h resources.h \ + serializable.h serializer.h serializerimpl.h serializerutil.h serstring.h \ + sha.h srefcountobj.h srefcounttbl.h stdcore.h stringutil.h tasktimer.h \ + tchar.h timebomb.h timeconvert.h tw_signal.h twlimits.h twlocale.h \ + twstringslang.h typed.h types.h unixexcept.h unixfsservices.h upperbound.h \ + usernotify.h usernotifystdout.h utf8.h wchar16.h + libcore_a_LIBADD = @CORE_CRYPT_O@ libcore_a_DEPENDENCIES = @CORE_CRYPT_O@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libcore_a_OBJECTS) $(libcore_a_LIBADD) diff --git a/src/core/Makefile.in b/src/core/Makefile.in index 0b62769..e56f419 100644 --- a/src/core/Makefile.in +++ b/src/core/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libcore_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/core -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libcore_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libcore_a_AR = $(AR) $(ARFLAGS) am_libcore_a_OBJECTS = file_unix.$(OBJEXT) unixfsservices.$(OBJEXT) \ archive.$(OBJEXT) charutil.$(OBJEXT) cmdlineparser.$(OBJEXT) \ @@ -70,23 +128,95 @@ am_libcore_a_OBJECTS = file_unix.$(OBJEXT) unixfsservices.$(OBJEXT) \ usernotify.$(OBJEXT) usernotifystdout.$(OBJEXT) utf8.$(OBJEXT) \ wchar16.$(OBJEXT) libcore_a_OBJECTS = $(am_libcore_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libcore_a_SOURCES) DIST_SOURCES = $(libcore_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libcore_adir)" +HEADERS = $(libcore_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -102,7 +232,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -110,6 +240,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -121,6 +252,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -137,21 +269,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -181,15 +316,20 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libcore.a +libcore_adir = . libcore_a_SOURCES = \ file_unix.cpp unixfsservices.cpp \ archive.cpp charutil.cpp \ @@ -199,12 +339,24 @@ libcore_a_SOURCES = \ errorutil.cpp fileerror.cpp fileheader.cpp fsservices.cpp \ growheap.cpp hashtable.cpp haval.cpp msystem.cpp ntmbs.cpp \ objectpool.cpp refcountobj.cpp serializable.cpp serializer.cpp \ - serializerimpl.cpp serializerutil.cpp serstring.cpp \ + serializerimpl.cpp serializerutil.cpp serstring.cpp \ srefcountobj.cpp srefcounttbl.cpp stdcore.cpp stringutil.cpp \ timebomb.cpp timeconvert.cpp tw_signal.cpp twlimits.cpp twlocale.cpp \ unixexcept.cpp usernotify.cpp usernotifystdout.cpp utf8.cpp \ wchar16.cpp +libcore_a_HEADERS = archive.h charutil.h cmdlineparser.h codeconvert.h \ + core.h coreerrors.h corestrings.h crc32.h debug.h displayencoder.h \ + displayutil.h error.h errorbucket.h errorbucketimpl.h errorgeneral.h \ + errortable.h errorutil.h file.h fileerror.h fileheader.h fixedfilebuf.h \ + fsservices.h growheap.h hashtable.h haval.h md5.h msystem.h ntdbs.h \ + ntmbs.h objectpool.h package.h platform.h refcountobj.h resources.h \ + serializable.h serializer.h serializerimpl.h serializerutil.h serstring.h \ + sha.h srefcountobj.h srefcounttbl.h stdcore.h stringutil.h tasktimer.h \ + tchar.h timebomb.h timeconvert.h tw_signal.h twlimits.h twlocale.h \ + twstringslang.h typed.h types.h unixexcept.h unixfsservices.h upperbound.h \ + usernotify.h usernotifystdout.h utf8.h wchar16.h + libcore_a_LIBADD = @CORE_CRYPT_O@ libcore_a_DEPENDENCIES = @CORE_CRYPT_O@ all: all-am @@ -215,15 +367,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/core/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/core/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/core/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/core/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -240,13 +391,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcore.a: $(libcore_a_OBJECTS) $(libcore_a_DEPENDENCIES) - -rm -f libcore.a - $(libcore_a_AR) libcore.a $(libcore_a_OBJECTS) $(libcore_a_LIBADD) - $(RANLIB) libcore.a + +libcore.a: $(libcore_a_OBJECTS) $(libcore_a_DEPENDENCIES) $(EXTRA_libcore_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcore.a + $(AM_V_AR)$(libcore_a_AR) libcore.a $(libcore_a_OBJECTS) $(libcore_a_LIBADD) + $(AM_V_at)$(RANLIB) libcore.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -255,91 +408,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libcore_aHEADERS: $(libcore_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libcore_a_HEADERS)'; test -n "$(libcore_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libcore_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libcore_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcore_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcore_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libcore_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libcore_a_HEADERS)'; test -n "$(libcore_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libcore_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libcore_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -350,16 +533,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -379,18 +568,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libcore_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -409,22 +618,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libcore_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libcore_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libcore_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libcore_a_OBJECTS) $(libcore_a_LIBADD) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/core/archive.cpp b/src/core/archive.cpp index f9e7a16..ab4e7cf 100644 --- a/src/core/archive.cpp +++ b/src/core/archive.cpp @@ -51,15 +51,6 @@ #include "corestrings.h" // for: STR_ERR2_ARCH_CRYPTO_ERR - - -#if FSEEK_TAKES_INT32 -#define FSEEK(x, y, z) fseek((x), (int32)(y), (z)) -#else -#define FSEEK(x, y, z) fseek((x), (y), (z)) -#endif - - //============================================================================= // Utility Functions //============================================================================= @@ -678,8 +669,10 @@ void cFileArchive::OpenRead(const TCHAR* filename, uint32 openFlags) uint32 flags = cFile::OPEN_READ; flags |= ( ( openFlags & FA_OPEN_TRUNCATE ) ? cFile::OPEN_TRUNCATE : 0 ); flags |= ( ( openFlags & FA_OPEN_TEXT ) ? cFile::OPEN_TEXT : 0 ); - flags |= ( ( openFlags & FA_NONBLOCKING ) ? cFile::OPEN_NONBLOCKING :0 ); + flags |= ( ( openFlags & FA_SCANNING ) ? cFile::OPEN_SCANNING : 0 ); + flags |= ( ( openFlags & FA_DIRECT ) ? cFile::OPEN_DIRECT : 0 ); + mOpenFlags = openFlags; mCurrentFilename = filename; mCurrentFile.Open( filename, flags ); isWritable = false; @@ -704,8 +697,10 @@ void cFileArchive::OpenReadWrite(const TCHAR* filename, uint32 openFlags) uint32 flags = cFile::OPEN_WRITE; flags |= ( ( openFlags & FA_OPEN_TRUNCATE ) ? cFile::OPEN_TRUNCATE : 0 ); flags |= ( ( openFlags & FA_OPEN_TEXT ) ? cFile::OPEN_TEXT : 0 ); - flags |= ( ( openFlags & FA_NONBLOCKING ) ? cFile::OPEN_NONBLOCKING :0 ); + flags |= ( ( openFlags & FA_SCANNING ) ? cFile::OPEN_SCANNING : 0 ); + flags |= ( ( openFlags & FA_DIRECT ) ? cFile::OPEN_DIRECT : 0 ); + mOpenFlags = openFlags; mCurrentFilename = filename; mCurrentFile.Open( filename, flags ); isWritable = true; @@ -753,9 +748,10 @@ void cFileArchive::Close() ///////////////////////////////////////////////////////////////////////// int cFileArchive::Read(void* pDest, int count) { + try { - if ( mReadHead + count > mFileSize ) + if ( mReadHead + count > mFileSize && !(mOpenFlags & FA_DIRECT)) count = static_cast( mFileSize - mReadHead ); if ( pDest != NULL ) diff --git a/src/core/archive.h b/src/core/archive.h index e4dccfb..d70d977 100644 --- a/src/core/archive.h +++ b/src/core/archive.h @@ -260,7 +260,8 @@ public: { FA_OPEN_TEXT = 0x1, FA_OPEN_TRUNCATE = 0x2, - FA_NONBLOCKING = 0x4 + FA_SCANNING = 0x4, + FA_DIRECT = 0x8 }; // TODO: Open should throw @@ -292,6 +293,7 @@ protected: bool isWritable; cFile mCurrentFile; TSTRING mCurrentFilename; //current file + uint32 mOpenFlags; }; /////////////////////////////////////////////////////////////// diff --git a/src/core/charutil.cpp b/src/core/charutil.cpp index e001c9d..48326b8 100644 --- a/src/core/charutil.cpp +++ b/src/core/charutil.cpp @@ -41,27 +41,12 @@ #include "charutil.h" #include "ntmbs.h" -/* NOW WE USE tss::strinc -// like mblen but also for wchar_t -int util_tlen( const TCHAR* cur, size_t count ) -{ - int nch = -2; // 'unused' value - - ASSERT( count >= 0 ); - #ifdef _UNICODE - if( count > 0 ) - nch = 1; // next char is always one TCHAR long - else - nch = 0; // no more chars - #else - nch = ::mblen( cur, count ); // here sizeof(TCHAR) == 1 - #endif - - ASSERT( nch != -2 ); // make sure nch was set - return nch; +#if IS_ANDROID +int mblen(const char *s, size_t n) +{ + return mbtowc(0, s, n); } -*/ - +#endif // // finds the next whole character in string identified by ['cur'-'end') @@ -105,51 +90,29 @@ bool cCharUtil::PeekNextChar( const TSTRING::const_iterator& cur, } first = cur; -// last = tss::strinc( cur ); - last = *cur ? cur + 1 : cur; + + if (!(*cur)) + { + last = cur; + } + else + { +#if !IS_AROS + mblen (NULL, 0); + int len = mblen(&*cur, MB_CUR_MAX); + if (len < 0) //invalid multibyte sequence, but let's not blow up. + len = 1; + + last = cur + len; +#else // AROS mblen() seems broken (as of 6/2016) so don't use it. + last = cur + 1; +#endif + } + return true; } -/* OLD way of doing this... - NOW WE USE tss::strinc -int cCharUtil::PeekNextChar( const TSTRING::const_iterator& cur, - const TSTRING::const_iterator& end, - TSTRING::const_iterator& first, - TSTRING::const_iterator& last, - bool fThrowOnError ) -{ - // - // do we have a valid string here? - // - if( cur > end ) - return -1; - - // - // determine length of character in TCHARs - // - int charSizeInTCHARs = util_tlen( cur, (size_t)end - (size_t)cur ); - if( charSizeInTCHARs == -1 ) // TODO:BAM -- what if size is zero? does that make sense? - { - if( fThrowOnError ) - throw eCharUtilUnrecognizedChar(); - else - return -1; - } - - // - // denote beginning and end of character - // - first = cur; // first char always starts at 'cur' - last = first + charSizeInTCHARs; - - // - // there exist more characters - // - return charSizeInTCHARs; -} -*/ - //============================================================================= // // /* static */ diff --git a/src/core/codeconvert.cpp b/src/core/codeconvert.cpp old mode 100644 new mode 100755 index 727c2c7..07d40f2 --- a/src/core/codeconvert.cpp +++ b/src/core/codeconvert.cpp @@ -1,4 +1,4 @@ -// + // The developer of the original code and/or files is Tripwire, Inc. // Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, // Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights @@ -57,20 +57,15 @@ // DEFINES //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* - * ICONV conversion seems to be broken under Linux, so until - * this is fixed, we'll wing it ourselves - 20010310 PH - */ -#if 0 #define TSS_USE_ICONV_CCONV16 HAVE_ICONV_H #define TSS_USE_UCS2_CCONV16 (!(HAVE_ICONV_H) && WCHAR_REP_IS_UCS2 && WCHAR_IS_16_BITS) #define TSS_USE_UCS2_CCONV32 (!(HAVE_ICONV_H) && WCHAR_REP_IS_UCS2 && WCHAR_IS_32_BITS) -#else -#define TSS_USE_UCS2_CCONV16 (WCHAR_REP_IS_UCS2 && WCHAR_IS_16_BITS) -#define TSS_USE_UCS2_CCONV32 (WCHAR_REP_IS_UCS2 && WCHAR_IS_32_BITS) -#endif - #define ICONV_SOURCE_TYPE const char +#if ICONV_CONST_SOURCE +# define ICONV_SOURCE_TYPE const char +#else +# define ICONV_SOURCE_TYPE char +#endif //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Static Data @@ -245,7 +240,6 @@ namespace /*Unique*/ eConverterUnknownCodepage( TSS_GetString( cCore, core::STR_UNKNOWN ) ); break; - default: throw eConverterFatal( @@ -677,31 +671,44 @@ namespace /*Unique*/ BufferT* pBuf = pBuffer; const SourceT* pSrc = pSource; - - //--Start Iterative Conversion - while ( nSourceLeft > 0 ) { // Convert as much of the sequence as we can. + SourceT* pIconvSrc = (SourceT*)pSrc; + BufferT* pIconvDest = (BufferT*)pBuf; + size_t nbIconvSrc = (size_t)nSourceLeft; + size_t nbIconvDest = (size_t)nBufferLeft; - // NOTE: On solaris sparc, iconv will attempt to NULL terminate the output, - // so make sure that the buffer has space for a terminating NULL - size_t nConv = // NOTE: + size_t nConv = iconv( convForward, (ICONV_SOURCE_TYPE**)&pIconvSrc, &nbIconvSrc, (char**)&pIconvDest, &nbIconvDest ); + + if( nConv == -1 ) + { + // NOTE: On solaris sparc, iconv will attempt to NULL terminate the output, + // so make sure that the buffer has space for a terminating NULL + size_t nConv = // NOTE: #if SUPPORTS_EXPLICIT_TEMPLATE_FUNC_INST - tss_ConvertOneCharacter( + tss_ConvertOneCharacter( #else - tss_ConvertOneCharacter( + tss_ConvertOneCharacter( #endif - convForward, - convReverse, // On return, these addresses - (const char**)&pSrc, // are set for one past the last - &nSourceLeft, // "item" converted successfully - (char**)&pBuf, - &nBufferLeft + convForward, + convReverse, // On return, these addresses + (const char**)&pSrc, // are set for one past the last + &nSourceLeft, // "item" converted successfully + (char**)&pBuf, + &nBufferLeft #if ( ! SUPPORTS_EXPLICIT_TEMPLATE_FUNC_INST ) - , BufferT(), SourceT() + , BufferT(), SourceT() #endif - ); + ); + } + else + { + pSrc = pIconvSrc; + pBuf = pIconvDest; + nSourceLeft = nbIconvSrc; + nBufferLeft = nbIconvDest; + } if ( nConv == (size_t)-1 ) // Indidates Conversion Error! { @@ -1131,7 +1138,7 @@ const char* cIconvUtil::GetCodePageID() const char* pCurCodePage; if( ! GetCodePageID( &pCurCodePage ) ) - throw eConverterUnknownCodepage(); + return NULL; return pCurCodePage; } @@ -1139,9 +1146,11 @@ const char* cIconvUtil::GetCodePageID() /* static */ const char* cIconvUtil::GetIconvDbIdentifier() { - ASSERT( false ); - throw eConverterUnknownCodepage(); - return NULL; +#ifdef WORDS_BIGENDIAN + return "UTF-16BE"; +#else + return "UTF-16LE"; +#endif } /* static */ @@ -1177,6 +1186,9 @@ void cIconvUtil::CloseHandle( iconv_t ic ) /* static */ bool cIconvUtil::TestConverter( const char* pTo, const char* pFrom ) { + if (!pTo || !pFrom) + return false; + cDebug d( "cIconvUtil::TestConverter()" ); iconv_t i = iconv_open( pTo, pFrom ); diff --git a/src/core/debug.cpp b/src/core/debug.cpp index 6a6fbc2..7914f93 100644 --- a/src/core/debug.cpp +++ b/src/core/debug.cpp @@ -89,17 +89,6 @@ void cDebug::Trace(int levelNum, const char* format, ...) } -void cDebug::Trace(int levelNum, const wchar_t* format, ...) -{ - if (levelNum > mDebugLevel) - return; - // create the output buffer - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); - -} /////////////////////////////////////////////////////////////////////////////// // DoTrace() @@ -146,56 +135,6 @@ void cDebug::DoTrace(const char *format, va_list &args) logfile.flush(); } } - -void cDebug::DoTrace(const wchar_t *format, va_list &args) -{ -#if IS_UNIX - // we don't support vswprintf on UNIX - ASSERT(false); - THROW_INTERNAL("debug.cpp"); -#else - - size_t guard1 = 0xBABABABA; - wchar_t out[2048]; - size_t guard2 = 0xBABABABA; - - vswprintf(out, format, args); - - ASSERT(guard1 == 0xBABABABA && guard2 == 0xBABABABA); // string was too long - char nout[1024]; - if (wcstombs(nout, out, 1024) == -1) - strcpy(nout, "XXX Unconvertable wide char detected in cDebug::DoTrace()\n"); - - std::ostringstream ostr; - ostr.setf(std::ios::left); - ostr.width(40); - ostr << mLabel; - ostr.width(0); - ostr << nout; - - - if ((mOutMask & OUT_STDOUT) != 0) - { - std::cout << ostr.str().c_str(); - std::cout.flush(); - } - - // - //make it output to log file! - // - if ((mOutMask & OUT_FILE) != 0) - { - // the logfile is narrow chars only... - logfile.setf(std::ios::left); - logfile.width(40); - logfile << mLabel; - logfile.width(0); - logfile << out; - logfile.flush(); - } -#endif // IS_UNIX -} - #ifdef DEBUG // @@ -275,90 +214,11 @@ void cDebug::TraceNever(const char *format, ...) va_end(args); } -void cDebug::TraceAlways(const wchar_t *format, ...) -{ - if (D_ALWAYS > mDebugLevel) - return; - - // fill up arglist, and pass to printing routine - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); -} - -void cDebug::TraceError(const wchar_t *format, ...) -{ - if (D_ERROR > mDebugLevel) - return; - - // fill up arglist, and pass to printing routine - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); -} - -void cDebug::TraceWarning(const wchar_t *format, ...) -{ - if (D_WARNING > mDebugLevel) - return; - - // fill up arglist, and pass to printing routine - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); -} - -void cDebug::TraceDebug(const wchar_t *format, ...) -{ - if (D_DEBUG > mDebugLevel) - return; - - // fill up arglist, and pass to printing routine - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); -} - -void cDebug::TraceDetail(const wchar_t *format, ...) -{ - if (D_DETAIL > mDebugLevel) - return; - - // fill up arglist, and pass to printing routine - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); -} - -void cDebug::TraceNever(const wchar_t *format, ...) -{ - if (D_NEVER > mDebugLevel) - return; - - // fill up arglist, and pass to printing routine - va_list args; - va_start(args, format); - DoTrace(format, args); - va_end(args); -} - void cDebug::TraceVaArgs( int iDebugLevel, const char *format, va_list &args ) { if ( iDebugLevel <= mDebugLevel ) DoTrace( format, args); } - -void cDebug::TraceVaArgs( int iDebugLevel, const wchar_t *format, va_list &args ) -{ - if ( iDebugLevel <= mDebugLevel ) - DoTrace( format, args ); -} - #endif // DEBUG /////////////////////////////////////////////////////////////////////////////// @@ -447,79 +307,12 @@ void cDebug::DebugOut( const char* lpOutputString, ... ) vsprintf(buf, lpOutputString, args); va_end(args); -#ifdef _UNICODE - wchar_t wbuf[2048]; - if (mbstowcs(wbuf, buf, strlen(buf)+1) == -1) - wcscpy(wbuf, _T("XXX Unconvertable mb character detected in cDebug::DebugOut()\n") ); - - #if !USE_OUTPUT_DEBUG_STRING - #ifdef _DEBUG - TCERR << wbuf; - #endif //_DEBUG - #else // USE_OUTPUT_DEBUG_STRING - ::OutputDebugString(wbuf); - #endif // USE_OUTPUT_DEBUG_STRING -#else // _UNICODE - #if !USE_OUTPUT_DEBUG_STRING - #ifdef _DEBUG - TCERR << buf; - #endif //_DEBUG - #else // USE_OUTPUT_DEBUG_STRING - ::OutputDebugString(buf); - #endif // USE_OUTPUT_DEBUG_STRING -#endif // _UNICODE + #ifdef _DEBUG + TCERR << buf; + #endif //_DEBUG TCOUT.flush(); } - -void cDebug::DebugOut( const wchar_t* lpOutputString, ... ) -{ - va_list args; - va_start(args, lpOutputString); - -#if IS_UNIX - char mbformatbuf[1024]; - char buf[1024]; -// if (wcstombs(mbformatbuf, lpOutputString, wcslen(lpOutputString)) == -1) -// strcpy(mbformatbuf, "XXX Unconvertable wide char detected in cDebug::DebugOut()\n"); - - vsprintf(buf, mbformatbuf, args); -#else - - wchar_t buf[1024]; - vswprintf(buf, lpOutputString, args); -#endif - va_end(args); - -#ifdef _UNICODE - #if !USE_OUTPUT_DEBUG_STRING - #ifdef _DEBUG - TCERR << buf; - #endif //_DEBUG - #else // USE_OUTPUT_DEBUG_STRING - ::OutputDebugString(buf); - #endif // USE_OUTPUT_DEBUG_STRING -#else - char nbuf[1024]; - #if IS_UNIX - strcpy(nbuf, buf); - #else - if (wcstombs(nbuf, buf, wcslen(buf)+1) == -1) - strcpy(nbuf, "XXX Unconvertable wide char detected in cDebug::DebugOut()\n"); -#endif - -#if !USE_OUTPUT_DEBUG_STRING - #ifdef _DEBUG - TCERR << nbuf; - #endif //_DEBUG -#else // USE_OUTPUT_DEBUG_STRING - ::OutputDebugString(nbuf); -#endif // USE_OUTPUT_DEBUG_STRING - #endif - - TCOUT.flush(); -} - #endif // DEBUG ////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/debug.h b/src/core/debug.h index 18310f5..d7b0033 100644 --- a/src/core/debug.h +++ b/src/core/debug.h @@ -113,22 +113,15 @@ public: void TraceDebug (const char *format, ...); void TraceDetail (const char *format, ...); void TraceNever (const char *format, ...); - void TraceAlways (const wchar_t *format, ...); - void TraceError (const wchar_t *format, ...); - void TraceWarning (const wchar_t *format, ...); - void TraceDebug (const wchar_t *format, ...); - void TraceDetail (const wchar_t *format, ...); - void TraceNever (const wchar_t *format, ...); + // these are of use if you are inside a function with a "..." as an argument // and you want to trace those args void TraceVaArgs (int iDebugLevel, const char *format, va_list &args); - void TraceVaArgs (int iDebugLevel, const wchar_t *format, va_list &args); // ...but you can still choose to use this interface... void Trace(int levelNum, const char* format, ...); - void Trace(int levelNum, const wchar_t* format, ...); // Outputs based on levelnum. If levelnum <= global debug, print. public: @@ -146,7 +139,6 @@ public: // level will be output. static void DebugOut ( const char* lpOutputString, ... ); - static void DebugOut ( const wchar_t* lpOutputString, ... ); // Works just like TRACE // note: there is an internal buffer size of 1024; traces larger // than that will have unpredictable and probably bad results @@ -161,7 +153,6 @@ private: // helper functions void DoTrace(const char *format, va_list &args); - void DoTrace(const wchar_t *format, va_list &args); #endif }; @@ -199,16 +190,8 @@ inline void cDebug::TraceWarning (const char *, ...) {} inline void cDebug::TraceDebug (const char *, ...) {} inline void cDebug::TraceDetail (const char *, ...) {} inline void cDebug::TraceNever (const char *, ...) {} -inline void cDebug::TraceAlways (const wchar_t *, ...) {} -inline void cDebug::TraceError (const wchar_t *, ...) {} -inline void cDebug::TraceWarning (const wchar_t *, ...) {} -inline void cDebug::TraceDebug (const wchar_t *, ...) {} -inline void cDebug::TraceDetail (const wchar_t *, ...) {} -inline void cDebug::TraceNever (const wchar_t *, ...) {} inline void cDebug::TraceVaArgs (int, const char *, va_list &) {} -inline void cDebug::TraceVaArgs (int, const wchar_t *, va_list &) {} inline void cDebug::Trace (int, const char*, ...) {} -inline void cDebug::Trace (int, const wchar_t*, ...) {} inline bool cDebug::AddOutTarget (OutTarget) { return false; } inline bool cDebug::RemoveOutTarget (OutTarget) { return false; } inline bool cDebug::HasOutTarget (OutTarget) { return false; } @@ -216,7 +199,6 @@ inline bool cDebug::SetOutputFile (const char*) { return false; } inline void cDebug::SetDebugLevel (int) {} inline int cDebug::GetDebugLevel (void) { return 0; } inline void cDebug::DebugOut ( const char*, ... ) {} -inline void cDebug::DebugOut ( const wchar_t*, ... ) {} #endif // DEBUG diff --git a/src/core/displayencoder.cpp b/src/core/displayencoder.cpp index 1453d03..b6027e9 100644 --- a/src/core/displayencoder.cpp +++ b/src/core/displayencoder.cpp @@ -235,32 +235,7 @@ bool cNonNarrowableCharEncoder::NeedsEncoding( TSTRING::const_iterator first, TSTRING::const_iterator last ) const { - -#ifdef _UNICODE - - ASSERT( IsSingleTCHAR( first, last ) ); - - char amb[ MB_LEN_MAX ]; - TCHAR awch[] = { *first, 0 }; - - // TODO:BAM -- this is not really correct! Convert will not honor nSource!! - // it looks for the first null char! - try - { - int ret = iCodeConverter::GetInstance()->Convert( amb, sizeof( amb ), awch, 1 ); - return( -1 == ret ); - } - catch( eError& ) - { - return true; - } - -#else - return false; // all chars are narrow - -#endif - } diff --git a/src/core/file.h b/src/core/file.h index ebdba9d..1964e31 100644 --- a/src/core/file.h +++ b/src/core/file.h @@ -47,7 +47,7 @@ #include "fileerror.h" #endif -#ifdef __MINT__ // for off_t +#if IS_MINT // for off_t #include #endif @@ -98,7 +98,8 @@ public: OPEN_CREATE = 0x00000010, // create the file if it doesn't exist; this is implicit if OF_TRUNCATE is set OPEN_TEXT = 0x00000020, OPEN_EXCLUSIVE = 0x00000040, // Use O_CREAT | O_EXCL - OPEN_NONBLOCKING = 0x00000080, // Use non-blocking i/o [Unix] + OPEN_SCANNING = 0x00000080, // Open for scanning; set nonblocking & caching accordingly, where available + OPEN_DIRECT = 0x00000100 // Use O_DIRECT or platform equivalent }; //Ctor, Dtor, CpyCtor, Operator=: @@ -142,8 +143,8 @@ public: }; -#ifdef __AROS__ -class cArosPath +#if USES_DEVICE_PATH +class cDevicePath { public: static TSTRING AsPosix(const TSTRING& in); diff --git a/src/core/file_unix.cpp b/src/core/file_unix.cpp index 22c259e..d896cac 100644 --- a/src/core/file_unix.cpp +++ b/src/core/file_unix.cpp @@ -1,4 +1,4 @@ -// + // The developer of the original code and/or files is Tripwire, Inc. // Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, // Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights @@ -31,6 +31,13 @@ // // file_unix.cpp : Specific implementation of file operations for Unix. + +/* On GNU/Hurd, need to define _GNU_SOURCE in order to use O_NOATIME + which technically is still a nonstandard extension to open() */ +#if IS_HURD +# define _GNU_SOURCE +#endif + #include "core/stdcore.h" #if !IS_UNIX @@ -46,27 +53,15 @@ #include #include +#if HAVE_SYS_FS_VX_IOCTL_H +# include +#endif + #include "core/debug.h" #include "core/corestrings.h" #include "core/fsservices.h" #include "core/errorutil.h" -/////////////////////////////////////////////////////////////////////////////// -// util_GetErrnoString -- return the result of strerror(errno) as a tstring -/////////////////////////////////////////////////////////////////////////////// -/*static TSTRING util_GetErrnoString() -{ - TSTRING ret; - char* pErrorStr = strerror(errno); -#ifdef _UNICODE -#error We dont currently support unicode on unix -#else - ret = pErrorStr; -#endif - return ret; -}*/ - -/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // cFile_i : Insulated implementation for cFile objects. /////////////////////////////////////////////////////////////////////////// @@ -76,8 +71,10 @@ struct cFile_i cFile_i(); ~cFile_i(); + int m_fd; //underlying file descriptor FILE* mpCurrStream; //currently defined file stream TSTRING mFileName; //the name of the file we are currently referencing. + uint32 mFlags; //Flags used to open the file }; //Ctor @@ -92,6 +89,17 @@ cFile_i::~cFile_i() fclose( mpCurrStream ); mpCurrStream = NULL; +#if IS_AROS + if( mFlags & cFile::OPEN_LOCKED_TEMP ) + { + // unlink this file + if( 0 != unlink(mFileName.c_str())) + { + throw( eFileOpen( mFileName, iFSServices::GetInstance()->GetErrString() ) ); + } + } +#endif + mFileName.empty(); } @@ -120,31 +128,33 @@ cFile::~cFile() // Open /////////////////////////////////////////////////////////////////////////////// -#ifndef __AROS +#if !USES_DEVICE_PATH void cFile::Open( const TSTRING& sFileName, uint32 flags ) { #else void cFile::Open( const TSTRING& sFileNameC, uint32 flags ) { - TSTRING sFileName = cArosPath::AsNative(sFileNameC); + TSTRING sFileName = cDevicePath::AsNative(sFileNameC); #endif mode_t openmode = 0664; - if ( mpData->mpCurrStream != NULL ) + if (mpData->mpCurrStream != NULL) Close(); + mpData->mFlags = flags; + // - // set up the sopen permissions + // set up the open permissions // int perm = 0; TSTRING mode; - if( flags & OPEN_WRITE ) + if (flags & OPEN_WRITE) { perm |= O_RDWR; isWritable = true; mode = _T("rb"); - if( flags & OPEN_TRUNCATE ) + if (flags & OPEN_TRUNCATE) { perm |= O_TRUNC; perm |= O_CREAT; @@ -160,18 +170,31 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags ) mode = _T("rb"); } - if ( flags & OPEN_EXCLUSIVE ) { + if (flags & OPEN_EXCLUSIVE) { perm |= O_CREAT | O_EXCL; openmode = (mode_t) 0600; // Make sure only root can read the file } - if ( flags & OPEN_CREATE ) - perm |= O_CREAT; + if (flags & OPEN_CREATE) + perm |= O_CREAT; #ifdef O_NONBLOCK - if( flags & OPEN_NONBLOCKING ) - perm |= O_NONBLOCK; + if (flags & OPEN_SCANNING) + perm |= O_NONBLOCK; #endif + +#ifdef O_NOATIME + if (flags & OPEN_SCANNING) + perm |= O_NOATIME; +#endif + +#ifdef O_DIRECT + //Only use O_DIRECT for scanning, since cfg/policy/report reads + // don't happen w/ a nice round block size. + if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING)) + perm |= O_DIRECT; +#endif + // // actually open the file // @@ -180,8 +203,9 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags ) { throw( eFileOpen( sFileName, iFSServices::GetInstance()->GetErrString() ) ); } + mpData->m_fd = fh; -#ifndef __AROS__ +#if !IS_AROS if( flags & OPEN_LOCKED_TEMP ) { // unlink this file @@ -202,6 +226,34 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags ) mpData->mFileName = sFileName; //Set mFileName to the newly opened file. cFile::Rewind(); + +#ifdef F_NOCACHE //OSX + if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING)) + fcntl(fh, F_NOCACHE, 1); +#endif + +#if IS_SOLARIS + if ((flags & OPEN_DIRECT) && (flags & OPEN_SCANNING)) + directio(fh, DIRECTIO_ON); +#endif + +#if HAVE_POSIX_FADVISE + if (flags & OPEN_SCANNING && !(flags & OPEN_DIRECT)) + { + posix_fadvise(fh,0,0, POSIX_FADV_SEQUENTIAL); + posix_fadvise(fh,0,0, POSIX_FADV_NOREUSE); + } + +#elif HAVE_SYS_FS_VX_IOCTL_H + if (flags & OPEN_SCANNING) + { + if (flags & OPEN_DIRECT) + ioctl(fh, VX_SETCACHE, VX_DIRECT); + else + ioctl(fh, VX_SETCACHE, VX_SEQ | VX_NOREUSE); + } +#endif + } @@ -212,9 +264,15 @@ void cFile::Close() //throw(eFile) { if(mpData->mpCurrStream != NULL) { +#ifdef HAVE_POSIX_FADVISE + posix_fadvise(fileno(mpData->mpCurrStream),0,0, POSIX_FADV_DONTNEED); +#endif + fclose( mpData->mpCurrStream ); mpData->mpCurrStream = NULL; } + + mpData->mFileName.empty(); } @@ -289,12 +347,19 @@ cFile::File_t cFile::Read( void* buffer, File_t nBytes ) const //throw(eFile) if( nBytes == 0 ) return 0; - iBytesRead = fread( buffer, sizeof(byte), nBytes, mpData->mpCurrStream ); - - if( ferror( mpData->mpCurrStream ) != 0 ) - throw eFileRead( mpData->mFileName, iFSServices::GetInstance()->GetErrString() ) ; - else - return iBytesRead; + if (mpData->mFlags & OPEN_DIRECT) { + iBytesRead = read(mpData->m_fd, buffer, nBytes); + if (iBytesRead<0) { + throw eFileRead(mpData->mFileName, iFSServices::GetInstance()->GetErrString()); + } + } else { + iBytesRead = fread( buffer, sizeof(byte), nBytes, mpData->mpCurrStream ); + if( ferror( mpData->mpCurrStream ) != 0 ) { + throw eFileRead( mpData->mFileName, iFSServices::GetInstance()->GetErrString() ) ; + } + } + + return iBytesRead; } /////////////////////////////////////////////////////////////////////////// @@ -384,30 +449,51 @@ void cFile::Truncate( File_t offset ) // throw(eFile) } -#ifdef __AROS__ -TSTRING cArosPath::AsPosix( const TSTRING& in ) +#if USES_DEVICE_PATH +// For paths of type DH0:/dir/file +TSTRING cDevicePath::AsPosix( const TSTRING& in ) { if (in[0] == '/') return in; +#if IS_DOS_DJGPP + TSTRING out = "/dev/" + in; + std::replace(out.begin(), out.end(), '\\', '/'); +#else TSTRING out = '/' + in; +#endif + std::replace(out.begin(), out.end(), ':', '/'); return out; } -TSTRING cArosPath::AsNative( const TSTRING& in ) +TSTRING cDevicePath::AsNative( const TSTRING& in ) { if (in[0] != '/') return in; - int x; - for (x=1; in[x] == '/' && x= 8) + out.append(in.substr(7)); + + return out; + +#elif IS_AROS + int x = 1; + for ( x; in[x] == '/' && x( N ); // know len is less than MAXBYTES ::memcpy( mID, pszId, N * sizeof(char) ); - -#endif } void cFileHeaderID::operator=( const cFileHeaderID& rhs ) diff --git a/src/core/fsservices.h b/src/core/fsservices.h index 0f8ad2f..e67b9e6 100644 --- a/src/core/fsservices.h +++ b/src/core/fsservices.h @@ -112,10 +112,10 @@ typedef int64 cFSType; // filesystem access control lists // it is the union of MAX(elem) for all the file systems that we support -class cACLElem { +/*class cACLElem { // TODO this is just a place holder // uint32 mUid; -}; +};*/ // this class is used only to pass arguments to iFSServices // it is the union of MAX(elem) for all the file systems that we support @@ -155,8 +155,8 @@ struct cFSStatArgs { FileType mFileType; // redundant with other information in this struct, but // broken out for convenience - // access control list should go here, too - std::list mACL; // indep + //TODO: access control list should go here, too + //std::list mACL; // indep }; @@ -252,16 +252,6 @@ class iFSServices // TSTRING must have the form ("baseXXXXXX"), where the X's are replaced with // characters to make it a unique file. There must be at least 6 Xs. - // TODO: remove this function - // Matt theorized that this is no longer used - dmb Aug 23 1999 - // virtual int CreateLockedTemporaryFile( const TCHAR* szFilename, int perm ) const = 0; - // creates a temporary file to which only the current process has read or write access. - // returns an open C file descriptor on success and -1 on error. Returns error if filename already exists on the filesystem. - // the file will automatically be deleted when the file descriptor is closed. - // perm should be zero or more of: - // O_WRONLY: create with read write only permission - // O_RDWR: create with read and write permission - //////////////////////////////////////// // minor filesystem functions @@ -286,29 +276,29 @@ class iFSServices // short names. virtual void GetCurrentDir( TSTRING& strCurDir ) const throw( eFSServices ) = 0; // returns the current working directory - virtual void ChangeDir( const TSTRING& strName ) const throw( eFSServices ) = 0; - // sets the current working directory - virtual void Mkdir( const TSTRING& strName ) const throw( eFSServices ) = 0; - - virtual bool Rmdir( const TSTRING& strName ) const = 0; //////////////////////////////////////// // file specific functions //////////////////////////////////////// virtual bool FileDelete( const TSTRING& name ) const = 0; - //////////////////////////////////////// // directory and file functions //////////////////////////////////////// virtual bool Rename( const TSTRING& strOldName, const TSTRING& strNewName, bool fOverWrite = true ) const = 0; // rename a file + virtual bool GetOwnerForFile( const TSTRING& tstrFilename, TSTRING& tstrUser ) const = 0; - virtual bool GetGroupForFile( const TSTRING& tstrFilename, TSTRING& tstrGroup ) const = 0; + virtual bool GetUserName( uid_t user_id, TSTRING& tstrUser ) const = 0; + virtual bool GetGroupName( gid_t group_id, TSTRING& tstrGroup ) const = 0; - + //Set whether we try to resolve uid/gid to a name, since Linux static binaries can + //have trouble (read: segfaulting) with name resolution given the right nsswitch.conf setup. + //This defaults to true if not specified. + virtual void SetResolveNames(bool resolve)=0; + //////////////////////////////////////// // miscellaneous utility functions //////////////////////////////////////// @@ -347,44 +337,6 @@ class iFSServices /////////////////////////////////////////////////////////////// private: static iFSServices* mpInstance; - - //virtual cFSStatArgs::FileType GetFileType(const cFCOName &filename) throw(eFSServices) = 0; - // returns the type of the file specified by filename. Separated from Stat() for convenience - // and potential efficiency (if a file system doesn't need to do a stat to get the file type) - - //virtual char*& MakeTempFile( char*& name) throw(eFSServices) = 0; - //virtual wchar_t*& MakeTempFile( wchar_t*& name) throw(eFSServices) = 0; - - // - // file ops - // - // these are commented out for timeliness reasons; we should uncomment and implement as needed... - // -- mdb - /* - virtual int Create(cFSName &name, Mode mode = MODE_DEFAULT) = 0; - virtual bool Mkdir(cFSName &name, Mode mode = MODE_DEFAULT) = 0; - virtual bool Delete(cFSName &name) = 0; - virtual bool Link(cFSName &src, cFSName &dest) = 0; - - virtual bool Chmod(cFSName &name, Mode mode) = 0; - virtual Mode Umask(Mode mode) = 0; - // file system types (e.g., "FAT", "NTFS", "UFS", "NFS") - virtual bool FSTypeAsString(cFSName &name, TSTRING &str) = 0; - // file type (e.g., "file", "symbolic link", "block device") - // TODO -- this should either be static or in another utility class, since it does not rely on the - // instance of the class (there is a global enumeration of file types; this fn should take a - // cFSStatArgs::FileType instead of a name. - virtual bool FileTypeAsString(cFSName &filename, TSTRING &str) = 0; - // TODO -- does this beling here? Is it always true that st_dev defines the file system? If not, then the - // Stat() call should add some extra piece of data that identifies the file system. - virtual bool IsSameFileSystem(cFSStatArgs &file1, cFSStatArgs &file2) = 0; - // to determine whether to recurse - musn't traverse mount points - - // capabilities - virtual bool IsUnicodeFilename(cFSName &name) = 0; - virtual bool IsACLCapable(cFSName &name) = 0; - virtual bool Is8bitFilename(cFSName &name) = 0; - */ }; diff --git a/src/core/msystem.cpp b/src/core/msystem.cpp index c0158e4..09a2653 100644 --- a/src/core/msystem.cpp +++ b/src/core/msystem.cpp @@ -74,7 +74,7 @@ #include "config.h" #include #include -#ifndef _SORTIX_SOURCE +#if !IS_SORTIX # include #endif #include @@ -871,7 +871,7 @@ FILE *fp[]; return(mfpclose(indx, fp)); } -#ifdef __AROS__ +#if IS_AROS #define fork() vfork() #endif diff --git a/src/core/msystem.h b/src/core/msystem.h index 09aee38..9f0a13e 100644 --- a/src/core/msystem.h +++ b/src/core/msystem.h @@ -54,6 +54,9 @@ /* * forward declarations */ + +#include "platform.h" + #ifdef __STDC__ void le_clobber(void); int le_set(const char*); @@ -114,7 +117,7 @@ int echild(); # define GID_RESET -2 /* reset EGID to RGID */ #endif #ifndef DEF_PATH -# ifdef __FreeBSD_cc_version +# if IS_FREEBSD # define DEF_PATH "PATH=/sbin:/usr/sbin:/bin:/usr/bin" /* default search path */ # else # define DEF_PATH "PATH=/bin:/usr/bin:/usr/ucb" /* default search path */ diff --git a/src/core/package.cpp b/src/core/package.cpp deleted file mode 100644 index f9ddae8..0000000 --- a/src/core/package.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// -// The developer of the original code and/or files is Tripwire, Inc. -// Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, -// Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights -// reserved. -// -// This program is free software. The contents of this file are subject -// to the terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2 of the License, or (at your -// option) any later version. You may redistribute it and/or modify it -// only in compliance with the GNU General Public License. -// -// This program is distributed in the hope that it will be useful. -// However, this program is distributed AS-IS WITHOUT ANY -// WARRANTY; INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS -// FOR A PARTICULAR PURPOSE. Please see the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. -// -// Nothing in the GNU General Public License or any other license to use -// the code or files shall permit you to use Tripwire's trademarks, -// service marks, or other intellectual property without Tripwire's -// prior written consent. -// -// If you have any questions, please contact Tripwire, Inc. at either -// info@tripwire.org or www.tripwire.org. -// - diff --git a/src/core/platform.h b/src/core/platform.h index 01abde9..e3eb14a 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -40,6 +40,9 @@ #ifndef __PLATFORM_H #define __PLATFORM_H +//NOTE: Autoconf is strongly preferred as the Right Way to detect platform-specific features/behaviors. +// These macros should really only be used when autoconf can't get the job done. + //============================================================================= // Enumerations // @@ -47,13 +50,41 @@ // variation. We group similar items together, such as OS_REDHAT and OS_SLACKWARE #define OS_UNKNOWN 0 + #define OS_WIN32 0x0101 +#define OS_CYGWIN 0x0102 +#define OS_DOS_DJGPP 0x0103 + +#define OS_LINUX 0x0201 +#define OS_ANDROID 0x0202 + +#define OS_FREEBSD 0x0301 +#define OS_NETBSD 0x0302 +#define OS_OPENBSD 0x0303 +#define OS_DARWIN 0x0304 +#define OS_DRAGONFLYBSD 0x0305 +#define OS_MIDNIGHTBSD 0x0306 + +#define OS_SOLARIS 0x0400 #define OS_AIX 0x0401 -#define OS_HPUX 0x0501 -#define OS_IRIX 0x0601 -#define OS_OSF1 0x0701 +#define OS_HPUX 0x0402 +#define OS_IRIX 0x0403 +#define OS_OSF1 0x0404 + +#define OS_MINIX 0x0501 +#define OS_HURD 0x0502 +#define OS_HAIKU 0x0503 +#define OS_SYLLABLE 0x0504 +#define OS_SKYOS 0x0505 +#define OS_SORTIX 0x0506 +#define OS_MINT 0x0507 +#define OS_AROS 0x0508 +#define OS_RTEMS 0x0509 #define COMP_UNKNOWN 0 +#define COMP_GCC 0x0001 +#define COMP_CLANG 0x0002 + #define COMP_MSVC 0x0101 #define COMP_KAI_GCC 0x0201 #define COMP_KAI_SUNPRO 0x0202 @@ -81,34 +112,115 @@ #if defined(_WIN32) #define OS OS_WIN32 + #define IS_WIN32 1 + +#elif defined(__CYGWIN__) + #define OS OS_CYGWIN + #define IS_CYGWIN 1 - #if defined(_MSC_VER) - #define COMP COMP_MSVC - #else - #error _MSC_VER not defined. MSVC is currently the only supported compiler - #endif +#elif defined(__DJGPP__) + #define OS OS_DOS_DJGPP + #define IS_DOS_DJGPP 1 + + +#elif defined(__ANDROID__) + #define OS OS_ANDROID + #define IS_ANDROID 1 + +#elif defined(__linux__) + #define OS OS_LINUX + #define IS_LINUX 1 + + +#elif defined(__FreeBSD__) + #define OS OS_FREEBSD + #define IS_FREEBSD 1 -#elif defined(_IRIX) - #define OS OS_IRIX - #define COMP COMP_KAI_IRIX +#elif defined(__NetBSD__) + #define OS OS_NETBSD + #define IS_NETBSD 1 -#elif defined(_ALPHA) - #define OS OS_OSF1 - #define COMP COMP_KAI_OSF1ALPHA +#elif defined(__OpenBSD__) + #define OS OS_OPENBSD + #define IS_OPENBSD 1 +#elif defined(_OSX) + #define OS OS_DARWIN + #define IS_DARWIN 1 + +#elif defined(__DragonFly__) + #define OS OS_DRAGONFLYBSD + #define IS_DRAGONFLYBSD 1 + +#elif defined(__MidnightBSD__) + #define OS OS_MIDNIGHTBSD + #define IS_MIDNIGHTBSD 1 + + +#elif defined(_SOLARIS) || defined(__sun) + #define OS OS_SOLARIS + #define IS_SOLARIS 1 + +#elif defined(_AIX) + #define OS OS_AIX + #define IS_AIX 1 + #elif defined (_HPUX) #define OS OS_HPUX - #define COMP COMP_KAI_HPANSIC + #define IS_HPUX 1 + +#elif defined(_IRIX) + #define OS OS_IRIX + #define IS_IRIX 1 + +#elif defined(TRU64) || defined(__OSF1__) + #define OS OS_OSF1 + #define IS_OSF1 1 + + +#elif defined(__minix__) + #define OS OS_MINIX + #define IS_MINIX 1 + +#elif defined(__gnu_hurd__) + #define OS OS_HURD + #define IS_HURD 1 + +#elif defined(__HAIKU__) + #define OS OS_HAIKU + #define IS_HAIKU 1 + +#elif defined(__SYLLABLE__) + #define OS OS_SYLLABLE + #define IS_SYLLABLE 1 + +#elif defined(SKYOS) + #define OS OS_SKYOS + #define IS_SKYOS 1 + +#elif defined(_SORTIX_SOURCE) + #define OS OS_SORTIX + #define IS_SORTIX 1 + +#elif defined(__MINT__) + #define OS OS_MINT + #define IS_MINT 1 + +#elif defined(__AROS__) + #define OS OS_AROS + #define IS_AROS 1 + +#elif defined(__rtems__) + #define OS OS_RTEMS + #define IS_RTEMS 1 #else // OK for OS not to resolve, it's being phased out. // #error Unknown OS #endif + + -#if !defined(OS) -// OK for OS not to resolve, it's being phased out. -// #error OS definition did not resolve. Check "platform.h". -#endif /* XXX: COMP may now not resolve, because autoconf may * detect GCC. This is done in the hopes that all * COMP detections, and indeed both OS & COMP detechtions @@ -150,13 +262,6 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// OS detection -// Note: Avoid using these if possible (see above) -#define IS_WIN32 (OS == OS_WIN32) -#define IS_AIX (OS == OS_AIX) -#define IS_HPUX (OS == OS_HPUX) -#define IS_IRIX (OS == OS_IRIX) -#define IS_OSF1 (OS == OS_OSF1) // complier detection #define IS_KAI (COMP == COMP_KAI_GCC || COMP == COMP_KAI_SUNPRO || COMP == COMP_KAI_GLIBC || COMP == COMP_KAI_VISUALAGE || COMP == COMP_KAI_HPANSIC || COMP == COMP_KAI_IRIX || COMP == COMP_KAI_OSF1ALPHA) @@ -183,20 +288,36 @@ #define SUPPORTS_POSIX_THREADS (!SUPPORTS_WIN32_THREADS) // Miscellaneous -#define FSEEK_TAKES_INT32 IS_UNIX // True if fseek takes 32-bit offsets -#define USE_OUTPUT_DEBUG_STRING IS_WIN32 // Use the Win32 OutputDebugString() for debug messages. -#define SUPPORTS_MAPI IS_WIN32 #define WCHAR_IS_16_BITS IS_WIN32 #define WCHAR_IS_32_BITS IS_UNIX #define WCHAR_REP_IS_UCS2 IS_WIN32 #define USES_MPOPEN IS_UNIX -#define USES_WINSOCK IS_WIN32 #define SUPPORTS_WCHART IS_WIN32 // TODO: Remove after getting new ver of KAI #define USES_GLIBC ((COMP == COMP_KAI_GLIBC) || HAVE_GCC) -#define SUPPORTS_EVENTLOG IS_WIN32 #define SUPPORTS_MEMBER_TEMPLATES ( ! IS_SUNPRO ) #define SUPPORTS_EXPLICIT_TEMPLATE_FUNC_INST ( ! IS_SUNPRO ) +#define SUPPORTS_ST_BLOCKS (!IS_DOS_DJGPP) +#define SUPPORTS_POSIX_SIGNALS (!IS_DOS_DJGPP) +#define SUPPORTS_NETWORKING (!IS_SORTIX && !IS_DOS_DJGPP) +#define SUPPORTS_SYSLOG (HAVE_SYSLOG_H && !IS_SKYOS) +#define NEEDS_SWAB_IMPL (IS_SYLLABLE || IS_ANDROID || IS_SORTIX) +#define USES_MBLEN (!IS_ANDROID && !IS_AROS) +#define USES_DEVICE_PATH (IS_AROS || IS_DOS_DJGPP) +#define ICONV_CONST_SOURCE (IS_MINIX) +#define SUPPORTS_DIRECT_IO (IS_LINUX) +// Linux is the only platform where direct i/o hashing has been tested & works properly so far. + +#define SUPPORTS_TERMIOS (!IS_RTEMS) +// RTEMS errors are probably just a buildsys issue & this will change or go away. + +#define SUPPORTS_DOUBLE_SLASH_PATH (IS_CYGWIN) +// POSIX standard says paths beginning with 2 slashes are "implementation defined" +// (see http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_11 ) +// The only platform OST works on (afaik) that actually defines a double-slash behavior is Cygwin +// which uses this syntax for UNC paths. So we'll allow leading double slashes there, but +// continue removing them on all other platforms + //============================================================================= // Miscellaneous // diff --git a/src/core/serializerimpl.cpp b/src/core/serializerimpl.cpp index dbad235..8c9aaa0 100644 --- a/src/core/serializerimpl.cpp +++ b/src/core/serializerimpl.cpp @@ -41,24 +41,6 @@ cSerializerImpl::SerMap cSerializerImpl::mSerCreateMap ; cSerializerImpl::SerRefCountMap cSerializerImpl::mSerRefCountCreateMap ; - -// RAD:09/01/99 -- No longer needed! -/////////////////////////////////////////////////////////////////////////////// -// util_TstrToStr -- converts the passed in tstring into a narrow string. maxSize -// indicates the size of the narrow buffer -/////////////////////////////////////////////////////////////////////////////// -// static inline void util_TstrToStr(char* pStr, const TCHAR* pTstr, int maxSize) -// { -// #ifdef _UNICODE -// ASSERT( maxSize >= wcstombs( 0, pTstr -// wcstombs(pStr, pTstr, maxSize); -// #else -// strncpy( pStr, pTstr, maxSize ); -// #endif -// } -// - - /////////////////////////////////////////////////////////////////////////////// // util_GetCrc -- calculates the crc for the narrow version of the type's AsString() /////////////////////////////////////////////////////////////////////////////// @@ -74,30 +56,12 @@ static uint32 util_GetCRC( const cType& type ) // - Increased performance by removing superflous conversion // when type.AsString() is already narrow. // -#ifdef _UNICODE - - char sz[256]; - const uint8* pszType = (const uint8*)(&sz[0]); - const wchar_t* wsz = type.AsString(); - - ASSERT( countof(sz) >= ::wcstombs( 0, wsz, size_t(-1) ) ); - - int nBytes = (int)::wcstombs( (char*)pszType, wsz, countof(sz) ); - if ( nBytes == -1 ) // Bad character conversion! - { - throw eCharacterEncoding( - TSS_GetString( cCore, core::STR_ERR_BADCHAR ) ); - } - -#else//!_UNICODE // We only need to count the characters // RAD: Yeesh! This is already done for us in cType::mString!!! const uint8* pszType = (const uint8*)( type.AsString() ); int nBytes = ::strlen( (const char*)pszType ); -#endif//_UNICODE - ASSERT( sizeof(uint8) == sizeof(byte) ); ASSERT( pszType && *pszType ); diff --git a/src/core/serstring.h b/src/core/serstring.h index 06f4b0a..7037413 100644 --- a/src/core/serstring.h +++ b/src/core/serstring.h @@ -78,11 +78,7 @@ public: DECLARE_TYPEDSERIALIZABLE() }; -#ifdef _UNICODE -typedef cSerializableWString cSerializableTSTRING; -#else typedef cSerializableNString cSerializableTSTRING; -#endif #endif diff --git a/src/core/sha.cpp b/src/core/sha.cpp index bf3f104..b58a4a0 100644 --- a/src/core/sha.cpp +++ b/src/core/sha.cpp @@ -64,7 +64,10 @@ #include "stdcore.h" #include #include -#include + +#if HAVE_MEMORY_H +# include +#endif #include "sha.h" diff --git a/src/core/stringutil.cpp b/src/core/stringutil.cpp index f471613..bb3fecc 100644 --- a/src/core/stringutil.cpp +++ b/src/core/stringutil.cpp @@ -128,19 +128,6 @@ inline bool tss_find_in_hash( const wc16_string& lhs, TSTRING& rhs ) return( tss_GetHashTable().Lookup( lhs, rhs ) ); } -#ifdef _UNICODE - -inline bool tss_find_in_hash( const wc16_string& lhs, std::string& rhs ) -{ - return false; // don't have a hash table for this! -} - -inline void tss_insert_in_hash( const wc16_string& lhs, const std::string& rhs ) -{ - return; // don't have a hash table for this! -} - -#endif //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Type Dispatched Conversions @@ -150,7 +137,7 @@ inline void tss_insert_in_hash( const wc16_string& lhs, const std::string& rhs ) std::string::const_iterator cStringUtil::Convert( std::string& nbs, const wc16_string& dbs ) { -#ifdef __AROS__ +#if IS_AROS nbs.resize(dbs.length()); for (int x=0; x #endif -#include + +#if HAVE_SYS_UTSNAME_H +# include +#endif + #include -#include -#include -#include + +#if HAVE_SYS_SOCKET_H +# include +# include +# include +#endif + #include #include #include @@ -130,7 +138,7 @@ template< typename T > static inline void util_ZeroMemory( T& obj ); // PUBLIC METHOD CODE //========================================================================= -cUnixFSServices::cUnixFSServices() +cUnixFSServices::cUnixFSServices() : mResolveNames(true) {} cUnixFSServices::~cUnixFSServices() @@ -147,13 +155,7 @@ TSTRING cUnixFSServices::GetErrString() const { TSTRING ret; char* pErrorStr = strerror(errno); -#ifdef _UNICODE - wchar_t pBuf[1024]; - mbstowcs(pBuf, pErrorStr, 1024); - ret = pBuf; -#else ret = pErrorStr; -#endif return ret; } @@ -180,18 +182,26 @@ TCHAR cUnixFSServices::GetPathSeparator() const return '/'; } -#ifndef __AROS__ +#if !USES_DEVICE_PATH void cUnixFSServices::ReadDir(const TSTRING& strFilename, std::vector &v, bool bFullPaths) const throw(eFSServices) { #else void cUnixFSServices::ReadDir(const TSTRING& strFilenameC, std::vector& v, bool bFullPaths) const throw(eFSServices) { - TSTRING strFilename = cArosPath::AsNative(strFilenameC); + TSTRING strFilename = cDevicePath::AsNative(strFilenameC); #endif //Get all the filenames - DIR* dp; + DIR* dp=0; + +#if defined(O_DIRECTORY) && defined(O_NOATIME) + //dfd will be autoclosed by closedir(), should not be explicitly closed. + int dfd=open(strFilename.c_str(), O_RDONLY|O_DIRECTORY|O_NOATIME); + if (dfd>0) + dp = fdopendir(dfd); +#else dp = opendir( strFilename.c_str() ); +#endif if (dp == NULL) { @@ -247,12 +257,6 @@ void cUnixFSServices::GetCurrentDir( TSTRING& strCurDir ) const throw(eFSService strCurDir = pathname; } -void cUnixFSServices::ChangeDir( const TSTRING& strDir ) const throw(eFSServices) -{ - if( chdir( strDir.c_str() ) < 0 ) - throw eFSServicesGeneric( strDir, iFSServices::GetInstance()->GetErrString() ); -} - TSTRING& cUnixFSServices::MakeTempFilename( TSTRING& strName ) const throw(eFSServices) { @@ -260,14 +264,7 @@ TSTRING& cUnixFSServices::MakeTempFilename( TSTRING& strName ) const throw(eFSSe char szTemplate[iFSServices::TW_MAX_PATH]; int fd; -#ifdef _UNICODE - // convert template from wide character to multi-byte string - char mbBuf[iFSServices::TW_MAX_PATH]; - wcstombs( mbBuf, strName.c_str(), strName.length() + 1 ); - strcpy( szTemplate, mbBuf ); -#else strcpy( szTemplate, strName.c_str() ); -#endif #ifdef HAVE_MKSTEMP // create temp filename and check to see if mkstemp failed @@ -289,41 +286,15 @@ TSTRING& cUnixFSServices::MakeTempFilename( TSTRING& strName ) const throw(eFSSe #endif // change name so that it has the XXXXXX part filled in -#ifdef _UNICODE - // convert name from multi-byte to wide character string - wchar_t wcsbuf[1024]; - mbstowcs( wcsbuf, pchTempFileName, strlen( pchTempFileName ) + 1 )); - strName = wcsbuf; -#else strName = pchTempFileName; -#endif - // Linux creates the file!! Doh! // So I'll always attempt to delete it -bam - FileDelete( strName ); + FileDelete( strName.c_str() ); return( strName ); } -void cUnixFSServices::Mkdir( const TSTRING& strName ) const throw ( eFSServices ) -{ - if( 0 != _tmkdir( strName.c_str(), 0777 ) ) - { - // if mkdir failed because the dir existed, that's OK - if( errno != EEXIST ) - throw eFSServicesGeneric( strName, iFSServices::GetInstance()->GetErrString() ); - } -} - -bool cUnixFSServices::Rmdir( const TSTRING& strName ) const -{ - if( 0 == rmdir( strName.c_str() ) ) - return true; - - return false; -} - void cUnixFSServices::GetTempDirName( TSTRING& strName ) const throw(eFSServices) { strName = mTempPath; @@ -335,13 +306,13 @@ void cUnixFSServices::SetTempDirName(TSTRING& tmpPath) { } -#ifndef __AROS__ +#if !USES_DEVICE_PATH void cUnixFSServices::Stat( const TSTRING& strName, cFSStatArgs &stat ) const throw(eFSServices) { #else void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const throw(eFSServices) { - TSTRING strName = cArosPath::AsNative(strNameC); + TSTRING strName = cDevicePath::AsNative(strNameC); #endif //local variable for obtaining info on file. struct stat statbuf; @@ -378,7 +349,11 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const th stat.size = statbuf.st_size; stat.uid = statbuf.st_uid; stat.blksize = statbuf.st_blksize; +#if SUPPORTS_ST_BLOCKS stat.blocks = statbuf.st_blocks; +#else + stat.blocks = 0; +#endif // set the file type if(S_ISREG(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_FILE; @@ -387,7 +362,9 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const th else if(S_ISBLK(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_BLOCKDEV; else if(S_ISCHR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_CHARDEV; else if(S_ISFIFO(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_FIFO; +#ifdef S_ISSOCK else if(S_ISSOCK(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_SOCK; +#endif #ifdef S_IFDOOR else if(S_ISDOOR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_DOOR; #endif @@ -400,19 +377,24 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const th void cUnixFSServices::GetMachineName( TSTRING& strName ) const throw( eFSServices ) { +#if HAVE_SYS_UTSNAME_H struct utsname namebuf; if( uname( &namebuf ) == -1 ) throw eFSServicesGeneric( strName ); else strName = namebuf.nodename; +#else + strName = "localhost"; +#endif } void cUnixFSServices::GetMachineNameFullyQualified( TSTRING& strName ) const { +#if HAVE_SYS_UTSNAME_H char buf[256]; if (gethostname(buf, 256) != 0) { -#if defined(SOLARIS_NO_GETHOSTBYNAME) || defined(_SORTIX_SOURCE) +#if defined(SOLARIS_NO_GETHOSTBYNAME) || !SUPPORTS_NETWORKING strName = buf; return; #else @@ -426,7 +408,7 @@ void cUnixFSServices::GetMachineNameFullyQualified( TSTRING& strName ) const } #endif } - +#endif try { cUnixFSServices::GetMachineName(strName); @@ -467,7 +449,7 @@ bool cUnixFSServices::GetIPAddress( uint32& uiIPAddress ) bool fGotAddress = false; cDebug d( _T("cUnixFSServices::GetIPAddress") ); -#ifndef _SORTIX_SOURCE +#if SUPPORTS_NETWORKING && HAVE_SYS_UTSNAME_H struct utsname utsnameBuf; if( EFAULT != uname( &utsnameBuf) ) { @@ -510,35 +492,27 @@ bool cUnixFSServices::IsCaseSensitive() const } +void cUnixFSServices::SetResolveNames(bool resolve) +{ + mResolveNames=resolve; +} + bool cUnixFSServices::GetOwnerForFile( const TSTRING& tstrFilename, TSTRING& tstrUser ) const { bool fSuccess = true; + struct stat statbuf; - int ret = lstat(tstrFilename.c_str(), &statbuf); if(ret < 0) { fSuccess = false; } - - if( fSuccess ) + else { - struct passwd* pp = getpwuid( statbuf.st_uid ); - //ASSERT( pp ); - // We shouldn't assert this, because it might be the case that a file - // is associated with some old user that no longer exists... we should - // not fail this case. Instead, the method will just return false per - // the test below. - if( pp == NULL ) - { - fSuccess = false; - } - else - tstrUser = pp->pw_name; + fSuccess = GetUserName(statbuf.st_uid, tstrUser); } return( fSuccess ); - } @@ -552,12 +526,48 @@ bool cUnixFSServices::GetGroupForFile( const TSTRING& tstrFilename, TSTRING& tst { fSuccess = false; } - - if( fSuccess ) + else { - struct group* pg = getgrgid( statbuf.st_gid ); - //ASSERT( pg ); this assert stops everything in debug mode if we can't lookup a groupid + fSuccess = GetGroupName(statbuf.st_gid, tstrGroup); + } + + return( fSuccess ); +} + +bool cUnixFSServices::GetUserName( uid_t user_id, TSTRING& tstrUser ) const +{ + bool fSuccess = true; + + if( mResolveNames ) + { + struct passwd* pp = getpwuid( user_id ); + if( pp == NULL ) + { + fSuccess = false; + tstrUser = TSS_GetString(cCore, core::STR_UNKNOWN); + } + else + tstrUser = pp->pw_name; + } + else + { + std::stringstream sstr; + sstr << user_id; + tstrUser = sstr.str(); + } + + return( fSuccess ); +} + + +bool cUnixFSServices::GetGroupName( gid_t group_id, TSTRING& tstrGroup ) const +{ + bool fSuccess = true; + + if( mResolveNames ) + { + struct group* pg = getgrgid( group_id ); if( pg == NULL ) { fSuccess = false; @@ -565,10 +575,22 @@ bool cUnixFSServices::GetGroupForFile( const TSTRING& tstrFilename, TSTRING& tst } else tstrGroup = pg->gr_name; - } - + } + else + { + std::stringstream sstr; + sstr << group_id; + tstrGroup = sstr.str(); + } + return( fSuccess ); } + + + +#ifndef S_ISVTX // DOS/DJGPP doesn't have this +# define S_ISVTX 0 +#endif //////////////////////////////////////////////////////////////////////// // Function name : cUnixFSServices::ConvertModeToString @@ -740,7 +762,7 @@ bool cUnixFSServices::GetExecutableFilename( TSTRING& strFullPath, const TSTRING // a bool? I think it is ... mdb /////////////////////////////////////////////////////////////////////////////// bool cUnixFSServices::FullPath( TSTRING& strFullPath, const TSTRING& strRelPathC, const TSTRING& pathRelFromC ) const -{ +{ // don't do anything with an empty path if( strRelPathC.empty() ) return false; @@ -833,39 +855,6 @@ const TCHAR* cUnixFSServices::GetStandardBackupExtension() const } - // TODO: remove this function - // Matt theorized that this is no longer used - dmb Aug 23 1999 -/* -int cUnixFSServices::CreateLockedTemporaryFile( const TCHAR* szFilename, int perm ) const -{ - // make sure perm is AT LEAST one of: O_RDWR, O_WRONLY - ASSERT( 0 != ( perm & ( O_RDWR | O_WRONLY ) ) ); - // make sure perm is ONLY composed of: O_RDWR, O_WRONLY - ASSERT( 0 == ( perm & ~( O_RDWR | O_WRONLY ) ) ); - // get rid of any unsupported bits caller may have supplied - perm &= ( O_RDWR | O_WRONLY ); - - // set flags - int oflags = perm | - O_CREAT | O_EXCL; // only create a new file -- error if it exists already - - // create file - int fh = _topen( szFilename, oflags, 0666 ); - if( fh >= 0 ) - { - // file was created. Now unlink it - if( 0 != unlink( szFilename ) ) - { - // we weren't able to unlink file, so close handle and fail - close( fh ); - fh = -1; - } - } - - return( fh ); -} -*/ - void cUnixFSServices::Sleep( int nSeconds ) const { sleep( nSeconds ); diff --git a/src/core/unixfsservices.h b/src/core/unixfsservices.h index 8a3d3b7..4bde573 100644 --- a/src/core/unixfsservices.h +++ b/src/core/unixfsservices.h @@ -54,38 +54,8 @@ // DECLARATION OF CLASSES //========================================================================= -//Set up in constructor. Stores pertinent information about the filesystem -//serviced by each instantiation. - -struct UnixSysInfo -{ - uint32 maxcomplen; - //max name length of a file on filesystem - uint32 fsflags; - //bitmask of flags - TSTRING fsname; - //The filesystem basename - uint32 fsid; - //unique indentifier for the filesystem -}; - class cUnixFSServices : public iFSServices { - /////////////////////////////////////////////////////////////// - // ENUMS - /////////////////////////////////////////////////////////////// - - //////////////////////////////////////// - // file system types - //////////////////////////////////////// - enum FSType - { - FS_UFS = 0, - FS_NFS, - FS_HSFS, - FS_PCFS - }; - /////////////////////////////////////////////////////////////// // MEMBER FUNCTIONS /////////////////////////////////////////////////////////////// @@ -127,10 +97,6 @@ class cUnixFSServices : public iFSServices // strName must have the form ("baseXXXXXX"), where the X's are replaced with // characters to make it a unique file. There must be at least 6 Xs. - // TODO: remove this function - // Matt theorized that this is no longer used - dmb Aug 23 1999 - //virtual int CreateLockedTemporaryFile( const TCHAR* szFilename, int perm ) const; - //////////////////////////////////////// // minor filesystem functions @@ -153,29 +119,29 @@ class cUnixFSServices : public iFSServices // puts the contents of the specified directory, except for . and .., into the supplied vector. virtual void GetCurrentDir( TSTRING& strCurDir ) const throw( eFSServices ); // returns the current working directory - virtual void ChangeDir( const TSTRING& strName ) const throw( eFSServices ); - // sets the current working directory - virtual void Mkdir( const TSTRING& strName ) const throw( eFSServices ); - - virtual bool Rmdir( const TSTRING& strName ) const; - + //////////////////////////////////////// // file specific functions //////////////////////////////////////// virtual bool FileDelete( const TSTRING& name ) const; - //////////////////////////////////////// // directory and file functions //////////////////////////////////////// virtual bool Rename( const TSTRING& strOldName, const TSTRING& strNewName, bool fOverWrite = true ) const; // rename a file + virtual bool GetOwnerForFile( const TSTRING& tstrFilename, TSTRING& tstrUser ) const; - virtual bool GetGroupForFile( const TSTRING& tstrFilename, TSTRING& tstrGroup ) const; + virtual bool GetUserName( uid_t user_id, TSTRING& tstrUser ) const; + virtual bool GetGroupName( gid_t group_id, TSTRING& tstrGroup ) const; - + //Set whether we try to resolve uid/gid to a name, since Linux static binaries can + //have trouble (read: segfaulting) with name resolution given the right nsswitch.conf setup. + //This defaults to true if not specified. + virtual void SetResolveNames(bool resolve); + //////////////////////////////////////// // miscellaneous utility functions //////////////////////////////////////// @@ -195,11 +161,9 @@ class cUnixFSServices : public iFSServices virtual TSTRING GetErrString() const; private: - UnixSysInfo info; - //struct stores pertinent system info. to be used by member functions TSTRING mTempPath; - + bool mResolveNames; }; #endif //__UNIXFSSERVICES_H diff --git a/src/core/userstring.h b/src/core/userstring.h deleted file mode 100644 index 301f8de..0000000 --- a/src/core/userstring.h +++ /dev/null @@ -1,134 +0,0 @@ -// -// The developer of the original code and/or files is Tripwire, Inc. -// Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, -// Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights -// reserved. -// -// This program is free software. The contents of this file are subject -// to the terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2 of the License, or (at your -// option) any later version. You may redistribute it and/or modify it -// only in compliance with the GNU General Public License. -// -// This program is distributed in the hope that it will be useful. -// However, this program is distributed AS-IS WITHOUT ANY -// WARRANTY; INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS -// FOR A PARTICULAR PURPOSE. Please see the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. -// -// Nothing in the GNU General Public License or any other license to use -// the code or files shall permit you to use Tripwire's trademarks, -// service marks, or other intellectual property without Tripwire's -// prior written consent. -// -// If you have any questions, please contact Tripwire, Inc. at either -// info@tripwire.org or www.tripwire.org. -// -/////////////////////////////////////////////////////////////////////////////// -// UserString.h -- A single point of access for all strings that will be -// displayed to the end user. This implementation is intended to ease -// any future localization efforts. -/////////////////////////////////////////////////////////////////////////////// - -#ifndef __USERSTRING_H -#define __USERSTRING_H - -#ifndef __DEBUG_H -#include "core/debug.h" -#endif - -#ifndef _MAP_ -#include -#endif - -/////////////////////////////////////////////////////////////////////////////// -// class iUserString -- Abstract interface for retrieving User Strings -/////////////////////////////////////////////////////////////////////////////// - -class iUserString -{ -public: - virtual ~iUserString() {} - - struct tStringPair - { - int id; - TCHAR* string; - }; - - // Select between the different localized string sets - // for this product. Returns false if string not defined. - virtual bool SelectStringSet(int setID) = 0; - - // Get the string from the localized string set - virtual const TCHAR* GetString(int stringID) const = 0; - - // Clear all strings in specified string set - virtual void ClearStringSet(int id) = 0; - - // Add an array of string pairs to a string set. The pair array passed in - // should terminate with an id of -1. If this string set contains string IDs - // that already exist in the string set, they will "overwrite" the - // the previous strings. - // Note: We store only pointers to the string pairs so they must remain - // around for as long as this class uses them. A static array defined at - // compile time is perfect for this. - virtual void AddStringSet(int setID, const tStringPair* pPairArray) = 0; - - // Add a single string. The above rules apply. - virtual void AddString(int setID, int stringID, TCHAR* string) = 0; - - // singleton manipulation - static iUserString* GetInstance(); - static void SetInstance(iUserString* pInst); -private: - static iUserString* mpInstance; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Macros useful for building UserString tables. -/////////////////////////////////////////////////////////////////////////////// - -/* -Example Use: - - static struct iUserString::tStringPair englishStrings[] = - { - USERSTRING(STR_HELLO_WORLD, "Hello World\n") - USERSTRING(STR_OUT_OF_MEM, "Fatal Error: Out of memory.\n") - USERSTRING_END() - }; - - pUSMB->AddStringSet(LANG_USENGLISH, englishStrings); -*/ - -#define USERSTRING(id, str) { (id), _T(str) }, - -#define USERSTRING_END() { -1, _T("") } - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// inline implementation -/////////////////////////////////////////////////////////////////////////////////////////////////// -inline iUserString* iUserString::GetInstance() -{ - ASSERT(mpInstance); - - return mpInstance; -} - -inline void iUserString::SetInstance(iUserString* pInst) -{ - mpInstance = pInst; -} - - -#ifdef _MSC_VER -//#pragma warning(default:4786) -#endif /* _MSC_VER */ - -#endif // __USERSTRING_H diff --git a/src/cryptlib/Makefile.am b/src/cryptlib/Makefile.am index 90ea8a1..6ec973b 100644 --- a/src/cryptlib/Makefile.am +++ b/src/cryptlib/Makefile.am @@ -1,17 +1,25 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. -I../.. +AM_CPPFLAGS = -I.. -I../.. LN=@LN@ DEFAULT_INCLUDES = $(D_INCLUDES) +EXTRA_DIST=license.txt readme.txt rmcr.pl noinst_LIBRARIES = libcryptlib.a +libcryptlib_adir=. libcryptlib_a_SOURCES = \ algebra.cpp asn.cpp cryptlib.cpp des.cpp dessp.cpp elgamal.cpp \ eprecomp.cpp filters.cpp forkjoin.cpp integer.cpp iterhash.cpp misc.cpp \ nbtheory.cpp pch.cpp queue.cpp rng.cpp sha.cpp zbits.cpp zdeflate.cpp \ zinflate.cpp ztrees.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +libcryptlib_a_HEADERS = \ + algebra.h asn.h config.h cryptlib.h des.h elgamal.h eprecomp.h filters.h \ + forkjoin.h integer.h iterhash.h misc.h modarith.h nbtheory.h pch.h \ + queue.h rng.h sha.h smartptr.h words.h zbits.h zdeflate.h zinflate.h \ + ztrees.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit CLEANFILES = ../../lib/libcryptlib.a all: $(noinst_LIBRARIES) diff --git a/src/cryptlib/Makefile.in b/src/cryptlib/Makefile.in index b111e5f..d09773a 100644 --- a/src/cryptlib/Makefile.in +++ b/src/cryptlib/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libcryptlib_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/cryptlib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libcryptlib_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libcryptlib_a_AR = $(AR) $(ARFLAGS) libcryptlib_a_LIBADD = am_libcryptlib_a_OBJECTS = algebra.$(OBJEXT) asn.$(OBJEXT) \ @@ -60,22 +118,94 @@ am_libcryptlib_a_OBJECTS = algebra.$(OBJEXT) asn.$(OBJEXT) \ queue.$(OBJEXT) rng.$(OBJEXT) sha.$(OBJEXT) zbits.$(OBJEXT) \ zdeflate.$(OBJEXT) zinflate.$(OBJEXT) ztrees.$(OBJEXT) libcryptlib_a_OBJECTS = $(am_libcryptlib_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libcryptlib_a_SOURCES) DIST_SOURCES = $(libcryptlib_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libcryptlib_adir)" +HEADERS = $(libcryptlib_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -91,7 +221,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -99,6 +229,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -110,6 +241,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -126,21 +258,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -170,22 +305,34 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. -I../.. +AM_CPPFLAGS = -I.. -I../.. DEFAULT_INCLUDES = $(D_INCLUDES) +EXTRA_DIST = license.txt readme.txt rmcr.pl noinst_LIBRARIES = libcryptlib.a +libcryptlib_adir = . libcryptlib_a_SOURCES = \ algebra.cpp asn.cpp cryptlib.cpp des.cpp dessp.cpp elgamal.cpp \ eprecomp.cpp filters.cpp forkjoin.cpp integer.cpp iterhash.cpp misc.cpp \ nbtheory.cpp pch.cpp queue.cpp rng.cpp sha.cpp zbits.cpp zdeflate.cpp \ zinflate.cpp ztrees.cpp +libcryptlib_a_HEADERS = \ + algebra.h asn.h config.h cryptlib.h des.h elgamal.h eprecomp.h filters.h \ + forkjoin.h integer.h iterhash.h misc.h modarith.h nbtheory.h pch.h \ + queue.h rng.h sha.h smartptr.h words.h zbits.h zdeflate.h zinflate.h \ + ztrees.h + CLEANFILES = ../../lib/libcryptlib.a all: all-am @@ -195,15 +342,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/cryptlib/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/cryptlib/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/cryptlib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/cryptlib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -220,13 +366,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcryptlib.a: $(libcryptlib_a_OBJECTS) $(libcryptlib_a_DEPENDENCIES) - -rm -f libcryptlib.a - $(libcryptlib_a_AR) libcryptlib.a $(libcryptlib_a_OBJECTS) $(libcryptlib_a_LIBADD) - $(RANLIB) libcryptlib.a + +libcryptlib.a: $(libcryptlib_a_OBJECTS) $(libcryptlib_a_DEPENDENCIES) $(EXTRA_libcryptlib_a_DEPENDENCIES) + $(AM_V_at)-rm -f libcryptlib.a + $(AM_V_AR)$(libcryptlib_a_AR) libcryptlib.a $(libcryptlib_a_OBJECTS) $(libcryptlib_a_LIBADD) + $(AM_V_at)$(RANLIB) libcryptlib.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -235,91 +383,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libcryptlib_aHEADERS: $(libcryptlib_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libcryptlib_a_HEADERS)'; test -n "$(libcryptlib_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libcryptlib_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libcryptlib_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libcryptlib_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libcryptlib_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libcryptlib_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libcryptlib_a_HEADERS)'; test -n "$(libcryptlib_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libcryptlib_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libcryptlib_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -330,17 +508,23 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -360,18 +544,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libcryptlib_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -390,22 +594,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libcryptlib_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libcryptlib_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libcryptlib_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(LN) -f $(noinst_LIBRARIES) ../../lib/libcryptlib.a + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/cryptlib/asn.cpp b/src/cryptlib/asn.cpp index 88b015e..d5265e6 100644 --- a/src/cryptlib/asn.cpp +++ b/src/cryptlib/asn.cpp @@ -3,6 +3,8 @@ #include "pch.h" #include "asn.h" #include "misc.h" +#include +#include unsigned int DERLengthEncode(unsigned int length, byte *output) { @@ -87,7 +89,11 @@ BERSequenceDecoder::~BERSequenceDecoder() { // remove end-of-content octects word16 i; if (!inQueue.GetShort(i) || (i!=0)) - BERDecodeError(); + { + fputs("### Internal Error.\n### Invalid or corrupt key.\n### Exiting...\n\ +", stderr); + exit(1); + } } } diff --git a/src/cryptlib/misc.h b/src/cryptlib/misc.h index 467a7a7..d390fa2 100644 --- a/src/cryptlib/misc.h +++ b/src/cryptlib/misc.h @@ -9,7 +9,8 @@ #include #endif -#ifdef __MINT__ // has memory.h, but memset defined in string.h anyway. +#if defined(__MINT__) || defined(__DJGPP__) + // OS has memory.h, but memset defined in string.h anyway. #include #endif diff --git a/src/db/Makefile.am b/src/db/Makefile.am index 4a436e3..3488413 100644 --- a/src/db/Makefile.am +++ b/src/db/Makefile.am @@ -1,13 +1,18 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libdb.a +libdb_adir=. libdb_a_SOURCES = \ blockfile.cpp blockrecordarray.cpp blockrecordfile.cpp \ - db.cpp hierdatabase.cpp hierdbpath.cpp stddb.cpp + db.cpp dberrors.cpp hierdatabase.cpp hierdbpath.cpp stddb.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +libdb_a_HEADERS = \ + block.h blockfile.h blockrecordarray.h blockrecordfile.h \ + db.h dberrors.h hierdatabase.h hierdbnode.h hierdbpath.h stddb.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libdb_a_OBJECTS) diff --git a/src/db/Makefile.in b/src/db/Makefile.in index 42685bc..4458f4a 100644 --- a/src/db/Makefile.in +++ b/src/db/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libdb_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,43 +87,122 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/db -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libdb_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libdb_a_AR = $(AR) $(ARFLAGS) libdb_a_LIBADD = am_libdb_a_OBJECTS = blockfile.$(OBJEXT) blockrecordarray.$(OBJEXT) \ - blockrecordfile.$(OBJEXT) db.$(OBJEXT) hierdatabase.$(OBJEXT) \ - hierdbpath.$(OBJEXT) stddb.$(OBJEXT) + blockrecordfile.$(OBJEXT) db.$(OBJEXT) dberrors.$(OBJEXT) \ + hierdatabase.$(OBJEXT) hierdbpath.$(OBJEXT) stddb.$(OBJEXT) libdb_a_OBJECTS = $(am_libdb_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libdb_a_SOURCES) DIST_SOURCES = $(libdb_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdb_adir)" +HEADERS = $(libdb_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -88,7 +218,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -96,6 +226,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -107,6 +238,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -123,21 +255,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -167,18 +302,27 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libdb.a +libdb_adir = . libdb_a_SOURCES = \ blockfile.cpp blockrecordarray.cpp blockrecordfile.cpp \ - db.cpp hierdatabase.cpp hierdbpath.cpp stddb.cpp + db.cpp dberrors.cpp hierdatabase.cpp hierdbpath.cpp stddb.cpp + +libdb_a_HEADERS = \ + block.h blockfile.h blockrecordarray.h blockrecordfile.h \ + db.h dberrors.h hierdatabase.h hierdbnode.h hierdbpath.h stddb.h all: all-am @@ -188,15 +332,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/db/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/db/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/db/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/db/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -213,13 +356,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libdb.a: $(libdb_a_OBJECTS) $(libdb_a_DEPENDENCIES) - -rm -f libdb.a - $(libdb_a_AR) libdb.a $(libdb_a_OBJECTS) $(libdb_a_LIBADD) - $(RANLIB) libdb.a + +libdb.a: $(libdb_a_OBJECTS) $(libdb_a_DEPENDENCIES) $(EXTRA_libdb_a_DEPENDENCIES) + $(AM_V_at)-rm -f libdb.a + $(AM_V_AR)$(libdb_a_AR) libdb.a $(libdb_a_OBJECTS) $(libdb_a_LIBADD) + $(AM_V_at)$(RANLIB) libdb.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -228,91 +373,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libdb_aHEADERS: $(libdb_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libdb_a_HEADERS)'; test -n "$(libdb_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdb_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdb_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libdb_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libdb_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libdb_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libdb_a_HEADERS)'; test -n "$(libdb_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdb_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libdb_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -323,16 +498,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -352,18 +533,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libdb_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -382,22 +583,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libdb_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libdb_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libdb_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libdb_a_OBJECTS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/db/dberrors.cpp b/src/db/dberrors.cpp index 822159e..4b2d2ed 100644 --- a/src/db/dberrors.cpp +++ b/src/db/dberrors.cpp @@ -36,8 +36,7 @@ // #include "stddb.h" -#include "core/errortable.h" - +#include "dberrors.h" #include "hierdatabase.h" TSS_BEGIN_ERROR_REGISTRATION( db ) diff --git a/src/core/userstring.cpp b/src/db/dberrors.h similarity index 86% rename from src/core/userstring.cpp rename to src/db/dberrors.h index f94d8af..b4c876d 100644 --- a/src/core/userstring.cpp +++ b/src/db/dberrors.h @@ -29,9 +29,20 @@ // If you have any questions, please contact Tripwire, Inc. at either // info@tripwire.org or www.tripwire.org. // -// userstring.cpp -#include "stdcore.h" -#include "userstring.h" +// +// Name....: dberrors.h +// Date....: 5/17/99 +// Creator.: Matthew Brinkley (brinkley) +// +// -iUserString* iUserString::mpInstance; +#ifndef __DBERRORS_H +#define __DBERRORS_H + +#include "core/errortable.h" + +TSS_DECLARE_ERROR_REGISTRATION( db ) + + +#endif//__DBERRORS_H diff --git a/src/db/hierdatabase.cpp b/src/db/hierdatabase.cpp old mode 100644 new mode 100755 index 8c98ea3..2a88614 --- a/src/db/hierdatabase.cpp +++ b/src/db/hierdatabase.cpp @@ -39,6 +39,7 @@ #include "core/archive.h" #include "core/upperbound.h" #include "core/errorbucket.h" +#include "core/errorbucketimpl.h" // TODO -- all of these util_ functions should throw an eArchive if an attempt is made to // write to a null address @@ -288,7 +289,19 @@ void cHierDatabaseIter::LoadArrayAt(const cHierAddr& addr) //throw (eArchive, eH while( ! curAddr.IsNull() ) { mEntries.push_back( cHierEntry() ); - util_ReadObject( mpDb, &mEntries.back(), curAddr ); + //Catch db errors, in case only part of db is broken + try + { + util_ReadObject( mpDb, &mEntries.back(), curAddr ); + } + catch( eError& e ) + { + e.SetFatality(false); + cErrorReporter::PrintErrorMsg(e); + mEntries.pop_back(); + break; + } + curAddr = mEntries.back().mNext; } diff --git a/src/db/hierdatabase.h b/src/db/hierdatabase.h index a2f8413..54d335f 100644 --- a/src/db/hierdatabase.h +++ b/src/db/hierdatabase.h @@ -49,6 +49,11 @@ #include "hierdbpath.h" #endif +#if HAVE_STRINGS_H // RTEMS needs this for strcasecmp +# include +#endif + + class cHierDatabaseIter; class cErrorBucket; diff --git a/src/fco/Makefile.am b/src/fco/Makefile.am index f4c498d..10f756d 100644 --- a/src/fco/Makefile.am +++ b/src/fco/Makefile.am @@ -1,8 +1,9 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libfco.a +libfco_adir=. libfco_a_SOURCES = \ fco.cpp fcocompare.cpp fcodatasourceiter.cpp \ fcodatasourceiterimpl.cpp fcoerrors.cpp fconame.cpp \ @@ -11,8 +12,21 @@ libfco_a_SOURCES = \ fcospecimpl.cpp fcospeclist.cpp fcospecutil.cpp fcostrings.cpp \ fcoundefprop.cpp genreinfo.cpp genrespeclist.cpp \ genreswitcher.cpp signature.cpp stdfco.cpp twfactory.cpp - -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit + +libfco_a_HEADERS = \ + fco.h fcocompare.h fcodatasource.h fcodatasourceiter.h \ + fcodatasourceiterimpl.h fcoerrors.h fcogenre.h fconame.h \ + fconameinfo.h fconametbl.h fconametranslator.h fcoprop.h \ + fcopropcalc.h fcopropdisplayer.h fcopropimpl.h fcopropset.h \ + fcopropvector.h fcosetimpl.h fcosetws.h \ + fcospec.h fcospecattr.h fcospechelper.h fcospecimpl.h \ + fcospeclist.h fcospecutil.h fcostrings.h fcoundefprop.h \ + fcovisitor.h genreinfo.h genrespeclist.h genreswitcher.h \ + iterproxy.h parsergenreutil.h propset.h signature.h \ + stdfco.h twfactory.h + + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libfco_a_OBJECTS) diff --git a/src/fco/Makefile.in b/src/fco/Makefile.in index b816489..7065828 100644 --- a/src/fco/Makefile.in +++ b/src/fco/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libfco_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/fco -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libfco_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libfco_a_AR = $(AR) $(ARFLAGS) libfco_a_LIBADD = am_libfco_a_OBJECTS = fco.$(OBJEXT) fcocompare.$(OBJEXT) \ @@ -64,23 +122,95 @@ am_libfco_a_OBJECTS = fco.$(OBJEXT) fcocompare.$(OBJEXT) \ genreswitcher.$(OBJEXT) signature.$(OBJEXT) stdfco.$(OBJEXT) \ twfactory.$(OBJEXT) libfco_a_OBJECTS = $(am_libfco_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libfco_a_SOURCES) DIST_SOURCES = $(libfco_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libfco_adir)" +HEADERS = $(libfco_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -96,7 +226,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -104,6 +234,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -115,6 +246,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -131,21 +263,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -175,15 +310,20 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libfco.a +libfco_adir = . libfco_a_SOURCES = \ fco.cpp fcocompare.cpp fcodatasourceiter.cpp \ fcodatasourceiterimpl.cpp fcoerrors.cpp fconame.cpp \ @@ -193,6 +333,18 @@ libfco_a_SOURCES = \ fcoundefprop.cpp genreinfo.cpp genrespeclist.cpp \ genreswitcher.cpp signature.cpp stdfco.cpp twfactory.cpp +libfco_a_HEADERS = \ + fco.h fcocompare.h fcodatasource.h fcodatasourceiter.h \ + fcodatasourceiterimpl.h fcoerrors.h fcogenre.h fconame.h \ + fconameinfo.h fconametbl.h fconametranslator.h fcoprop.h \ + fcopropcalc.h fcopropdisplayer.h fcopropimpl.h fcopropset.h \ + fcopropvector.h fcosetimpl.h fcosetws.h \ + fcospec.h fcospecattr.h fcospechelper.h fcospecimpl.h \ + fcospeclist.h fcospecutil.h fcostrings.h fcoundefprop.h \ + fcovisitor.h genreinfo.h genrespeclist.h genreswitcher.h \ + iterproxy.h parsergenreutil.h propset.h signature.h \ + stdfco.h twfactory.h + all: all-am .SUFFIXES: @@ -201,15 +353,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fco/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/fco/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fco/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/fco/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -226,13 +377,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfco.a: $(libfco_a_OBJECTS) $(libfco_a_DEPENDENCIES) - -rm -f libfco.a - $(libfco_a_AR) libfco.a $(libfco_a_OBJECTS) $(libfco_a_LIBADD) - $(RANLIB) libfco.a + +libfco.a: $(libfco_a_OBJECTS) $(libfco_a_DEPENDENCIES) $(EXTRA_libfco_a_DEPENDENCIES) + $(AM_V_at)-rm -f libfco.a + $(AM_V_AR)$(libfco_a_AR) libfco.a $(libfco_a_OBJECTS) $(libfco_a_LIBADD) + $(AM_V_at)$(RANLIB) libfco.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -241,91 +394,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libfco_aHEADERS: $(libfco_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libfco_a_HEADERS)'; test -n "$(libfco_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libfco_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libfco_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libfco_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libfco_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libfco_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libfco_a_HEADERS)'; test -n "$(libfco_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libfco_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libfco_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -336,16 +519,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -365,18 +554,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libfco_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -395,22 +604,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libfco_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libfco_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libfco_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libfco_a_OBJECTS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/fco/fcodatasourceiter.cpp b/src/fco/fcodatasourceiter.cpp index cdf64b2..ce9d68f 100644 --- a/src/fco/fcodatasourceiter.cpp +++ b/src/fco/fcodatasourceiter.cpp @@ -40,6 +40,10 @@ #include "stdfco.h" #include "fcodatasourceiter.h" +#if HAVE_STRINGS_H // for strcasecmp on RTEMS +# include +#endif + //========================================================================= // METHOD CODE //========================================================================= diff --git a/src/fco/fconame.cpp b/src/fco/fconame.cpp index 4cda54a..bc5ecaa 100644 --- a/src/fco/fconame.cpp +++ b/src/fco/fconame.cpp @@ -234,7 +234,12 @@ void cFCOName::ParseString( const TCHAR* pszin ) TSTRING name(begin, at); - if (name.length() > 0 || components == 0) +//NOTE: To be truly standards compliant we ought to turn >2 slashes into 1, not 2. +#if SUPPORTS_DOUBLE_SLASH_PATH + if (name.length() > 0 || components < 2) +#else + if (name.length() > 0 || components == 0) +#endif { cFCONameTblNode* pNode = cFCOName_i::msNameTbl.CreateNode(name); @@ -372,12 +377,8 @@ void cFCOName::Read(iSerializer* pSerializer, int32 version) int16 dummy = 0; // serialize the delimiter -#ifdef _UNICODE - pSerializer->ReadInt16( (int16&)mDelimiter ); -#else pSerializer->ReadInt16( dummy ); // delimiter, but it's always '/' anyway in OST. - mDelimiter = '/'; -#endif + mDelimiter = '/'; // read the case-sensitiveness pSerializer->ReadInt16(dummy); @@ -402,13 +403,8 @@ void cFCOName::Write(iSerializer* pSerializer) const pSerializer->WriteString(AsString()); // serialize the delimiter -#ifdef _UNICODE - pSerializer->WriteInt16(mDelimiter); -#else - unsigned short wc = (unsigned short)'/'; + unsigned short wc = (unsigned short)'/'; pSerializer->WriteInt16(wc); -#endif - pSerializer->WriteInt16( mbCaseSensitive ? (int16)1 : (int16)0); } diff --git a/src/fco/fcopropcalc.h b/src/fco/fcopropcalc.h index b74cb4a..f39d30d 100644 --- a/src/fco/fcopropcalc.h +++ b/src/fco/fcopropcalc.h @@ -84,8 +84,10 @@ public: enum CalcFlags { - DO_NOT_MODIFY_PROPERTIES = 0x00000001 // reset any properties that may have been altered due to measurement + DO_NOT_MODIFY_PROPERTIES = 0x00000001, // reset any properties that may have been altered due to measurement + DIRECT_IO = 0x00000002 // use direct i/o when scanning files }; + virtual int GetCalcFlags() const = 0; virtual void SetCalcFlags(int i) = 0; // any calculation flags needed for calculation. diff --git a/src/fco/fcopropsetimpl.cpp b/src/fco/fcopropsetimpl.cpp deleted file mode 100644 index aa1a8a6..0000000 --- a/src/fco/fcopropsetimpl.cpp +++ /dev/null @@ -1,212 +0,0 @@ -// -// The developer of the original code and/or files is Tripwire, Inc. -// Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, -// Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights -// reserved. -// -// This program is free software. The contents of this file are subject -// to the terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2 of the License, or (at your -// option) any later version. You may redistribute it and/or modify it -// only in compliance with the GNU General Public License. -// -// This program is distributed in the hope that it will be useful. -// However, this program is distributed AS-IS WITHOUT ANY -// WARRANTY; INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS -// FOR A PARTICULAR PURPOSE. Please see the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. -// -// Nothing in the GNU General Public License or any other license to use -// the code or files shall permit you to use Tripwire's trademarks, -// service marks, or other intellectual property without Tripwire's -// prior written consent. -// -// If you have any questions, please contact Tripwire, Inc. at either -// info@tripwire.org or www.tripwire.org. -// -/////////////////////////////////////////////////////////////////////////////// -// propsetimpl.cpp - -#include "stdfs.h" -#include "propsetimpl.h" - -#include "core/debug.h" -#include "core/serializer.h" -#include "core/errorutil.h" -#include "fco/fcoundefprop.h" - - /////////////////////////////////////////////////////////////////////////////// -// TraceContents -/////////////////////////////////////////////////////////////////////////////// -void cPropSetImpl::TraceContents(int dl) const -{ - if(dl < 0) - dl = cDebug::D_DEBUG; - - cDebug d("cPropSetImpl::TraceContents"); - - TOSTRINGSTREAM ostr; - ostr << _T("File Sysytem Prop Set: "); - for(int i=0; iGetType() == CLASS_TYPE(cPropSetImpl)); - - // first, modify my valid vector... - mValidProps |= propsToCopy; - - for(int i=0; i < GetNumFSProps(); i++) - { - if(propsToCopy.ContainsItem(i)) - { - ASSERT( pSrc->GetValidVector().ContainsItem( i ) ); - const iFCOProp* pProp = pSrc->GetPropAt(i); - - if (pProp->GetType() != cFCOUndefinedProp::GetInstance()->GetType()) - { - GetPropAt(i)->Copy( pProp ); - mUndefinedProps.RemoveItem(i); - } - else - mUndefinedProps.AddItem(i); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////// -// Invalidate -/////////////////////////////////////////////////////////////////////////////// -void cPropSetImpl::InvalidateProp(int index) -{ - ASSERT((index >= 0) && (index < GetNumProps())); - mValidProps.RemoveItem(index); -} - -void cPropSetImpl::InvalidateAll() -{ - mValidProps.Clear(); -} - -void cPropSetImpl::InvalidateProps(const cFCOPropVector& propsToInvalidate) -{ - cFCOPropVector inBoth = mValidProps; - inBoth &= propsToInvalidate; - mValidProps ^= inBoth; -} - -/////////////////////////////////////////////////////////////////////////////// -// GetNumFSProps -/////////////////////////////////////////////////////////////////////////////// -int cPropSetImpl::GetNumFSProps() -{ - return PROP_NUMITEMS; -} - -/////////////////////////////////////////////////////////////////////////////// -// ctors. dtor, operator= -/////////////////////////////////////////////////////////////////////////////// -cPropSetImpl::cPropSetImpl() : - mValidProps(cPropSetImpl::PROP_NUMITEMS), - mUndefinedProps(cPropSetImpl::PROP_NUMITEMS) -{ - // TODO: do I want to zero out all the property values here? -} - -cPropSetImpl::~cPropSetImpl() -{ - -} - -cPropSetImpl::cPropSetImpl(const cPropSetImpl& rhs) : - mValidProps(cPropSetImpl::PROP_NUMITEMS) -{ - *this = rhs; -} - -const cPropSetImpl& cPropSetImpl::operator=(const cPropSetImpl& rhs) -{ - mValidProps = rhs.GetValidVector(); - mUndefinedProps = rhs.mUndefinedProps; - - for(int i=0; i < PROP_NUMITEMS; i++) - if (mValidProps.ContainsItem(i) && !mUndefinedProps.ContainsItem(i)) - GetPropAt(i)->Copy( ((cPropSetImpl&)rhs).GetPropAt(i) ); // call non-const GetPropAt for rhs - // don't want it to assert ContainsItem - return *this; -} - -const cFCOPropVector& cPropSetImpl::GetValidVector() const -{ - return mValidProps; -} - -int cPropSetImpl::GetNumProps() const -{ - return PROP_NUMITEMS; -} - -/* -int cPropSetImpl::GetPropIndex(const TCHAR* name) const -{ - for(int i=0; i= 0) && (index < GetNumProps())); - return TSS_GetString( cFS, cPropSetImpl_PropNames[index]); -} - - */ -void cPropSetImpl::Read(iSerializer* pSerializer, int32 version) -{ - if (version > Version()) - ThrowAndAssert(eSerializerVersionMismatch(_T("Property Set Read"))); - - mValidProps.Read(pSerializer); - mUndefinedProps.Read(pSerializer); - - for (int i=0; i < PROP_NUMITEMS; i++) - { - if (mValidProps.ContainsItem(i) && !mUndefinedProps.ContainsItem(i)) - GetPropAt(i)->Read(pSerializer); - } -} - -void cPropSetImpl::Write(iSerializer* pSerializer) const -{ - mValidProps.Write(pSerializer); - mUndefinedProps.Write(pSerializer); - - for (int i=0; i < PROP_NUMITEMS; i++) - { - if (mValidProps.ContainsItem(i) && !mUndefinedProps.ContainsItem(i)) - GetPropAt(i)->Write(pSerializer); - } -} - - diff --git a/src/fco/fcopropsetimpl.h b/src/fco/fcopropsetimpl.h deleted file mode 100644 index 244b9ba..0000000 --- a/src/fco/fcopropsetimpl.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// The developer of the original code and/or files is Tripwire, Inc. -// Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, -// Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights -// reserved. -// -// This program is free software. The contents of this file are subject -// to the terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2 of the License, or (at your -// option) any later version. You may redistribute it and/or modify it -// only in compliance with the GNU General Public License. -// -// This program is distributed in the hope that it will be useful. -// However, this program is distributed AS-IS WITHOUT ANY -// WARRANTY; INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS -// FOR A PARTICULAR PURPOSE. Please see the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. -// -// Nothing in the GNU General Public License or any other license to use -// the code or files shall permit you to use Tripwire's trademarks, -// service marks, or other intellectual property without Tripwire's -// prior written consent. -// -// If you have any questions, please contact Tripwire, Inc. at either -// info@tripwire.org or www.tripwire.org. -// -/////////////////////////////////////////////////////////////////////////////// -// fspropsetimpl.h -- file system objects' property set objects -// -// cPropSetImpl -- base class for all prop sets -// contains common implementation - -#ifndef __FSPROPSETIMPL_H -#define __FSPROPSETIMPL_H - -#ifndef __FCOPROPSET_H -#include "fco/fcopropset.h" -#endif -#ifndef __PROPSET_H -#include "fco/propset.h" -#endif - -/////////////////////////////////////////////////////////////////////////////// -// cPropSetImpl -/////////////////////////////////////////////////////////////////////////////// -class cPropSetImpl : public iFCOPropSet -{ -public: - cFSPropSet(); - cFSPropSet(const cFSPropSet& rhs); - virtual ~cFSPropSet(); - - const cFSPropSet& operator=(const cFSPropSet& rhs); - - virtual const cFCOPropVector& GetValidVector() const ; - virtual int GetNumProps () const ; - virtual int GetPropIndex(const TCHAR* name) const; - virtual TSTRING GetPropName (int index) const; - virtual const iFCOProp* GetPropAt(int index) const; - virtual iFCOProp* GetPropAt(int index) ; - virtual void InvalidateProp(int index); - virtual void InvalidateProps(const cFCOPropVector& propsToInvalidate) ; - virtual void InvalidateAll(); - virtual void CopyProps(const iFCOPropSet* pSrc, const cFCOPropVector& propsToCopy); - -private: - cFCOPropVector mValidProps; // all the properties that have been evaluated - cFCOPropVector mUndefinedProps; // properties that have been measured but have undefined values -}; - - -#endif // #ifndef __FSPROPSETIMPL_H - diff --git a/src/fco/genreswitcher.cpp b/src/fco/genreswitcher.cpp index 594c26a..d1e5796 100644 --- a/src/fco/genreswitcher.cpp +++ b/src/fco/genreswitcher.cpp @@ -43,6 +43,10 @@ #include "genreinfo.h" #include "core/errorutil.h" +#if HAVE_STRINGS_H // for strcasecmp on RTEMS +# include +#endif + //========================================================================= // STATIC MEMBERS //========================================================================= diff --git a/src/fco/signature.cpp b/src/fco/signature.cpp index 15991fc..cee4240 100644 --- a/src/fco/signature.cpp +++ b/src/fco/signature.cpp @@ -41,6 +41,7 @@ #include #include "fcoundefprop.h" #include "core/archive.h" +#include "core/debug.h" #ifndef HAVE_OPENSSL_MD5_H # ifdef HAVE_STRINGS_H # include /* for bcopy(), this is only needed for Solaris */ @@ -97,7 +98,8 @@ iFCOProp::CmpResult iSignature::Compare(const iFCOProp* rhs, Op op) const return (op == iFCOProp::OP_NE) ? iFCOProp::CMP_TRUE : iFCOProp::CMP_FALSE; } -bool cArchiveSigGen::mHex = false; +bool cArchiveSigGen::s_hex = false; +bool cArchiveSigGen::s_direct = false; void cArchiveSigGen::AddSig( iSignature* pSig ) { @@ -106,11 +108,18 @@ void cArchiveSigGen::AddSig( iSignature* pSig ) void cArchiveSigGen::CalculateSignatures( cArchive& a ) { - byte abBuf[iSignature::SUGGESTED_BLOCK_SIZE]; - const int cbToRead = iSignature::SUGGESTED_BLOCK_SIZE; + byte abBuf[iSignature::SUGGESTED_BLOCK_SIZE * 2]; int cbRead; container_type::size_type i; + byte* pBuf = abBuf; + if (s_direct) + { + unsigned long mod = (unsigned long)abBuf % iSignature::SUGGESTED_BLOCK_SIZE; + unsigned long offset = (iSignature::SUGGESTED_BLOCK_SIZE - mod); + pBuf = abBuf + offset; + } + // init hash for( i = 0; i < mSigList.size(); i++ ) mSigList[i]->Init(); @@ -118,12 +127,12 @@ void cArchiveSigGen::CalculateSignatures( cArchive& a ) // hash data do { - cbRead = a.ReadBlob( abBuf, cbToRead ); + cbRead = a.ReadBlob( pBuf, iSignature::SUGGESTED_BLOCK_SIZE ); for( i = 0; i < mSigList.size(); i++ ) - mSigList[i]->Update( abBuf, cbRead ); + mSigList[i]->Update( pBuf, cbRead ); } - while( cbRead == cbToRead ); + while( cbRead == iSignature::SUGGESTED_BLOCK_SIZE ); // finalize hash for( i = 0; i < mSigList.size(); i++ ) @@ -132,12 +141,12 @@ void cArchiveSigGen::CalculateSignatures( cArchive& a ) bool cArchiveSigGen::Hex() { - return mHex; + return s_hex; } void cArchiveSigGen::SetHex(bool hex) { - mHex = hex; + s_hex = hex; } /////////////////////////////////////////////////////////////////////////////// @@ -326,12 +335,9 @@ TSTRING cChecksumSignature::AsString() const ps_signature = pltob64(local, buf, 2); //ps_signature holds base64 representation of mCRC -#ifdef _UNICODE - ret.resize(strlen(ps_signature)); - mbstowcs((TCHAR*)ret.data(), ps_signature, strlen(ps_signature)); -#else + ret.append(ps_signature); -#endif + return ret; } @@ -420,12 +426,7 @@ TSTRING cCRC32Signature::AsString() const ps_signature = pltob64(&local, buf, 1); //ps_signature holds base64 representation of mCRCInfo.crc -#ifdef _UNICODE - ret.resize(strlen(ps_signature)); - mbstowcs((TCHAR*)ret.data(), ps_signature, strlen(ps_signature)); -#else ret.append(ps_signature); -#endif return ret; } @@ -479,7 +480,11 @@ IMPLEMENT_TYPEDSERIALIZABLE(cMD5Signature, _T("cMD5Signature"), 0, 1) cMD5Signature::cMD5Signature() { - memset( mMD5Info.digest, 0, sizeof( mMD5Info.digest ) ); +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + memset( mMD5Info.data, 0, sizeof( mMD5Info.data ) ); +#else + memset( mMD5Info.digest, 0, sizeof( mMD5Info.digest ) ); +#endif memset( md5_digest, 0, MD5_DIGEST_LENGTH ); } @@ -489,7 +494,9 @@ cMD5Signature::~cMD5Signature() void cMD5Signature::Init() { -#ifdef HAVE_OPENSSL_MD5_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_MD5_Init(&mMD5Info); +#elif HAVE_OPENSSL_MD5_H MD5_Init( &mMD5Info ); #else MD5Init( &mMD5Info ); @@ -498,7 +505,9 @@ void cMD5Signature::Init() void cMD5Signature::Update( const byte* const pbData, int cbDataLen ) { -#ifdef HAVE_OPENSSL_MD5_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_MD5_Update(&mMD5Info, (uint8*)pbData, cbDataLen); +#elif HAVE_OPENSSL_MD5_H MD5_Update( &mMD5Info, (uint8*)pbData, cbDataLen ); #else MD5Update( &mMD5Info, (uint8*)pbData, cbDataLen ); @@ -507,7 +516,9 @@ void cMD5Signature::Update( const byte* const pbData, int cbDataLen ) void cMD5Signature::Finit() { -#ifdef HAVE_OPENSSL_MD5_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_MD5_Final(md5_digest, &mMD5Info); +#elif HAVE_OPENSSL_MD5_H MD5_Final( md5_digest, &mMD5Info ); #else MD5Final( &mMD5Info ); @@ -529,14 +540,7 @@ TSTRING cMD5Signature::AsString() const btob64((byte*)md5_digest, buf, SIG_BYTE_SIZE*8); //converting to base64 representation. -#ifdef _UNICODE //making it TSTRING sensitive - int length; - length = strlen(buf); - ret.resize(length); - mbstowcs((TCHAR*) ret.data(), buf, length); -#else ret.append(buf); -#endif return ret; } @@ -600,7 +604,10 @@ IMPLEMENT_TYPEDSERIALIZABLE(cSHASignature, _T("cSHASignature"), 0, 1) cSHASignature::cSHASignature() { memset( &mSHAInfo, 0, sizeof( mSHAInfo ) ); -#ifdef HAVE_OPENSSL_SHA_H + +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + memset( sha_digest, 0, CC_SHA1_DIGEST_LENGTH ); +#elif HAVE_OPENSSL_SHA_H memset( sha_digest, 0, SHA_DIGEST_LENGTH ); #endif } @@ -610,7 +617,9 @@ cSHASignature::~cSHASignature() void cSHASignature::Init() { -#ifdef HAVE_OPENSSL_SHA_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_SHA1_Init( &mSHAInfo ); +#elif HAVE_OPENSSL_SHA_H SHA1_Init( &mSHAInfo ); #else shsInit( &mSHAInfo ); @@ -620,7 +629,9 @@ void cSHASignature::Init() void cSHASignature::Update( const byte* const pbData, int cbDataLen ) { ASSERT( sizeof( byte ) == sizeof( uint8 ) ); -#ifdef HAVE_OPENSSL_SHA_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_SHA1_Update( &mSHAInfo, (uint8*)pbData, cbDataLen ); +#elif HAVE_OPENSSL_SHA_H SHA1_Update( &mSHAInfo, (uint8*)pbData, cbDataLen ); #else shsUpdate( &mSHAInfo, (uint8*)pbData, cbDataLen ); @@ -629,7 +640,9 @@ void cSHASignature::Update( const byte* const pbData, int cbDataLen ) void cSHASignature::Finit() { -#ifdef HAVE_OPENSSL_SHA_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_SHA1_Final( (unsigned char *)sha_digest, &mSHAInfo ); +#elif HAVE_OPENSSL_SHA_H SHA1_Final( (unsigned char *)sha_digest, &mSHAInfo ); #else shsFinal( &mSHAInfo ); @@ -638,7 +651,7 @@ void cSHASignature::Finit() //////////////////////////////////////////////////////////////////////////////// // AsString -- Converts to Base64 representation and returns a TSTRING -#ifdef HAVE_OPENSSL_SHA_H +#if defined(HAVE_OPENSSL_SHA_H) || defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) TSTRING cSHASignature::AsString(void) const { if (cArchiveSigGen::Hex()) @@ -651,14 +664,7 @@ TSTRING cSHASignature::AsString(void) const ps_signature = btob64((uint8*)sha_digest, buf, SIG_UINT32_SIZE*sizeof(uint32)*8); //converting to base64 representation. -#ifdef _UNICODE //making it TSTRING sensitive - int length; - length = strlen(ps_signature); - ret.resize(length); - mbstowcs((TCHAR*) ret.data(), ps_signature, length); -#else ret.append(ps_signature); -#endif return ret; } @@ -733,13 +739,7 @@ TSTRING cSHASignature::AsString(void) const ps_signature = pltob64((uint32*)mSHAInfo.digest, buf, SIG_UINT32_SIZE); //converting to base64 representation. -#ifdef _UNICODE //making it TSTRING sensitive - int length = strlen(ps_signature); - ret.resize(length); - mbstowcs((TCHAR*) ret.data(), ps_signature, length); -#else ret.append(ps_signature); -#endif return ret; //return ret; } @@ -842,15 +842,7 @@ TSTRING cHAVALSignature::AsString() const btob64((byte*)mSignature, buf, 128); //converting to base64 representation. -#ifdef _UNICODE //making it TSTRING sensitive - int length; - length = strlen(buf); - ret.resize(length); - mbstowcs((TCHAR*) ret.data(), buf, length); -#else ret.append(buf); -#endif - return ret; } diff --git a/src/fco/signature.h b/src/fco/signature.h index 61fd50d..c7d775c 100644 --- a/src/fco/signature.h +++ b/src/fco/signature.h @@ -71,6 +71,12 @@ # endif #endif +/*Use OSX CommonCrypto lib if available*/ +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H +# include +#endif + + #include "core/haval.h" // TODO: figure out a way to do this without including these headers. // pool of objects? @@ -150,6 +156,9 @@ public: static bool Hex(); static void SetHex(bool); + static bool UseDirectIO() { return s_direct; } + static void SetUseDirectIO( bool b ) { s_direct = b; } + private: // don't let C++ create these functions cArchiveSigGen( const cArchiveSigGen& ); @@ -158,7 +167,8 @@ private: typedef std::vector< iSignature* > container_type; container_type mSigList; - static bool mHex; + static bool s_direct; + static bool s_hex; }; @@ -272,8 +282,13 @@ protected: enum { SIG_BYTE_SIZE = MD5_DIGEST_LENGTH }; virtual bool IsEqual(const iSignature& rhs) const; +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + CC_MD5_CTX mMD5Info; + uint8 md5_digest[CC_MD5_DIGEST_LENGTH]; +#else MD5_CTX mMD5Info; uint8 md5_digest[MD5_DIGEST_LENGTH]; +#endif }; /////////////////////////////////////////////////////////////////////////////// @@ -301,10 +316,14 @@ protected: virtual bool IsEqual(const iSignature& rhs) const; -#ifdef HAVE_OPENSSL_SHA_H +#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H + enum { SIG_UINT32_SIZE = CC_SHA1_DIGEST_LENGTH/4 }; + CC_SHA1_CTX mSHAInfo; + uint32 sha_digest[SIG_UINT32_SIZE]; +#elif HAVE_OPENSSL_SHA_H enum { SIG_UINT32_SIZE = SHA_DIGEST_LENGTH/4 }; SHA_CTX mSHAInfo; - uint32 sha_digest[SHA_DIGEST_LENGTH/4]; + uint32 sha_digest[SIG_UINT32_SIZE]; #else enum { SIG_UINT32_SIZE = 5 }; SHS_INFO mSHAInfo; diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index e1da0fb..55fbd36 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -1,15 +1,22 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libfs.a +libfs_adir=. libfs_a_SOURCES = \ fs.cpp fsdatasourceiter.cpp fserrors.cpp fsfactory.cpp \ fsnametranslator.cpp fsobject.cpp fsparserutil.cpp \ fspropcalc.cpp fspropdisplayer.cpp fspropset.cpp \ fsstrings.cpp fsvisitor.cpp stdfs.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +libfs_a_HEADERS = \ + fs.h fsdatasourceiter.h fserrors.h fsfactory.h \ + fsnametranslator.h fsobject.h fsparserutil.h \ + fspropcalc.h fspropdisplayer.h fspropset.h fsstrings.h \ + fsvisitor.h stdfs.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libfs_a_OBJECTS) diff --git a/src/fs/Makefile.in b/src/fs/Makefile.in index e4d81d1..15eacf0 100644 --- a/src/fs/Makefile.in +++ b/src/fs/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libfs_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/fs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libfs_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libfs_a_AR = $(AR) $(ARFLAGS) libfs_a_LIBADD = am_libfs_a_OBJECTS = fs.$(OBJEXT) fsdatasourceiter.$(OBJEXT) \ @@ -59,23 +117,95 @@ am_libfs_a_OBJECTS = fs.$(OBJEXT) fsdatasourceiter.$(OBJEXT) \ fspropdisplayer.$(OBJEXT) fspropset.$(OBJEXT) \ fsstrings.$(OBJEXT) fsvisitor.$(OBJEXT) stdfs.$(OBJEXT) libfs_a_OBJECTS = $(am_libfs_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libfs_a_SOURCES) DIST_SOURCES = $(libfs_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libfs_adir)" +HEADERS = $(libfs_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -91,7 +221,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -99,6 +229,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -110,6 +241,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -126,21 +258,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -170,21 +305,32 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libfs.a +libfs_adir = . libfs_a_SOURCES = \ fs.cpp fsdatasourceiter.cpp fserrors.cpp fsfactory.cpp \ fsnametranslator.cpp fsobject.cpp fsparserutil.cpp \ fspropcalc.cpp fspropdisplayer.cpp fspropset.cpp \ fsstrings.cpp fsvisitor.cpp stdfs.cpp +libfs_a_HEADERS = \ + fs.h fsdatasourceiter.h fserrors.h fsfactory.h \ + fsnametranslator.h fsobject.h fsparserutil.h \ + fspropcalc.h fspropdisplayer.h fspropset.h fsstrings.h \ + fsvisitor.h stdfs.h + all: all-am .SUFFIXES: @@ -193,15 +339,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/fs/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/fs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -218,13 +363,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfs.a: $(libfs_a_OBJECTS) $(libfs_a_DEPENDENCIES) - -rm -f libfs.a - $(libfs_a_AR) libfs.a $(libfs_a_OBJECTS) $(libfs_a_LIBADD) - $(RANLIB) libfs.a + +libfs.a: $(libfs_a_OBJECTS) $(libfs_a_DEPENDENCIES) $(EXTRA_libfs_a_DEPENDENCIES) + $(AM_V_at)-rm -f libfs.a + $(AM_V_AR)$(libfs_a_AR) libfs.a $(libfs_a_OBJECTS) $(libfs_a_LIBADD) + $(AM_V_at)$(RANLIB) libfs.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -233,91 +380,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libfs_aHEADERS: $(libfs_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libfs_a_HEADERS)'; test -n "$(libfs_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libfs_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libfs_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libfs_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libfs_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libfs_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libfs_a_HEADERS)'; test -n "$(libfs_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libfs_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libfs_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -328,16 +505,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -357,18 +540,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libfs_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -387,22 +590,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libfs_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libfs_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libfs_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libfs_a_OBJECTS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/fs/fsdatasourceiter.cpp b/src/fs/fsdatasourceiter.cpp index c6a6419..7308621 100644 --- a/src/fs/fsdatasourceiter.cpp +++ b/src/fs/fsdatasourceiter.cpp @@ -149,7 +149,7 @@ void cFSDataSourceIter::GetChildrenNames( const TSTRING& strParentName, std::vec { iFSServices::GetInstance()->ReadDir( strParentName, vChildrenNames, false ); } - catch( eFSServices& e ) + catch( eError& e ) { cDebug d("cFSDataSourceIter::GeneratePeers"); d.TraceError("**** ReadDir failed for %s\n", strParentName.c_str() ); @@ -184,7 +184,7 @@ bool cFSDataSourceIter::InitializeTypeInfo(iFCO* pFCO) { iFSServices::GetInstance()->Stat( pTrans->ToStringAPI( pObj->GetName() ), statArgs); } - catch(eFSServices& e) + catch(eError& e) { cDebug d("CreateObject"); d.TraceError( "*** Stat of %s failed!!!\n", pObj->GetName().AsString().c_str() ); diff --git a/src/fs/fsparserutil.cpp b/src/fs/fsparserutil.cpp index e4f6979..c20ed44 100644 --- a/src/fs/fsparserutil.cpp +++ b/src/fs/fsparserutil.cpp @@ -137,8 +137,8 @@ void cFSParserUtil::InterpretFCOName( const std::list& l, cFCOName& nam for( std::list::const_iterator i = l.begin(); i != l.end(); i++ ) strT += *i; -#ifdef __AROS__ - strT = cArosPath::AsPosix(strT); +#if USES_DEVICE_PATH + strT = cDevicePath::AsPosix(strT); #endif // let cFCOName handle interpretation diff --git a/src/fs/fspropcalc.cpp b/src/fs/fspropcalc.cpp index 543d3bb..585df89 100644 --- a/src/fs/fspropcalc.cpp +++ b/src/fs/fspropcalc.cpp @@ -45,6 +45,7 @@ #include "fspropcalc.h" #include "fsobject.h" + #if IS_UNIX #include #endif @@ -96,9 +97,18 @@ static bool GetSymLinkStr(const cFCOName& fileName, cArchive& arch) #ifdef _UNICODE #error GetSymLinkStr in fspropcalc.cpp is not unicode compliant #else // ifdef _UNICODE + char buf[1024]; +#if defined(O_PATH) + int fd = open(iTWFactory::GetInstance()->GetNameTranslator()->ToStringAPI( fileName ).c_str(), + (O_PATH | O_NOFOLLOW | O_NOATIME)); + int rtn = readlinkat(fd, 0, buf, 1024); + close(fd); +#else int rtn = readlink( iTWFactory::GetInstance()->GetNameTranslator()->ToStringAPI( fileName ).c_str(), - buf, 1024 ); + buf, 1024 ); +#endif + if(rtn == -1) return false; @@ -167,7 +177,7 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj) bDidStat = true; } } - catch(eFSServices& e) + catch(eError& e) { d.TraceError("Error getting stat info for %s : %s\n", strName.c_str(), e.GetMsg().c_str()); @@ -268,6 +278,8 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj) } } + bool hash_success = false; + // if the file type is not a regular file, we will // not try to open the file for signature generation ASSERT( propSet.GetValidVector().ContainsItem(cFSPropSet::PROP_FILETYPE) ); @@ -283,7 +295,8 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj) cFileArchive arch; cMemoryArchive memArch; cBidirArchive* pTheArch; - bool bInitSuccess = true; + hash_success = true; + if(propSet.GetFileType() == cFSPropSet::FT_SYMLINK) { pTheArch = &memArch; @@ -292,7 +305,7 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj) // add it to the bucket... if(mpErrorBucket) mpErrorBucket->AddError( eArchiveOpen( strName, iFSServices::GetInstance()->GetErrString(), eError::NON_FATAL ) ); - bInitSuccess = false; + hash_success = false; } } @@ -300,22 +313,24 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj) { pTheArch = &arch; try - { - arch.OpenRead(strName.c_str(), cFileArchive::FA_NONBLOCKING); + { + arch.OpenRead(strName.c_str(), ((mCalcFlags & iFCOPropCalc::DIRECT_IO) ? + cFileArchive::FA_SCANNING | cFileArchive::FA_DIRECT : + cFileArchive::FA_SCANNING) ); } - catch (eArchive&) + catch (eError&) { // add it to the bucket... if(mpErrorBucket) mpErrorBucket->AddError( eArchiveOpen( strName, iFSServices::GetInstance()->GetErrString(), eError::NON_FATAL ) ); - bInitSuccess = false; + hash_success = false; } } // // if we have successfully initialized the archive // - if (bInitSuccess) + if (hash_success) { cArchiveSigGen asg; @@ -346,13 +361,26 @@ void cFSPropCalc::VisitFSObject(cFSObject& obj) // // calculate the signatures // - pTheArch->Seek( 0, cBidirArchive::BEGINNING ); - asg.CalculateSignatures( *pTheArch ); - arch.Close(); + try + { + pTheArch->Seek( 0, cBidirArchive::BEGINNING ); + asg.CalculateSignatures( *pTheArch ); + arch.Close(); + } + catch (eError& e) + { + d.TraceError("Error generating hashes for %s : %s\n", strName.c_str(), e.GetMsg().c_str()); + + e.SetFatality(false); + if(mpErrorBucket) + mpErrorBucket->AddError(e); + hash_success = false; + } } } } - else + + if (!hash_success) { // We can't calculate signatures, set them to undefined if (propsToCheck.ContainsItem(cFSPropSet::PROP_CRC32)) diff --git a/src/fs/fspropcalc.h b/src/fs/fspropcalc.h index 63f76f8..53a1eae 100644 --- a/src/fs/fspropcalc.h +++ b/src/fs/fspropcalc.h @@ -73,6 +73,7 @@ public: virtual int GetCalcFlags() const; virtual void SetCalcFlags( int i ); + private: cFSPropCalc( const cFSPropCalc& ); void operator =( const cFSPropCalc& ); diff --git a/src/fs/fspropdisplayer.cpp b/src/fs/fspropdisplayer.cpp index bd314ac..312f403 100644 --- a/src/fs/fspropdisplayer.cpp +++ b/src/fs/fspropdisplayer.cpp @@ -270,7 +270,7 @@ void cFSPropDisplayer::InitForProp( const iFCO* const pFCO, const int propIdx) if( ! GetUsername( i64UID, tstrDummy ) ) { TSTRING tstrUsername; - if( iFSServices::GetInstance()->GetOwnerForFile( pFCO->GetName().AsString(), tstrUsername ) ) + if( iFSServices::GetInstance()->GetUserName( i64UID, tstrUsername ) ) AddUsernameMapping ( i64UID, tstrUsername ); else AddUsernameMapping ( i64UID, _T("") ); // on failure, enter error value into mapping so we don't search for this value again. @@ -286,7 +286,7 @@ void cFSPropDisplayer::InitForProp( const iFCO* const pFCO, const int propIdx) if( ! GetGroupname( i64GID, tstrDummy ) ) { TSTRING tstrGroupname; - if( iFSServices::GetInstance()->GetGroupForFile( pFCO->GetName().AsString(), tstrGroupname ) ) + if( iFSServices::GetInstance()->GetGroupName( i64GID, tstrGroupname ) ) AddGroupnameMapping( i64GID, tstrGroupname ); else AddGroupnameMapping( i64GID, _T("") ); // on failure, enter error value into mapping so we don't search for this value again. diff --git a/src/siggen/Makefile.am b/src/siggen/Makefile.am index f1e4912..b56566e 100644 --- a/src/siggen/Makefile.am +++ b/src/siggen/Makefile.am @@ -1,17 +1,21 @@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. LIBS = -ltripwire -lcryptlib @LIBS@ LDFLAGS = @LDFLAGS@ -L../../lib LN_S = @LN@ sbin_PROGRAMS = siggen +siggendir=. siggen_SOURCES = \ siggen.cpp siggencmdline.cpp siggenmain.cpp \ siggenstrings.cpp stdsiggen.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +siggen_HEADERS = \ + siggen.h siggencmdline.h siggenstrings.h stdsiggen.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit CLEANFILES = ../../bin/siggen all: $(sbin_PROGRAMS) diff --git a/src/siggen/Makefile.in b/src/siggen/Makefile.in index f103d23..dac8497 100644 --- a/src/siggen/Makefile.in +++ b/src/siggen/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(siggen_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,43 +87,117 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ sbin_PROGRAMS = siggen$(EXEEXT) subdir = src/siggen -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(siggen_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(siggendir)" PROGRAMS = $(sbin_PROGRAMS) am_siggen_OBJECTS = siggen.$(OBJEXT) siggencmdline.$(OBJEXT) \ siggenmain.$(OBJEXT) siggenstrings.$(OBJEXT) \ stdsiggen.$(OBJEXT) siggen_OBJECTS = $(am_siggen_OBJECTS) siggen_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(siggen_SOURCES) DIST_SOURCES = $(siggen_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(siggen_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -88,7 +213,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -96,6 +221,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -107,6 +233,7 @@ LN = @LN@ LN_S = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -123,21 +250,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -167,19 +297,27 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. +siggendir = . siggen_SOURCES = \ siggen.cpp siggencmdline.cpp siggenmain.cpp \ siggenstrings.cpp stdsiggen.cpp +siggen_HEADERS = \ + siggen.h siggencmdline.h siggenstrings.h stdsiggen.h + CLEANFILES = ../../bin/siggen all: all-am @@ -189,15 +327,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/siggen/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/siggen/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/siggen/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/siggen/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -214,32 +351,53 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) -siggen$(EXEEXT): $(siggen_OBJECTS) $(siggen_DEPENDENCIES) + +siggen$(EXEEXT): $(siggen_OBJECTS) $(siggen_DEPENDENCIES) $(EXTRA_siggen_DEPENDENCIES) @rm -f siggen$(EXEEXT) - $(CXXLINK) $(siggen_LDFLAGS) $(siggen_OBJECTS) $(siggen_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(siggen_OBJECTS) $(siggen_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -248,93 +406,120 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-siggenHEADERS: $(siggen_HEADERS) + @$(NORMAL_INSTALL) + @list='$(siggen_HEADERS)'; test -n "$(siggendir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(siggendir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(siggendir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(siggendir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(siggendir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-siggenHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(siggen_HEADERS)'; test -n "$(siggendir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(siggendir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(siggendir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -346,17 +531,23 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -376,18 +567,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-siggenHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -406,22 +617,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS +uninstall-am: uninstall-sbinPROGRAMS uninstall-siggenHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-siggenHEADERS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-sbinPROGRAMS + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-sbinPROGRAMS uninstall-siggenHEADERS + +.PRECIOUS: Makefile all: $(sbin_PROGRAMS) @test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/siggen/Script2.aps b/src/siggen/Script2.aps deleted file mode 100644 index 2479766..0000000 Binary files a/src/siggen/Script2.aps and /dev/null differ diff --git a/src/siggen/resource.h b/src/siggen/resource.h deleted file mode 100644 index 5510e67..0000000 --- a/src/siggen/resource.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// The developer of the original code and/or files is Tripwire, Inc. -// Portions created by Tripwire, Inc. are copyright (C) 2000 Tripwire, -// Inc. Tripwire is a registered trademark of Tripwire, Inc. All rights -// reserved. -// -// This program is free software. The contents of this file are subject -// to the terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2 of the License, or (at your -// option) any later version. You may redistribute it and/or modify it -// only in compliance with the GNU General Public License. -// -// This program is distributed in the hope that it will be useful. -// However, this program is distributed AS-IS WITHOUT ANY -// WARRANTY; INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS -// FOR A PARTICULAR PURPOSE. Please see the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. -// -// Nothing in the GNU General Public License or any other license to use -// the code or files shall permit you to use Tripwire's trademarks, -// service marks, or other intellectual property without Tripwire's -// prior written consent. -// -// If you have any questions, please contact Tripwire, Inc. at either -// info@tripwire.org or www.tripwire.org. -// -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Script2.rc -// - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif - diff --git a/src/siggen/siggencmdline.cpp b/src/siggen/siggencmdline.cpp index 27767b1..347f87c 100644 --- a/src/siggen/siggencmdline.cpp +++ b/src/siggen/siggencmdline.cpp @@ -50,8 +50,10 @@ #if IS_UNIX #include #include -#include -#include +#if SUPPORTS_TERMIOS +# include +# include +#endif //#include int _getch(void); #endif diff --git a/src/siggen/siggenstrings.cpp b/src/siggen/siggenstrings.cpp index 621ad4a..fb8a8c2 100644 --- a/src/siggen/siggenstrings.cpp +++ b/src/siggen/siggenstrings.cpp @@ -42,6 +42,12 @@ #include "stdsiggen.h" #include "siggenstrings.h" +#if IS_AROS +# define VERSION_PREFIX "$VER: " +#else +# define VERSION_PREFIX "@(#)" +#endif + //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // String Table //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -62,10 +68,11 @@ TSS_BeginStringtable( cSiggen ) _T("\n") ), TSS_StringEntry( siggen::STR_SIGGEN_VERSION, _T("siggen: Display signature function values. \n")), + TSS_StringEntry( siggen::STR_EMBEDDED_VERSION, _T(VERSION_PREFIX "siggen " PACKAGE_VERSION)), TSS_StringEntry( siggen::STR_ERR_OPEN_FAILED, _T("File could not be opened") ), TSS_StringEntry( siggen::STR_ERR_NO_FILE, _T("File does not exist") ), TSS_StringEntry( siggen::STR_SIGGEN_NOT_REG_FILE, _T(" is not a regular file; ignoring.") ) - + TSS_EndStringtable( cSiggen ) // eof: siggenstrings.cpp diff --git a/src/siggen/siggenstrings.h b/src/siggen/siggenstrings.h index cac8b73..e026f10 100644 --- a/src/siggen/siggenstrings.h +++ b/src/siggen/siggenstrings.h @@ -45,7 +45,8 @@ TSS_BeginStringIds( siggen ) STR_SIGGEN_USAGE, - STR_SIGGEN_VERSION, + STR_SIGGEN_VERSION, + STR_EMBEDDED_VERSION, STR_SIGGEN_NOT_REG_FILE, STR_ERR_NO_FILE, STR_ERR_OPEN_FAILED diff --git a/src/tripwire/Makefile.am b/src/tripwire/Makefile.am index fa7f790..4abba88 100644 --- a/src/tripwire/Makefile.am +++ b/src/tripwire/Makefile.am @@ -1,19 +1,25 @@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. LIBS = -ltripwire -lcryptlib @LIBS@ LDFLAGS = @LDFLAGS@ -L../../lib LN_S = @LN@ sbin_PROGRAMS = tripwire +tripwiredir=. tripwire_SOURCES = \ generatedb.cpp integritycheck.cpp mailmessage.cpp pipedmailmessage.cpp \ policyupdate.cpp smtpmailmessage.cpp stdtripwire.cpp syslog_trip.cpp \ tripwire.cpp tripwireerrors.cpp tripwiremain.cpp tripwirestrings.cpp \ tripwireutil.cpp twcmdline.cpp twcmdlineutil.cpp updatedb.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +tripwire_HEADERS = \ + generatedb.h integritycheck.h mailmessage.h policyupdate.h resource.h \ + stdtripwire.h syslog_trip.h tripwire.h tripwireerrors.h tripwiremsg.h \ + tripwirestrings.h tripwireutil.h twcmdline.h twcmdlineutil.h updatedb.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit CLEANFILES = ../../bin/tripwire ../../lib/libtripwire.a all: $(sbin_PROGRAMS) diff --git a/src/tripwire/Makefile.in b/src/tripwire/Makefile.in index 8884b58..8ec0412 100644 --- a/src/tripwire/Makefile.in +++ b/src/tripwire/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(tripwire_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,23 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ sbin_PROGRAMS = tripwire$(EXEEXT) subdir = src/tripwire -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(tripwire_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(tripwiredir)" PROGRAMS = $(sbin_PROGRAMS) am_tripwire_OBJECTS = generatedb.$(OBJEXT) integritycheck.$(OBJEXT) \ mailmessage.$(OBJEXT) pipedmailmessage.$(OBJEXT) \ @@ -60,23 +114,94 @@ am_tripwire_OBJECTS = generatedb.$(OBJEXT) integritycheck.$(OBJEXT) \ twcmdline.$(OBJEXT) twcmdlineutil.$(OBJEXT) updatedb.$(OBJEXT) tripwire_OBJECTS = $(am_tripwire_OBJECTS) tripwire_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(tripwire_SOURCES) DIST_SOURCES = $(tripwire_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(tripwire_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -92,7 +217,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -100,6 +225,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -111,6 +237,7 @@ LN = @LN@ LN_S = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -127,21 +254,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -171,21 +301,31 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. +tripwiredir = . tripwire_SOURCES = \ generatedb.cpp integritycheck.cpp mailmessage.cpp pipedmailmessage.cpp \ policyupdate.cpp smtpmailmessage.cpp stdtripwire.cpp syslog_trip.cpp \ tripwire.cpp tripwireerrors.cpp tripwiremain.cpp tripwirestrings.cpp \ tripwireutil.cpp twcmdline.cpp twcmdlineutil.cpp updatedb.cpp +tripwire_HEADERS = \ + generatedb.h integritycheck.h mailmessage.h policyupdate.h resource.h \ + stdtripwire.h syslog_trip.h tripwire.h tripwireerrors.h tripwiremsg.h \ + tripwirestrings.h tripwireutil.h twcmdline.h twcmdlineutil.h updatedb.h + CLEANFILES = ../../bin/tripwire ../../lib/libtripwire.a all: all-am @@ -195,15 +335,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tripwire/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/tripwire/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tripwire/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/tripwire/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -220,32 +359,53 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) -tripwire$(EXEEXT): $(tripwire_OBJECTS) $(tripwire_DEPENDENCIES) + +tripwire$(EXEEXT): $(tripwire_OBJECTS) $(tripwire_DEPENDENCIES) $(EXTRA_tripwire_DEPENDENCIES) @rm -f tripwire$(EXEEXT) - $(CXXLINK) $(tripwire_LDFLAGS) $(tripwire_OBJECTS) $(tripwire_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(tripwire_OBJECTS) $(tripwire_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -254,93 +414,120 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-tripwireHEADERS: $(tripwire_HEADERS) + @$(NORMAL_INSTALL) + @list='$(tripwire_HEADERS)'; test -n "$(tripwiredir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(tripwiredir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(tripwiredir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(tripwiredir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(tripwiredir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-tripwireHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(tripwire_HEADERS)'; test -n "$(tripwiredir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(tripwiredir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(tripwiredir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -352,17 +539,23 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -382,18 +575,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-tripwireHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -412,22 +625,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS +uninstall-am: uninstall-sbinPROGRAMS uninstall-tripwireHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip install-tripwireHEADERS installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-sbinPROGRAMS + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-sbinPROGRAMS uninstall-tripwireHEADERS + +.PRECIOUS: Makefile all: $(sbin_PROGRAMS) @test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/tripwire/generatedb.cpp b/src/tripwire/generatedb.cpp index dbb4ba4..244a051 100644 --- a/src/tripwire/generatedb.cpp +++ b/src/tripwire/generatedb.cpp @@ -147,6 +147,11 @@ void cGenerateDb::Execute( const cFCOSpecList& specList, cHierDatabase& db, iFCO dbIter.SetIterFlags( iFCODataSourceIter::DO_NOT_MODIFY_OBJECTS ); pDSIter->SetIterFlags( iFCODataSourceIter::DO_NOT_MODIFY_OBJECTS ); } + + if (flags & FLAG_DIRECT_IO) + { + pPC->SetCalcFlags( pPC->GetCalcFlags() | iFCOPropCalc::DIRECT_IO); + } // // iterate over all of the specs... diff --git a/src/tripwire/generatedb.h b/src/tripwire/generatedb.h index c894b4b..22fe8fb 100644 --- a/src/tripwire/generatedb.h +++ b/src/tripwire/generatedb.h @@ -54,10 +54,12 @@ public: enum Flags { - FLAG_ERASE_FOOTPRINTS_GD = 0x00000001 + FLAG_ERASE_FOOTPRINTS_GD = 0x00000001, // when this flag is set, cGenerateDb will attempt to leave no footprints when // creating the database for instance, cGenerateDb will tell the property calculator // to reset access times. + FLAG_DIRECT_IO = 0x00000002 + // Use direct i/o when scanning files }; }; diff --git a/src/tripwire/integritycheck.cpp b/src/tripwire/integritycheck.cpp index 39009a9..4d6a603 100644 --- a/src/tripwire/integritycheck.cpp +++ b/src/tripwire/integritycheck.cpp @@ -483,6 +483,11 @@ void cIntegrityCheck::Execute( uint32 flags ) pDSIter->SetIterFlags ( iFCODataSourceIter::DO_NOT_MODIFY_OBJECTS ); } + if (flags & FLAG_DIRECT_IO) + { + mpPropCalc->SetCalcFlags(mpPropCalc->GetCalcFlags() | iFCOPropCalc::DIRECT_IO); + } + // // iterate over all of the specs... // @@ -575,6 +580,11 @@ void cIntegrityCheck::ExecuteOnObjectList( const std::list& fcoNames, dbIter.SetIterFlags ( iFCODataSourceIter::DO_NOT_MODIFY_OBJECTS ); pDSIter->SetIterFlags ( iFCODataSourceIter::DO_NOT_MODIFY_OBJECTS ); } + + if (flags & FLAG_DIRECT_IO) + { + mpPropCalc->SetCalcFlags(mpPropCalc->GetCalcFlags() | iFCOPropCalc::DIRECT_IO); + } // // iterate over all the objects to integrity check.. diff --git a/src/tripwire/integritycheck.h b/src/tripwire/integritycheck.h index da5dae4..f5a61ca 100644 --- a/src/tripwire/integritycheck.h +++ b/src/tripwire/integritycheck.h @@ -110,9 +110,11 @@ public: // previous enumeration. This flag indicates that any valid properties in the new FCO during // an integrity check that are not valid in the database FCO should be copied to the db's fco. // Yuck! - FLAG_ERASE_FOOTPRINTS_IC = 0x00000010 + FLAG_ERASE_FOOTPRINTS_IC = 0x00000010, // when this flag is set, IC will attempt to leave no footprints when doing an integrity check. // for instance, IC will tell the property calculator to reset access times. + FLAG_DIRECT_IO = 0x00000020 + // Use direct i/o when scanning files }; private: diff --git a/src/tripwire/mailmessage.h b/src/tripwire/mailmessage.h index 866d389..498df66 100644 --- a/src/tripwire/mailmessage.h +++ b/src/tripwire/mailmessage.h @@ -37,9 +37,11 @@ #endif -#if IS_UNIX -#include -#define SOCKET int +#if IS_UNIX +# if HAVE_SYS_SOCKET_H +# include +# endif +# define SOCKET int #endif @@ -58,11 +60,7 @@ TSS_EXCEPTION( eMailSMTPSocket, eMailMessageError ); TSS_EXCEPTION( eMailSMTPOpenConnection, eMailMessageError ); TSS_EXCEPTION( eMailSMTPCloseConnection, eMailMessageError ); TSS_EXCEPTION( eMailSMTPServer, eMailMessageError ); - -// MAPI -TSS_EXCEPTION( eMailMAPINotAvailable, eMailMessageError ); -TSS_EXCEPTION( eMailMAPIUnload, eMailMessageError ); -TSS_EXCEPTION( eMailMAPISend, eMailMessageError ); +TSS_EXCEPTION( eMailSMTPNotSupported, eMailMessageError); // piped TSS_EXCEPTION( eMailPipedOpen, eMailMessageError ); @@ -98,7 +96,6 @@ public: INVALID_METHOD, MAIL_BY_SMTP, MAIL_BY_PIPE, - MAIL_BY_MAPI, MAIL_NUM_ITEMS }; @@ -232,60 +229,6 @@ private: // socket related member variables SOCKET mSocket; - -#if USES_WINSOCK - // - // Types for the functions in winsock.dll - // - // These function prototypes and the pointers that use them allow us to use - // winsock without requiring the DLL to be on the end system for the application - // to run. It seems unacceptable for tripwire to fail to run at all if wsock32.dll - // is not present on the system. - // - HINSTANCE mHlibWinsock; - typedef int (PASCAL * WSASTARTUPPROC) (WORD wVersionRequired, LPWSADATA lpWSAData); - typedef SOCKET (PASCAL * SOCKETPROC) (int af, int type, int protocol); - typedef unsigned long (PASCAL * INETADDRPROC) (const char FAR * cp); - typedef int (PASCAL FAR * GETHOSTNAMEPROC) (char FAR * name, int namelen); - typedef struct hostent FAR * (PASCAL * GETHOSTBYNAMEPROC)(const char FAR * name); - typedef int (PASCAL * CONNECTPROC) (SOCKET s, const struct sockaddr FAR *name, int namelen); - typedef int (PASCAL * CLOSESOCKETPROC) (SOCKET s); - typedef int (PASCAL * SENDPROC) (SOCKET s, const char FAR * buf, int len, int flags); - typedef int (PASCAL * RECVPROC) (SOCKET s, char FAR * buf, int len, int flags); - typedef int (PASCAL * SELECTPROC) (int nfds, fd_set FAR * readfds, fd_set FAR * writefds, fd_set FAR * exceptfds, const struct timeval FAR * timeout); - typedef u_long (PASCAL * LONGPROC) (u_long netlong); - typedef u_short (PASCAL * SHORTPROC) (u_short netlong); - - // pointers to the functions in wsock32.dll - - // Berkeley functions - SOCKETPROC mPfnSocket; - INETADDRPROC mPfnInetAddr; - GETHOSTNAMEPROC mPfnGethostname; - GETHOSTBYNAMEPROC mPfnGethostbyname; - CONNECTPROC mPfnConnect; - CLOSESOCKETPROC mPfnCloseSocket; - SENDPROC mPfnSend; - RECVPROC mPfnRecv; - SELECTPROC mPfnSelect; - - // winsock functions - FARPROC mPfnWSAGetLastError; - WSASTARTUPPROC mPfnWSAStartup; - FARPROC mPfnWSACleanup; - - // Endian convertion functions - LONGPROC mPfnNtohl; - LONGPROC mPfnHtonl; - SHORTPROC mPfnNtohs; - SHORTPROC mPfnHtons; - - // Methods to set the pointers to functions. - bool LoadDll(); - bool UnloadDll(); - -#endif - void SendString( const std::string& str ); // methods common to windows and unix: @@ -307,37 +250,6 @@ private: }; -#if SUPPORTS_MAPI - - -/////////////////////////////////////////////////////////////////////////////// -// -// This class implements sending a message via MAPI under Win32 -// -class cMAPIMailMessage : public cMailMessage -{ -public: - - cMAPIMailMessage(); - virtual ~cMAPIMailMessage(); - - virtual bool Send(); //throw(eMailMessageError) - //returns true upon success - -private: - - bool InitMAPI(); - bool FinitMAPI(); - - HINSTANCE hlibMAPI; - - bool DoSendMessage(); - void PrintMAPIErrorMessage(ULONG errorMessage); -}; - -#endif - - //#ifdef IS_UNIX /////////////////////////////////////////////////////////////////////////////// diff --git a/src/tripwire/policyupdate.cpp b/src/tripwire/policyupdate.cpp index 8d5dab2..e559e7f 100644 --- a/src/tripwire/policyupdate.cpp +++ b/src/tripwire/policyupdate.cpp @@ -177,6 +177,11 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) { icFlags |= cIntegrityCheck::FLAG_ERASE_FOOTPRINTS_IC; } + + if (flags & FLAG_DIRECT_IO) + { + icFlags |= cIntegrityCheck::FLAG_DIRECT_IO; + } ic.Execute( icFlags ); //TODO-- the second flag I just added probably makes the flag to cUpdateDb::Execute() unnecessary; @@ -208,7 +213,7 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) { // this is an error that should be reported to the user. ePolicyUpdateAddedFCO e( pTrans->ToStringDisplay( pIter->FCO()->GetName() ) ); - if( (flags & ANAL) == 0 ) + if( (flags & FLAG_SECURE_MODE) == 0 ) e.SetFlags( eError::NON_FATAL ); else e.SetFlags( eError::SUPRESS_THIRD_MSG ); @@ -229,7 +234,7 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) // this is an error that should be reported to the user. ePolicyUpdateRemovedFCO e( pTrans->ToStringDisplay( pRmIter->FCO()->GetName() ) ); - if( (flags & ANAL) == 0 ) + if( (flags & FLAG_SECURE_MODE) == 0 ) e.SetFlags( eError::NON_FATAL ); else e.SetFlags( eError::SUPRESS_THIRD_MSG ); @@ -262,7 +267,7 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) // add this to the error bucket ePolicyUpdateChangedFCO e( badPropStr ); - if( (flags & ANAL) == 0 ) + if( (flags & FLAG_SECURE_MODE) == 0 ) e.SetFlags( eError::NON_FATAL ); else e.SetFlags( eError::SUPRESS_THIRD_MSG ); @@ -272,7 +277,7 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) } // // now, we will update the database with everything in the report... - // TODO -- don't do this if the anal flag was passed in + // TODO -- don't do this if the secure mode flag was passed in // TW_NOTIFY_NORMAL( TSS_GetString( cTripwire, tripwire::STR_PU_UPDATE_DB ).c_str() ); // @@ -283,7 +288,7 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) { updateDBFlags |= cUpdateDb::FLAG_ERASE_FOOTPRINTS_UD; } - + update.Execute( updateDBFlags ); // the last thing that we have to do is to remove everything that is still @@ -303,6 +308,7 @@ bool cPolicyUpdate::Execute( uint32 flags ) // throw (eError) { i.SetIterFlags( iFCODataSourceIter::DO_NOT_MODIFY_OBJECTS ); } + const cFCOSpecListCanonicalIter newPolIter( mNewPolicy ); util_PruneExtraObjects( i, newPolIter ); diff --git a/src/tripwire/policyupdate.h b/src/tripwire/policyupdate.h index 4611b3d..210cf8a 100644 --- a/src/tripwire/policyupdate.h +++ b/src/tripwire/policyupdate.h @@ -64,15 +64,18 @@ public: bool Execute( uint32 flags = 0 ) ; // throw (eError) // if false is returned, then there was at least one conflict that came up during the policy - // update, and if tripwire was run in anal mode then the policy update should fail. + // update, and if tripwire was run in secure mode then the policy update should fail. enum Flags { - ANAL = 0x00000001, // if this is set, then we are in anal mode. This affects whether error + FLAG_SECURE_MODE = 0x00000001, // if this is set, then we're in pedantic mode. This affects whether error // messages appear as "Error" or "Warning" - FLAG_ERASE_FOOTPRINTS_PU= 0x00000002 + FLAG_ERASE_FOOTPRINTS_PU= 0x00000002, // when this flag is set, cPolicyUpdate will attempt undo any inadvertant modifications // it may make when executing. + + FLAG_DIRECT_IO = 0x00000004 + // Use direct i/o when scanning files }; private: diff --git a/src/tripwire/smtpmailmessage.cpp b/src/tripwire/smtpmailmessage.cpp index ea01129..4a9ee5e 100644 --- a/src/tripwire/smtpmailmessage.cpp +++ b/src/tripwire/smtpmailmessage.cpp @@ -46,15 +46,20 @@ //All the spleck that it takes to run sockets in Unix... #include -#include +#if HAVE_SYS_SOCKET_H +# include +# include +# include +# include +#endif #include #include -#include -#include -#include -#include -#ifdef _SORTIX_SOURCE +#if HAVE_SYS_UTSNAME_H +# include +#endif + +#if HAVE_SYS_SELECT_H # include #endif @@ -70,7 +75,7 @@ #define INVALID_SOCKET -1 -#ifdef __AROS__ +#if IS_AROS #ifndef HAVE_GETHOSTNAME #define HAVE_GETHOSTNAME 1 #endif @@ -80,7 +85,8 @@ static int gethostname( char* name, int namelen ) { name[0] = '\0'; - + +#if HAVE_SYS_UTSNAME_H struct utsname myname; uname( & myname ); @@ -95,6 +101,10 @@ static int gethostname( char* name, int namelen ) return -1; // equivalent of SOCKET_ERROR } +#else + strncpy(name, "localhost", namelen); +#endif + } #endif // Unix does not require us to go though any silly DLL hoops, so we'll @@ -130,29 +140,6 @@ cSMTPMailMessage::cSMTPMailMessage(TSTRING strServerName, unsigned short portNum mstrServerName = strServerName; mPortNumber = portNumber; mSocket = INVALID_SOCKET; - -#if USES_WINSOCK - mHlibWinsock = NULL; - - mPfnSocket = NULL; - mPfnInetAddr = NULL; - mPfnGethostname = NULL; - mPfnGethostbyname = NULL; - mPfnConnect = NULL; - mPfnCloseSocket = NULL; - mPfnSend = NULL; - mPfnRecv = NULL; - mPfnSelect = NULL; - - mPfnWSAStartup = NULL; - mPfnWSACleanup = NULL; - mPfnWSAGetLastError = NULL; - - mPfnNtohl = NULL; - mPfnHtonl = NULL; - mPfnNtohs = NULL; - mPfnHtons = NULL; -#endif // USES_WINSOCK } @@ -165,8 +152,6 @@ cSMTPMailMessage::~cSMTPMailMessage() } - - /////////////////////////////////////////////////////////////////////////////// // // Get the IP address from the the server string. It's OK to have @@ -191,12 +176,16 @@ long cSMTPMailMessage::GetServerAddress() if (bIsNumeric) { +#ifndef HAVE_SYS_SOCKET_H + return 0; +#else // convert the numberic address to a long return mPfnInetAddr(sNarrowString.c_str()); +#endif } else { -#ifdef _SORTIX_SOURCE +#if IS_SORTIX || !defined(HAVE_SYS_SOCKET_H) return INADDR_NONE; #else // do a DNS lookup of the hostname and get the long @@ -216,6 +205,9 @@ long cSMTPMailMessage::GetServerAddress() // bool cSMTPMailMessage::OpenConnection() { +#ifndef HAVE_SYS_SOCKET_H + return false; +#else // Initialize the socket structure sockaddr_in sockAddrIn; memset(&sockAddrIn, 0, sizeof(sockaddr)); @@ -262,6 +254,7 @@ bool cSMTPMailMessage::OpenConnection() } return true; +#endif } @@ -485,6 +478,9 @@ bool cSMTPMailMessage::MailMessage() // bool cSMTPMailMessage::GetAcknowledgement() { +#ifndef HAVE_SYS_SOCKET_H + return false; +#else cDebug d( "cSMTPMailMessage::GetAcknowledgement" ); const int bufsize = 512; @@ -547,17 +543,19 @@ bool cSMTPMailMessage::GetAcknowledgement() throw eMailSMTPServer(estr.str()); return false; } +#endif } void cSMTPMailMessage::SendString( const std::string& str ) { cDebug d("util_SendString()"); - +#if HAVE_SYS_SOCKET_H if( str.length() < 800 ) d.TraceDebug( "Sending \"%s\"\n", str.c_str() ); else d.TraceDebug( "Sending (truncated in this debug output)\"%s\"\n", std::string( str.c_str(), 800 ).c_str() ); mPfnSend( mSocket, str.c_str(), str.length(), 0 ); +#endif } @@ -570,88 +568,6 @@ void cSMTPMailMessage::DecodeError() { #if defined(_DEBUG) -#if USES_WINSOCK - // - // decode an error condition encountered by Windows sockets. - // TODO - write something less technical to explain what when wrong. Windows - // message names are not good error strings for a shipping product. - // - int error = mPfnWSAGetLastError(); - fprintf(stderr, "Encountered winsock error message %d", error); - struct ErrorStruct - { - const char *msg; - int error; - } - static const errors[52] = - { - { "WSAEINTR", (WSABASEERR+4) }, - { "WSAEBADF", (WSABASEERR+9) }, - { "WSAEACCES", (WSABASEERR+13) }, - { "WSAEFAULT", (WSABASEERR+14) }, - { "WSAEINVAL", (WSABASEERR+22) }, - { "WSAEMFILE", (WSABASEERR+24) }, - { "WSAEWOULDBLOCK", (WSABASEERR+35) }, - { "WSAEINPROGRESS", (WSABASEERR+36) }, - { "WSAEALREADY", (WSABASEERR+37) }, - { "WSAENOTSOCK", (WSABASEERR+38) }, - { "WSAEDESTADDRREQ", (WSABASEERR+39) }, - { "WSAEMSGSIZE", (WSABASEERR+40) }, - { "WSAEPROTOTYPE", (WSABASEERR+41) }, - { "WSAENOPROTOOPT", (WSABASEERR+42) }, - { "WSAEPROTONOSUPPORT", (WSABASEERR+43) }, - { "WSAESOCKTNOSUPPORT", (WSABASEERR+44) }, - { "WSAEOPNOTSUPP", (WSABASEERR+45) }, - { "WSAEPFNOSUPPORT", (WSABASEERR+46) }, - { "WSAEAFNOSUPPORT", (WSABASEERR+47) }, - { "WSAEADDRINUSE", (WSABASEERR+48) }, - { "WSAEADDRNOTAVAIL", (WSABASEERR+49) }, - { "WSAENETDOWN", (WSABASEERR+50) }, - { "WSAENETUNREACH", (WSABASEERR+51) }, - { "WSAENETRESET", (WSABASEERR+52) }, - { "WSAECONNABORTED", (WSABASEERR+53) }, - { "WSAECONNRESET", (WSABASEERR+54) }, - { "WSAENOBUFS", (WSABASEERR+55) }, - { "WSAEISCONN", (WSABASEERR+56) }, - { "WSAENOTCONN", (WSABASEERR+57) }, - { "WSAESHUTDOWN", (WSABASEERR+58) }, - { "WSAETOOMANYREFS", (WSABASEERR+59) }, - { "WSAETIMEDOUT", (WSABASEERR+60) }, - { "WSAECONNREFUSED", (WSABASEERR+61) }, - { "WSAELOOP", (WSABASEERR+62) }, - { "WSAENAMETOOLONG", (WSABASEERR+63) }, - { "WSAEHOSTDOWN", (WSABASEERR+64) }, - { "WSAEHOSTUNREACH", (WSABASEERR+65) }, - { "WSAENOTEMPTY", (WSABASEERR+66) }, - { "WSAEPROCLIM", (WSABASEERR+67) }, - { "WSAEUSERS", (WSABASEERR+68) }, - { "WSAEDQUOT", (WSABASEERR+69) }, - { "WSAESTALE", (WSABASEERR+70) }, - { "WSAEREMOTE", (WSABASEERR+71) }, - { "WSAEDISCON", (WSABASEERR+101) }, - { "WSASYSNOTREADY", (WSABASEERR+91) }, - { "WSAVERNOTSUPPORTED", (WSABASEERR+92) }, - { "WSANOTINITIALISED", (WSABASEERR+93) }, - { "WSAHOST_NOT_FOUND", (WSABASEERR+1001) }, - { "WSATRY_AGAIN", (WSABASEERR+1002) }, - { "WSANO_RECOVERY", (WSABASEERR+1003) }, - { "WSANO_DATA", (WSABASEERR+1004) }, - { NULL, 0 } - }; - - int i = 0; - while (errors[i].msg) - { - if (errors[i].error == error) - { - fprintf(stderr, ": %s", errors[i].msg); - break; - } - i++; - } - fprintf(stderr, "\n"); -#endif // USES_WINSOCK - #if IS_UNIX // diff --git a/src/tripwire/syslog_trip.cpp b/src/tripwire/syslog_trip.cpp index 1beec9e..66da277 100644 --- a/src/tripwire/syslog_trip.cpp +++ b/src/tripwire/syslog_trip.cpp @@ -44,17 +44,12 @@ #include #endif -#if SUPPORTS_EVENTLOG -#include "tripwiremsg.h" -#include "tw/systeminfo.h" -#endif - // next three includes are for error reporting #include "tw/twutil.h" #include "tw/twerrors.h" #include "tw/twstrings.h" -#ifdef __AROS__ +#if IS_AROS #include #define openlog(a,b,c) #define closelog() @@ -63,194 +58,19 @@ /////////////////////////////////////////////////////////////////////////////// // Syslog /////////////////////////////////////////////////////////////////////////////// - -#if SUPPORTS_EVENTLOG -static void InitEventLog(); -#endif - void cSyslog::Log(const TCHAR* programName, cSyslog::LogType logType, const TCHAR* message) { -#if HAVE_SYSLOG_H - +// SkyOS has syslog.h but doesn't actually implement the calls. +#if SUPPORTS_SYSLOG + (void)logType; // logType is not used for Unix syslog -#ifdef _UNICODE - std::basic_string identString; - std::basic_string msgString; - int count; - - count = sizeof(char) * MB_CUR_MAX * _tcslen(programName); // note we use sizeof(char) * 2 because mb chars can be two bytes long - identString.resize(count); - count = wcstombs((char*)identString.data(), programName, count); - identString.resize(count); // count will be set to number of bytes written - - count = sizeof(char) * MB_CUR_MAX * _tcslen(message); - msgString.resize(count); - count = wcstombs((char*)msgString.data(), message, count); - msgString.resize(count); - - const char* ident = programName.data(); - const char* msg = message.data(); -#else ASSERT(sizeof(TCHAR) == sizeof(char)); const char* ident = programName; const char* msg = message; -#endif - -#ifndef SKYOS // Handle an oddball OS that has syslog.h but doesn't implement the calls. + openlog(ident, LOG_PID, LOG_USER); syslog(LOG_NOTICE, "%s", msg); closelog(); #endif - -#elif SUPPORTS_EVENTLOG - - static bool eventLogInitialized = false; - if (!eventLogInitialized) - { - InitEventLog(); - eventLogInitialized = true; - } - - HANDLE h = RegisterEventSource(NULL, _T("Tripwire")); - if (h != NULL) - { - LPCTSTR stringArray[1]; - stringArray[0] = message; - - WORD type; - DWORD id; - - switch (logType) - { - default: - ASSERT(false); - case LOG_SUCCESS: - type = EVENTLOG_INFORMATION_TYPE; - id = MSG_TRIPWIRE_GENERIC_SUCCESS; - break; - case LOG_INFORMATION: - type = EVENTLOG_INFORMATION_TYPE; - id = MSG_TRIPWIRE_GENERIC_INFO; - break; - case LOG_WARNING: - type = EVENTLOG_WARNING_TYPE; - id = MSG_TRIPWIRE_GENERIC_WARNING; - break; - case LOG_ERROR: - type = EVENTLOG_ERROR_TYPE; - id = MSG_TRIPWIRE_GENERIC_ERROR; - break; - } - - BOOL ret = ReportEvent( - h, - type, // event type - 0, // catagory - id, // event id - 0, // user sid - 1, // num strings - 0, // raw binary data size - stringArray, // array of strings - 0 // raw binrary data - ); - - if (!ret) - { - eTWSyslog e( TSS_GetString(cTW, tw::STR_REPORTEVENT_FAILED).c_str(), eError::NON_FATAL ); - cTWUtil::PrintErrorMsg(e); - } - - DeregisterEventSource(h); - } - -#else - // No support for syslog like functionality - //ASSERT(false); -#endif } - - -#if SUPPORTS_EVENTLOG -static void InitEventLog() -{ - // To initialize the event log, we need to verify that Tripwire - // is a valid event source. - // To do this we look up the value for the Tripwire event source. If it - // exists, the the dest is a file called "tripwire.exe" (or this executable) and the - // file exists, then we assume that the event source is set correctly. - - HKEY hKey; - DWORD disposition; - - if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\Tripwire"), 0, _T(""), REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &disposition) == ERROR_SUCCESS && - disposition == REG_OPENED_EXISTING_KEY) - { - DWORD type, count; - - // We need to insure we have back slashes in our exepath - TSTRING exepath = cSystemInfo::GetExePath(); - TSTRING::iterator i; - for (i = exepath.begin(); i != exepath.end(); ++i) - if (*i == _T('/')) - *i = _T('\\'); - - if (RegQueryValueEx(hKey, _T("TypesSupported"), 0, &type, 0, &count) == ERROR_SUCCESS && - type == REG_DWORD && - RegQueryValueEx(hKey, _T("EventMessageFile"), 0, &type, 0, &count) == ERROR_SUCCESS && - type == REG_EXPAND_SZ) - { - TSTRING data; - data.resize(count); - if (RegQueryValueEx(hKey, _T("EventMessageFile"), 0, &type, (LPBYTE)data.data(), &count) == ERROR_SUCCESS && - type == REG_EXPAND_SZ) - { - TSTRING::size_type lastDelimitor; - lastDelimitor = data.find_last_of(_T('\\')); - if (lastDelimitor == TSTRING::npos) - lastDelimitor = (TSTRING::size_type)-1; - - if (_tcscmp(exepath.c_str(), data.c_str()) == 0) - { - RegCloseKey(hKey); - return; - } - - if (_tcsicmp(_T("tripwire.exe"), data.substr(lastDelimitor + 1).c_str()) == 0) - { - HINSTANCE hInst = LoadLibraryEx(data.c_str(), NULL, DONT_RESOLVE_DLL_REFERENCES|LOAD_LIBRARY_AS_DATAFILE); - if (hInst != NULL) - { - FreeLibrary(hInst); - RegCloseKey(hKey); - return; - } - } - } - } - - // If we got here then the event source is not set up correctly - - // Add the name to the EventMessageFile subkey. - RegSetValueEx(hKey, // subkey handle - _T("EventMessageFile"), // value name - 0, // must be zero - REG_EXPAND_SZ, // value type - (LPBYTE) exepath.c_str(), // pointer to value data - sizeof(TCHAR)*(exepath.length() + 1)); // length of value data - - // Set the supported event types in the TypesSupported subkey. - DWORD dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE; - - RegSetValueEx(hKey, // subkey handle - _T("TypesSupported"), // value name - 0, // must be zero - REG_DWORD, // value type - (LPBYTE) &dwData, // pointer to value data - sizeof(DWORD)); // length of value data - - RegCloseKey(hKey); - } -} -#endif - diff --git a/src/tripwire/tripwireerrors.cpp b/src/tripwire/tripwireerrors.cpp index 553734e..aa56c45 100644 --- a/src/tripwire/tripwireerrors.cpp +++ b/src/tripwire/tripwireerrors.cpp @@ -59,12 +59,7 @@ TSS_REGISTER_ERROR( eMailSMTPSocket(), _T("Socket for an SMTP conne TSS_REGISTER_ERROR( eMailSMTPOpenConnection(), _T("The SMTP connection could not be established.") ); TSS_REGISTER_ERROR( eMailSMTPCloseConnection(), _T("The SMTP connection could not be properly closed.") ); TSS_REGISTER_ERROR( eMailSMTPServer(), _T("The SMTP server returned an error.") ); - -// MAPI -TSS_REGISTER_ERROR( eMailMAPINotAvailable(), _T("MAPI is not available.") ); -TSS_REGISTER_ERROR( eMailMAPIUnload(), _T("MAPI32.DLL could not be loaded.") ); -TSS_REGISTER_ERROR( eMailMAPISend(), _T("Sending message via MAPI failed.") ); - +TSS_REGISTER_ERROR( eMailSMTPNotSupported(), _T("SMTP email is not supported on this platform") ); // Piped TSS_REGISTER_ERROR( eMailPipedOpen(), _T("Problem opening mail pipe.") ); TSS_REGISTER_ERROR( eMailPipedWrite(), _T("Problem writing to mail pipe.") ); @@ -104,10 +99,7 @@ TSS_REGISTER_ERROR( eTWInvalidReportLevelCfg(), _T("Invalid reporting level TSS_REGISTER_ERROR( eTWInvalidPortNumber(), _T("Invalid SMTP port number.\nValid ports: [0-65535]\n") ); TSS_REGISTER_ERROR( eTWInvalidTempDirectory(), _T("Cannot access temp directory.") ); -// GMMS -TSS_REGISTER_ERROR( eGmmsError(), _T("GMMS error.") ); -TSS_REGISTER_ERROR( eGmmsCouldntOpenPipe(), _T("GMMS executable not found: ") ); -TSS_REGISTER_ERROR( eGmmsCouldntWritePipe(), _T("There was a problem writing to gmms: ") ); -TSS_REGISTER_ERROR( eGmmsCmdFailed(), _T("GMMS exited with non-zero status: ") ); - +TSS_REGISTER_ERROR( eTWSyslogNotSupported(), _T("Syslog reporting is not supported on this platform.") ); +TSS_REGISTER_ERROR( eTWDirectIONotSupported(), _T("Direct I/O hashing is not supported on this platform.") ); + TSS_END_ERROR_REGISTRATION() diff --git a/src/tripwire/tripwirestrings.cpp b/src/tripwire/tripwirestrings.cpp index bb86ae4..b254d18 100644 --- a/src/tripwire/tripwirestrings.cpp +++ b/src/tripwire/tripwirestrings.cpp @@ -34,23 +34,18 @@ #include "stdtripwire.h" #include "tripwirestrings.h" - -#ifdef GMMS -#define GMMS_OPTION _T(" -g --gmms\n") -#define GMMS_VERBOSITY_OPTION _T(" -b 1|2 --gmms-verbosity 1|2\n") +#if IS_AROS +# define VERSION_PREFIX "$VER: " #else -#define GMMS_OPTION -#define GMMS_VERBOSITY_OPTION +# define VERSION_PREFIX "@(#)" #endif -#if IS_UNIX -#define MAPI_OPTION -#endif TSS_BeginStringtable( cTripwire ) TSS_StringEntry( tripwire::STR_TRIPWIRE_VERSION, _T("tripwire: File integrity assessment application.\n")), - + TSS_StringEntry( tripwire::STR_EMBEDDED_VERSION, _T(VERSION_PREFIX "tripwire " PACKAGE_VERSION)), + TSS_StringEntry( tripwire::STR_TRIPWIRE_USAGE_SUMMARY, _T("Usage:\n") _T("\n") @@ -107,13 +102,6 @@ TSS_BeginStringtable( cTripwire ) _T(" -i list --ignore list\n") _T(" -M --email-report\n") _T(" -t { 0|1|2|3|4 } --email-report-level { 0|1|2|3|4 }\n") - - // Only insert the description of these two options if GMMS is defined. - // Otherwise these two lines will be blank. You cannot have #ifdef in - // the middle of this big concatenated string. - GMMS_OPTION - GMMS_VERBOSITY_OPTION - _T("[object1 [object2...]]\n") _T("\n") _T("The -v and -s options are mutually exclusive.\n") @@ -170,8 +158,6 @@ TSS_BeginStringtable( cTripwire ) _T(" -m t --test\n") _T(" -e user@domain.com --email user@domain.com\n") _T("\n") - // Only insert the MAPI option under NT. - MAPI_OPTION _T("Only one address may be entered.\n") _T("\n") ), @@ -199,31 +185,6 @@ TSS_BeginStringtable( cTripwire ) TSS_StringEntry( tripwire::STR_PU_BAD_PROPS, _T("Conflicting properties for object ") ), TSS_StringEntry( tripwire::STR_PROCESSING_GENRE, _T("*** Processing %s ***\n") ), - // gmms reporting, these strings are for the gmms command line - TSS_StringEntry( tripwire::STR_GMMS_START, _T("alert Tripwire: ")), - TSS_StringEntry( tripwire::STR_GMMS_END, _T(")")), - TSS_StringEntry( tripwire::STR_GMMS_VERBOSITY1A, _T(", Violations found (")), - TSS_StringEntry( tripwire::STR_GMMS_VERBOSITY1B, _T("), Max severity (")), - TSS_StringEntry( tripwire::STR_GMMS_VERBOSITY2A, _T(", Rule Violated (")), - TSS_StringEntry( tripwire::STR_GMMS_VERBOSITY2B, _T("), File (")), - TSS_StringEntry( tripwire::STR_GMMS_VERBOSITY2C, _T("), Severity (")), - - - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR1, _T("A recipient matched more than one of the recipient descriptor structures. No message was sent.\n(MAPI error: MAPI_E_AMBIGUOUS_RECIPIENT)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR2, _T("The specified attachment was not found. No message was sent.\n(MAPI error: MAPI_E_ATTACHMENT_NOT_FOUND)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR3, _T("The specified attachment could not be opened. No message was sent.\n(MAPI error: MAPI_E_ATTACHMENT_OPEN_FAILURE)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR4, _T("The type of a recipient was not MAPI_TO, MAPI_CC, or MAPI_BCC. No message was sent.\n(MAPI error: MAPI_E_BAD_RECIPTYPE)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR5, _T("One or more unspecified errors occurred. No message was sent.\n(MAPI error: MAPI_E_FAILURE)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR6, _T("There was insufficient memory to proceed. No message was sent.\n(MAPI error: MAPI_E_INSUFFICIENT_MEMORY)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR7, _T("One or more recipients were invalid or did not resolve to any address.\n(MAPI error: MAPI_E_INVALID_RECIPS)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR8, _T("There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. No message was sent.\n(MAPI error: MAPI_E_LOGIN_FAILURE)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR9, _T("The text in the message was too large. No message was sent.\n(MAPI error: MAPI_E_TEXT_TOO_LARGE)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR10, _T("There were too many file attachments. No message was sent.\n(MAPI error: MAPI_E_TOO_MANY_FILES)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR11, _T("There were too many recipients. No message was sent.\n(MAPI error: MAPI_E_TOO_MANY_RECIPIENTS)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR12, _T("A recipient did not appear in the address list. No message was sent.\n(MAPI error: MAPI_E_UNKNOWN_RECIPIENT)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR13, _T("The user canceled one of the dialog boxes. No message was sent.\n(MAPI error: MAPI_E_USER_ABORT)")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR14, _T("MAPI returned a unrecognized error (")), - TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR14_1, _T(").")), TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_SERVER, _T("Server: ")), TSS_StringEntry( tripwire::STR_ERR2_MAIL_MESSAGE_SERVER_RETURNED_ERROR, _T("Error Number:")), @@ -235,7 +196,6 @@ TSS_BeginStringtable( cTripwire ) TSS_StringEntry( tripwire::STR_ERR_IC_EMAIL_AND_FILES, _T("Email reporting cannot be specified when checking a list of objects.")), TSS_StringEntry( tripwire::STR_ERR_NO_MAIL_METHOD, _T("No mail method specified in configuration file.")), TSS_StringEntry( tripwire::STR_ERR_INVALID_MAIL_METHOD, _T("Invalid mail method in configuration file.")), - TSS_StringEntry( tripwire::STR_ERR_MAPI_NOT_SUPPORTED, _T("Configuration option MAILMETHOD=MAPI is not supported on this platform.")), TSS_StringEntry( tripwire::STR_ERR_MISSING_MAILPROGRAM, _T("Mail method is set to SENDMAIL but MAILPROGRAM was not defined in configuration file")), TSS_StringEntry( tripwire::STR_ERR_NO_TEST_MODE, _T("No test area specified.")), TSS_StringEntry( tripwire::STR_GENERATING_DB, _T("Generating the database...\n")), @@ -282,12 +242,6 @@ TSS_BeginStringtable( cTripwire ) TSS_StringEntry( tripwire::STR_EMAIL_SUBJECT_OK, _T("Tripwire found no violations")), TSS_StringEntry( tripwire::STR_ERR_EMAIL_REPORT, _T("Email reporting failed.")), TSS_StringEntry( tripwire::STR_ERR_EMAIL_TEST, _T("Email test failed.")), - // - // Gmms errors - // - TSS_StringEntry( tripwire::STR_ERR_BAD_GMMS_VERBOSITY, _T("Error: gmms verbosity must be 1 or 2. ")), - TSS_StringEntry( tripwire::STR_ERR_GMMS_VERBOSITY_ONLY, _T("Error: --gmms-verbosity specified without --gmms. ")), - TSS_StringEntry( tripwire::STR_NOTIFY_PROCESSING, _T("Processing: ")), TSS_StringEntry( tripwire::STR_NOTIFY_CHECKING, _T("Checking: ")), diff --git a/src/tripwire/tripwirestrings.h b/src/tripwire/tripwirestrings.h index 587df82..db805c6 100644 --- a/src/tripwire/tripwirestrings.h +++ b/src/tripwire/tripwirestrings.h @@ -40,6 +40,7 @@ TSS_BeginStringIds( tripwire ) STR_TRIPWIRE_VERSION, + STR_EMBEDDED_VERSION, STR_TRIPWIRE_HELP_INIT, STR_TRIPWIRE_HELP_CHECK, STR_TRIPWIRE_HELP_UPDATE, @@ -66,36 +67,6 @@ TSS_BeginStringIds( tripwire ) STR_PU_ADDING_GENRE, STR_PU_BAD_PROPS, STR_PROCESSING_GENRE, - - // - // GMMS specific - // - STR_GMMS_START, - STR_GMMS_END, - STR_GMMS_VERBOSITY1A, - STR_GMMS_VERBOSITY1B, - STR_GMMS_VERBOSITY2A, - STR_GMMS_VERBOSITY2B, - STR_GMMS_VERBOSITY2C, - - // - // MAPI error messages - // - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR1, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR2, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR3, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR4, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR5, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR6, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR7, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR8, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR9, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR10, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR11, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR12, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR13, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR14, - STR_ERR2_MAIL_MESSAGE_MAPI_SEND_ERRROR14_1, STR_ERR2_MAIL_MESSAGE_SERVER, STR_ERR2_MAIL_MESSAGE_SERVER_RETURNED_ERROR, @@ -107,7 +78,6 @@ TSS_BeginStringIds( tripwire ) STR_ERR_IC_EMAIL_AND_FILES, STR_ERR_NO_MAIL_METHOD, STR_ERR_INVALID_MAIL_METHOD, - STR_ERR_MAPI_NOT_SUPPORTED, STR_ERR_MISSING_MAILPROGRAM, STR_ERR_NO_TEST_MODE, STR_GENERATING_DB, @@ -154,14 +124,6 @@ TSS_BeginStringIds( tripwire ) STR_ERR_EMAIL_REPORT, STR_ERR_EMAIL_TEST, - - // - // Gmms errors - // - STR_ERR_BAD_GMMS_VERBOSITY, - STR_ERR_GMMS_VERBOSITY_ONLY, - - STR_NOTIFY_PROCESSING, STR_NOTIFY_CHECKING, STR_NOTIFY_CHECKING_RULE, diff --git a/src/tripwire/twcmdline.cpp b/src/tripwire/twcmdline.cpp index 880b93f..8a59a7f 100644 --- a/src/tripwire/twcmdline.cpp +++ b/src/tripwire/twcmdline.cpp @@ -72,6 +72,7 @@ #include "integritycheck.h" #include "updatedb.h" #include "policyupdate.h" +#include "core/platform.h" #ifdef TW_PROFILE #include "tasktimer.h" @@ -292,37 +293,40 @@ static void FillOutConfigInfo(cTWModeCommon* pModeInfo, const cConfigFile& cf) pModeInfo->mfLooseDirs = true; } - if (cf.Lookup(TSTRING(_T("TEMPDIRECTORY")), str)) { + TSTRING temp_directory; + cf.Lookup(TSTRING(_T("TEMPDIRECTORY")), temp_directory); - if (str.length() == 0) - str = "/tmp/"; + if (temp_directory.length() == 0) { +#if IS_AROS + temp_directory = "T:"; +#else + temp_directory = "/tmp/"; +#endif + } // make sure we have a trailing slash -- thanks Jarno... // - if (str[_tcslen(str.c_str())-1] != '/') { - str += '/'; + if (temp_directory[_tcslen(str.c_str())-1] != '/') { + temp_directory += '/'; } - // make sure it exists... // - -#ifdef __AROS__ - str = cArosPath::AsNative(str); +#if USES_DEVICE_PATH + temp_directory = cDevicePath::AsNative(temp_directory); #endif - if (access(str.c_str(), F_OK) != 0) { + if (access(temp_directory.c_str(), F_OK) != 0) { TSTRING errStr = TSS_GetString( cCore, core::STR_BAD_TEMPDIRECTORY ); TSTRING tmpStr = _T("Directory: "); - tmpStr += (str + _T("\n")); + tmpStr += (temp_directory + _T("\n")); tmpStr += errStr; throw eTWInvalidTempDirectory(tmpStr); } else { - iFSServices::GetInstance()->SetTempDirName(str); + iFSServices::GetInstance()->SetTempDirName(temp_directory); } - } if (cf.Lookup(TSTRING(_T("GLOBALEMAIL")), str)) { @@ -364,8 +368,6 @@ static void FillOutConfigInfo(cTWModeCommon* pModeInfo, const cConfigFile& cf) { if (_tcsicmp(str.c_str(), _T("SENDMAIL")) == 0) pModeInfo->mMailMethod = cMailMessage::MAIL_BY_PIPE; - else if (_tcsicmp(str.c_str(), _T("MAPI")) == 0) - pModeInfo->mMailMethod = cMailMessage::MAIL_BY_MAPI; // NT support only else if( _tcsicmp( str.c_str(), _T("SMTP") ) == 0 ) pModeInfo->mMailMethod = cMailMessage::MAIL_BY_SMTP; else @@ -376,6 +378,11 @@ static void FillOutConfigInfo(cTWModeCommon* pModeInfo, const cConfigFile& cf) pModeInfo->mMailMethod = cMailMessage::NO_METHOD; } +#if !SUPPORTS_NETWORKING + if (pModeInfo->mMailMethod == cMailMessage::MAIL_BY_SMTP) + throw eMailSMTPNotSupported(); +#endif + // Get the SMTP server if(cf.Lookup(TSTRING(_T("SMTPHOST")), str)) pModeInfo->mSmtpHost = str; @@ -416,10 +423,14 @@ static void FillOutConfigInfo(cTWModeCommon* pModeInfo, const cConfigFile& cf) // SYSLOG reporting if(cf.Lookup(TSTRING(_T("SYSLOGREPORTING")), str)) { +#if SUPPORTS_SYSLOG if (_tcsicmp(str.c_str(), _T("true")) == 0) pModeInfo->mbLogToSyslog = true; else pModeInfo->mbLogToSyslog = false; +#else + throw eTWSyslogNotSupported(); +#endif } else pModeInfo->mbLogToSyslog = false; @@ -433,6 +444,27 @@ static void FillOutConfigInfo(cTWModeCommon* pModeInfo, const cConfigFile& cf) pModeInfo->mbCrossFileSystems = false; } + if (cf.Lookup(TSTRING(_T("HASH_DIRECT_IO")), str)) + { +#if SUPPORTS_DIRECT_IO + if (_tcsicmp(str.c_str(), _T("true")) == 0) + { + pModeInfo->mbDirectIO = true; + cArchiveSigGen::SetUseDirectIO(true); + } +#else + throw eTWDirectIONotSupported(); +#endif + } + + if(cf.Lookup(TSTRING(_T("RESOLVE_IDS_TO_NAMES")), str)) + { + if (_tcsicmp(str.c_str(), _T("true")) == 0) + iFSServices::GetInstance()->SetResolveNames(true); + else + iFSServices::GetInstance()->SetResolveNames(false); + } + // // turn all of the file names into full paths (they're relative to the exe dir) // @@ -621,7 +653,7 @@ bool cTWModeDbInit::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // Set the cross file systems flag appropriately. cFSDataSourceIter::SetFileSystemCrossing(mpData->mbCrossFileSystems); #endif - + return true; } @@ -663,7 +695,8 @@ int cTWModeDbInit::Execute(cErrorQueue* pQueue) uint32 gdbFlags = 0; gdbFlags |= ( mpData->mbResetAccessTime ? cGenerateDb::FLAG_ERASE_FOOTPRINTS_GD : 0 ); - + gdbFlags |= ( mpData->mbDirectIO ? cGenerateDb::FLAG_DIRECT_IO : 0 ); + // loop through the genres cGenreSpecListVector::iterator genreIter; for (genreIter = genreSpecList.begin(); genreIter != genreSpecList.end(); ++genreIter) @@ -776,24 +809,14 @@ public: TSTRING mSeverityName; // gets mapped to number, then treated like mSeverityLevel TSTRING mRuleName; // only the named rule will be checked TSTRING mGenreName; // if not empty, specifies the genre to check - bool mbAnal; // are we in anal mode? (only valid with mbUpdate == true) - -#ifdef GMMS - bool mbGmms; // Send violation reports via gmms? - TSTRING mGmmsProg; // full path to gmms executable - TSTRING mGmmsOptions; // additional options for gmms command line - int mGmmsVerbosity; // level 1 or 2 verbosity? -#endif + bool mbSecureMode; // are we in extra-pedantic mode? (only valid with mbUpdate == true) //TSTRING mCmdLine; // entire command line std::vector mFilesToCheck; // ctor can set up some default values cTWModeIC_i() : cTWModeCommon(), mbUpdate(false), mbPrintToStdout(true), mbEmail(false), mbEncryptReport(false), - mSeverityLevel(-1), mbTrimBySeverity(false), mbAnal(false) -#ifdef GMMS - , mbGmms(false), mGmmsVerbosity(2) -#endif + mSeverityLevel(-1), mbTrimBySeverity(false), mbSecureMode(false) {} }; @@ -835,14 +858,6 @@ void cTWModeIC::InitCmdLineParser(cCmdLineParser& cmdLine) // multiple levels of reporting cmdLine.AddArg(cTWCmdLine::REPORTLEVEL, TSTRING(_T("t")), TSTRING(_T("email-report-level")), cCmdLineParser::PARAM_ONE); -#ifdef GMMS - // gmms command line options - cmdLine.AddArg(cTWCmdLine::USE_GMMS, TSTRING(_T("g")), TSTRING(_T("gmms")), cCmdLineParser::PARAM_NONE); - cmdLine.AddArg(cTWCmdLine::GMMS_VERBOSITY, TSTRING(_T("b")), TSTRING(_T("gmms-verbosity")), cCmdLineParser::PARAM_ONE); -#endif - - - // mutual exclusion... // you can't specify any of these 3 things together... cmdLine.AddMutEx(cTWCmdLine::SEVERITY_LEVEL, cTWCmdLine::RULE_NAME); @@ -862,33 +877,6 @@ bool cTWModeIC::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // We will use this to access the parsed cmdLine. cCmdLineIter iter(cmdLine); -#ifdef GMMS - - // Get path to gmms executable from config file - TSTRING str; - if(cf.Lookup(TSTRING(_T("GMMS")), str)) - { - // Path was specified in the configuration file - mpData->mGmmsProg = str; - } - else - { - // Path was not specified in the configuration file, try environment variable - const TCHAR *gmmsDeploy = _tgetenv(_T("GEOPLEX_DEPLOY")); - if (gmmsDeploy) - mpData->mGmmsProg = TSTRING(gmmsDeploy) + _T("/bin/gmms"); // Assign by env.var. - else - mpData->mGmmsProg = _T("/home/geoplex/bin/gmms"); // No env.var., Take a wild guess. - } - - // Get any additional command line options for running gmms from config file - if(cf.Lookup(TSTRING(_T("GMMSOPTIONS")), str)) - mpData->mGmmsOptions = str; - - bool bGmmsSpecified=false, bGmmsVerbositySpecified=false; - -#endif - // First, fill out everything with the config file info... FillOutConfigInfo(mpData, cf); @@ -896,7 +884,6 @@ bool cTWModeIC::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // this takes care of the common stuff... FillOutCmdLineInfo(mpData, cmdLine); - // now do the stuff specific to this mode.. for(iter.SeekBegin(); ! iter.Done(); iter.Next()) @@ -984,36 +971,7 @@ bool cTWModeIC::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) mpData->mFilesToCheck.push_back(iter.ParamAt(i)); } } -#ifdef GMMS - case cTWCmdLine::USE_GMMS: - mpData->mbGmms = true; - bGmmsSpecified = true; - break; - case cTWCmdLine::GMMS_VERBOSITY: - { - const TCHAR* psz = iter.ParamAt(0).c_str(); - if ( psz != 0 ) - while ( _istdigit( *psz ) ) ++psz; - /// NOTE:RAD -- Come on man! There isn't even a pStr!!! - // if ( !cStringUtil::StringIsInteger( pStr ) ) - if ( *psz != 0x00 ) - { - TCERR << TSS_GetString( cTripwire, tripwire::STR_ERR_BAD_GMMS_VERBOSITY ) << std::endl; - return false; - } - else - { - mpData->mGmmsVerbosity = _ttoi(iter.ParamAt(0).c_str()); - if (mpData->mGmmsVerbosity < 1 || mpData->mGmmsVerbosity > 2) { - TCERR << TSS_GetString( cTripwire, tripwire::STR_ERR_BAD_GMMS_VERBOSITY ) << std::endl; - return false; - } - bGmmsVerbositySpecified = true; - } - break; - } -#endif default: // should I do anything, or just ignore this? ; @@ -1042,14 +1000,6 @@ bool cTWModeIC::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) TEST_INIT_REQUIREMENT((! mpData->mReportFile.empty()), cTW, tw::STR_ERR_MISSING_REPORT); TEST_INIT_REQUIREMENT((! (mpData->mEditor.empty() && mpData->mbUpdate)),cTW, tw::STR_ERR_MISSING_EDITOR); -#ifdef GMMS - if (bGmmsSpecified==false && bGmmsVerbositySpecified==true) - { - TCERR << TSS_GetString( cTripwire, tripwire::STR_ERR_GMMS_VERBOSITY_ONLY ) << std::endl; - return false; - } -#endif - /////////////////////////////////////////// // do some email-related verifications /////////////////////////////////////////// @@ -1065,10 +1015,6 @@ bool cTWModeIC::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // error if method is SENDMAIL and no MAILPROGRAM TEST_INIT_REQUIREMENT( ( cMailMessage::MAIL_BY_PIPE != mpData->mMailMethod || !mpData->mMailProgram.empty()), cTripwire, tripwire::STR_ERR_MISSING_MAILPROGRAM ); - -#if !SUPPORTS_MAPI - TEST_INIT_REQUIREMENT( ( cMailMessage::MAIL_BY_MAPI != mpData->mMailMethod ), cTripwire, tripwire::STR_ERR_MAPI_NOT_SUPPORTED ); -#endif } // make sure that the config file and site key file are in sync... @@ -1080,7 +1026,7 @@ bool cTWModeIC::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // Set the cross file systems flag appropriately. cFSDataSourceIter::SetFileSystemCrossing(mpData->mbCrossFileSystems); #endif - + return true; } @@ -1223,7 +1169,8 @@ int cTWModeIC::Execute(cErrorQueue* pQueue) uint32 icFlags = 0; icFlags |= ( mpData->mfLooseDirs ? cIntegrityCheck::FLAG_LOOSE_DIR : 0 ); icFlags |= ( mpData->mbResetAccessTime ? cIntegrityCheck::FLAG_ERASE_FOOTPRINTS_IC : 0 ); - + icFlags |= ( mpData->mbDirectIO ? cIntegrityCheck::FLAG_DIRECT_IO : 0 ); + ic.ExecuteOnObjectList( fcoNames, icFlags ); // put all info into report @@ -1354,7 +1301,8 @@ int cTWModeIC::Execute(cErrorQueue* pQueue) uint32 icFlags = 0; icFlags |= ( mpData->mfLooseDirs ? cIntegrityCheck::FLAG_LOOSE_DIR : 0 ); icFlags |= ( mpData->mbResetAccessTime ? cIntegrityCheck::FLAG_ERASE_FOOTPRINTS_IC : 0 ); - + icFlags |= ( mpData->mbDirectIO ? cIntegrityCheck::FLAG_DIRECT_IO : 0 ); + ic.Execute( icFlags ); // put all display info into report @@ -1391,22 +1339,6 @@ int cTWModeIC::Execute(cErrorQueue* pQueue) cFCOReportUtil::FinalizeReport( report ); -#ifdef GMMS - // gmms reporting? - if (mpData->mbGmms) - { - try - { - cTWCmdLineUtil::GmmsReport(reportHeader, report, mpData->mGmmsProg, mpData->mGmmsOptions, mpData->mGmmsVerbosity); - } - catch(eGmmsError& e) - { - cTWUtil::PrintErrorMsg(e); - // Do not return. Gmms errors are not fatal. - } - } -#endif - // email the report if that is desired... if(mpData->mbEmail) { @@ -1531,7 +1463,7 @@ class cTWModeDbUpdate_i : public cTWModeCommon { public: bool mbInteractive; // don't do interactive update; just integrate the report file - bool mbAnal; // are we in anal mode? + bool mbSecureMode; // are we in extra-pedantic mode? //std::string mSitePassphrase; // pass phrase for site key //bool mSiteProvided; @@ -1544,7 +1476,7 @@ public: cFCOReportHeader* mpReportHeader; // ctor can set up some default values - cTWModeDbUpdate_i() : cTWModeCommon(), mbInteractive(true), mbAnal(true), /*mSiteProvided(false),*/ mpReport(0), mpDbFile(0), mpReportHeader(0) {} + cTWModeDbUpdate_i() : cTWModeCommon(), mbInteractive(true), mbSecureMode(true), /*mSiteProvided(false),*/ mpReport(0), mpDbFile(0), mpReportHeader(0) {} }; /////////////////////////////////////////////////////////////////////////////// @@ -1572,7 +1504,7 @@ void cTWModeDbUpdate::InitCmdLineParser(cCmdLineParser& cmdLine) cmdLine.AddArg(cTWCmdLine::MODE_UPDATE_DB, TSTRING(_T("")), TSTRING(_T("update")), cCmdLineParser::PARAM_NONE); cmdLine.AddArg(cTWCmdLine::ACCEPT_ALL, TSTRING(_T("a")), TSTRING(_T("accept-all")), cCmdLineParser::PARAM_NONE); - cmdLine.AddArg(cTWCmdLine::ANAL_LEVEL, TSTRING(_T("Z")), TSTRING(_T("secure-mode")), cCmdLineParser::PARAM_ONE); + cmdLine.AddArg(cTWCmdLine::SECURE_MODE, TSTRING(_T("Z")), TSTRING(_T("secure-mode")), cCmdLineParser::PARAM_ONE); cmdLine.AddArg(cTWCmdLine::EDITOR, TSTRING(_T("V")), TSTRING(_T("visual")), cCmdLineParser::PARAM_ONE); cmdLine.AddArg(cTWCmdLine::PARAMS, TSTRING(_T("")), TSTRING(_T("")), cCmdLineParser::PARAM_NONE); @@ -1601,15 +1533,15 @@ bool cTWModeDbUpdate::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) case cTWCmdLine::ACCEPT_ALL: mpData->mbInteractive = false; break; - case cTWCmdLine::ANAL_LEVEL: + case cTWCmdLine::SECURE_MODE: ASSERT(iter.NumParams() > 0); if(iter.ParamAt(0).compare(_T("high")) == 0) - mpData->mbAnal = true; + mpData->mbSecureMode = true; else if(iter.ParamAt(0).compare(_T("low")) == 0) - mpData->mbAnal = false; + mpData->mbSecureMode = false; else { - // invalid parameter to anal switch... + // invalid parameter to secure mode switch... // TODO -- print this to stderr; how do I display (1) the switch name // and (2) the possible values? // TODO -- move {high, low} somewhere else @@ -1658,14 +1590,14 @@ bool cTWModeDbUpdate::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // Set the cross file systems flag appropriately. cFSDataSourceIter::SetFileSystemCrossing(mpData->mbCrossFileSystems); #endif - + return true; } void cTWModeDbUpdate::Init(const cTWModeIC_i* pICData, cFCODatabaseFile* dbFile, cFCOReportHeader* prh, cFCOReport* pReport, bool bEncryptDb) { mpData->mbInteractive = true; // always interactive - mpData->mbAnal = pICData->mbAnal; + mpData->mbSecureMode = pICData->mbSecureMode; //mpData->mbBackup = pICData->mbBackup; mpData->mDbFile = pICData->mDbFile; mpData->mLocalKeyFile = pICData->mLocalKeyFile; @@ -1819,9 +1751,9 @@ int cTWModeDbUpdate::Execute(cErrorQueue* pQueue) // uint32 udFlags = 0; udFlags |= ( mpData->mbResetAccessTime ? cUpdateDb::FLAG_ERASE_FOOTPRINTS_UD : 0 ); - + cUpdateDb update( dbIter.GetDb(), *mpData->mpReport, pQueue ); - if( (! update.Execute( udFlags )) && mpData->mbAnal ) + if( (! update.Execute( udFlags )) && mpData->mbSecureMode ) { // we will not perform the update; simply exit. TCOUT << TSS_GetString( cTripwire, tripwire::STR_DB_NOT_UPDATED) << std::endl; @@ -1906,10 +1838,10 @@ public: TSTRING mTextPolFile; wc16_string mSitePassphrase; bool mSiteProvided; - bool mbAnal; + bool mbSecureMode; // ctor can set up some default values - cTWModePolUpdate_i() : cTWModeCommon(), mSiteProvided(false), mbAnal(true) {} + cTWModePolUpdate_i() : cTWModeCommon(), mSiteProvided(false), mbSecureMode(true) {} }; /////////////////////////////////////////////////////////////////////////////// @@ -1937,7 +1869,7 @@ void cTWModePolUpdate::InitCmdLineParser(cCmdLineParser& cmdLine) cmdLine.AddArg(cTWCmdLine::TEXT_POL_FILE, TSTRING(_T("")), TSTRING(_T("")), cCmdLineParser::PARAM_ONE); cmdLine.AddArg(cTWCmdLine::LOCAL_PASSPHRASE,TSTRING(_T("P")), TSTRING(_T("local-passphrase")), cCmdLineParser::PARAM_ONE); cmdLine.AddArg(cTWCmdLine::SITE_PASSPHRASE, TSTRING(_T("Q")), TSTRING(_T("site-passphrase")), cCmdLineParser::PARAM_ONE); - cmdLine.AddArg(cTWCmdLine::ANAL_LEVEL, TSTRING(_T("Z")), TSTRING(_T("secure-mode")), cCmdLineParser::PARAM_ONE); + cmdLine.AddArg(cTWCmdLine::SECURE_MODE, TSTRING(_T("Z")), TSTRING(_T("secure-mode")), cCmdLineParser::PARAM_ONE); } /////////////////////////////////////////////////////////////////////////////// @@ -1973,15 +1905,15 @@ bool cTWModePolUpdate::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine mpData->mSitePassphrase = cStringUtil::TstrToWstr(iter.ParamAt(0)); mpData->mSiteProvided = true; break; - case cTWCmdLine::ANAL_LEVEL: + case cTWCmdLine::SECURE_MODE: ASSERT(iter.NumParams() > 0); if(iter.ParamAt(0).compare(_T("high")) == 0) - mpData->mbAnal = true; + mpData->mbSecureMode = true; else if(iter.ParamAt(0).compare(_T("low")) == 0) - mpData->mbAnal = false; + mpData->mbSecureMode = false; else { - // invalid parameter to anal switch... + // invalid parameter to secure mode switch... // TODO -- print this to stderr; how do I display (1) the switch name // and (2) the possible values? // TODO -- move {high, low} somewhere else @@ -2025,13 +1957,12 @@ bool cTWModePolUpdate::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine // if (cTWUtil::VerifyCfgSiteKey( mstrConfigFile, mpData->mSiteKeyFile ) == false) cTWUtil::PrintErrorMsg(eTWCfgUnencrypted(_T(""), eError::NON_FATAL|eError::SUPRESS_THIRD_MSG)); - - + #if IS_UNIX // Set the cross file systems flag appropriately. cFSDataSourceIter::SetFileSystemCrossing(mpData->mbCrossFileSystems); #endif - + return true; } @@ -2133,11 +2064,13 @@ int cTWModePolUpdate::Execute(cErrorQueue* pQueue) // cPolicyUpdate pu( genreIter->GetGenre(), dbIter.GetSpecList(), genreIter->GetSpecList(), dbIter.GetDb(), pQueue ); uint32 puFlags = 0; - puFlags |= mpData->mbAnal ? cPolicyUpdate::ANAL : 0; + puFlags |= mpData->mbSecureMode ? cPolicyUpdate::FLAG_SECURE_MODE : 0; puFlags |= ( mpData->mbResetAccessTime ? cPolicyUpdate::FLAG_ERASE_FOOTPRINTS_PU : 0 ); - if( (! pu.Execute(puFlags)) && (mpData->mbAnal) ) + puFlags |= ( mpData->mbDirectIO ? cPolicyUpdate::FLAG_DIRECT_IO : 0 ); + + if( (! pu.Execute(puFlags)) && (mpData->mbSecureMode) ) { - // they were in anal mode and errors occured; an error condition + // they were in secure mode and errors occured; an error condition TCOUT << TSS_GetString( cTripwire, tripwire::STR_ERR_POL_UPDATE) << std::endl; return 8; } @@ -2163,7 +2096,9 @@ int cTWModePolUpdate::Execute(cErrorQueue* pQueue) // TODO -- turn pQueue into an error bucket uint32 gdbFlags = 0; - gdbFlags |= ( mpData->mbResetAccessTime ? cGenerateDb::FLAG_ERASE_FOOTPRINTS_GD : 0 ); + gdbFlags |= ( mpData->mbResetAccessTime ? cGenerateDb::FLAG_ERASE_FOOTPRINTS_GD : 0 ); + gdbFlags |= ( mpData->mbDirectIO ? cGenerateDb::FLAG_DIRECT_IO : 0 ); + cGenerateDb::Execute( dbIter.GetSpecList(), dbIter.GetDb(), dbIter.GetGenreHeader().GetPropDisplayer(), pQueue, gdbFlags ); //TODO -- what other prop displayer stuff do I have to do here? @@ -2348,9 +2283,6 @@ bool cTWModeTest::Init(const cConfigFile& cf, const cCmdLineParser& cmdLine) // make sure that we have a valid mail method TEST_INIT_REQUIREMENT( ( cMailMessage::NO_METHOD != mpData->mMailMethod ), cTripwire, tripwire::STR_ERR_NO_MAIL_METHOD ); TEST_INIT_REQUIREMENT( ( cMailMessage::INVALID_METHOD != mpData->mMailMethod ), cTripwire, tripwire::STR_ERR_INVALID_MAIL_METHOD ); -#if !SUPPORTS_MAPI - TEST_INIT_REQUIREMENT( ( cMailMessage::MAIL_BY_MAPI != mpData->mMailMethod ), cTripwire, tripwire::STR_ERR_MAPI_NOT_SUPPORTED ); -#endif } return true; diff --git a/src/tripwire/twcmdline.h b/src/tripwire/twcmdline.h index bb02d2e..59e8141 100644 --- a/src/tripwire/twcmdline.h +++ b/src/tripwire/twcmdline.h @@ -76,6 +76,9 @@ TSS_EXCEPTION( eTWInvalidPortNumber, eError ); TSS_EXCEPTION( eTWPassForUnencryptedDb, eError ); TSS_EXCEPTION( eTWInvalidTempDirectory, eError ); +TSS_EXCEPTION( eTWSyslogNotSupported, eError ); +TSS_EXCEPTION( eTWDirectIONotSupported, eError ); + /////////////////////////////////////////////////////////////////////////////// // cTWCmdLine -- class with a bunch of static member functions helpful in parsing // the tripwire command line @@ -131,19 +134,13 @@ public: RULE_NAME, GENRE_NAME, ACCEPT_ALL, // update db with entire report - ANAL_LEVEL, + SECURE_MODE, TEXT_POL_FILE, LOCAL_PASSPHRASE, SITE_PASSPHRASE, TEST_EMAIL, REPORTLEVEL, HEXADECIMAL, - -#ifdef GMMS - USE_GMMS, - GMMS_VERBOSITY, -#endif - PARAMS, // the final parameters NUM_CMDLINEARGS @@ -174,6 +171,7 @@ class cTWModeCommon bool mbResetAccessTime; // do we reset access time when calculating properties of files? bool mbLogToSyslog; // log significant events and level 0 reports to SYSLOG bool mbCrossFileSystems; // automatically recurse across mount points on Unis FS genre + bool mbDirectIO; // Use direct i/o when scanning files, if platform supports it. cTextReportViewer::ReportingLevel mEmailReportLevel; // What level of email reporting we should use cMailMessage::MailMethod mMailMethod; // What mechanism should we use to send the report @@ -190,7 +188,8 @@ class cTWModeCommon mfLooseDirs(false), mbResetAccessTime(false), mbLogToSyslog(false), - mbCrossFileSystems(false) + mbCrossFileSystems(false), + mbDirectIO(false) { } }; diff --git a/src/tripwire/twcmdlineutil.cpp b/src/tripwire/twcmdlineutil.cpp index 421d80a..244a75d 100644 --- a/src/tripwire/twcmdlineutil.cpp +++ b/src/tripwire/twcmdlineutil.cpp @@ -67,15 +67,6 @@ #include -#ifdef GMMS - -// local helper functions for GMMS notification -static TSTRING FormatGmmsReportSummary(int32 date, int violationCount, int maxSeverity); -static TSTRING FormatGmmsViolationSummary(int32 date, const TSTRING& rulename, const TSTRING& filename, int severity); -static void SendGmmsAlert(const TSTRING& gmmsProg, const TSTRING& gmmsOptions, const TSTRING& alerts); // throw (eGmmsError) - -#endif - /////////////////////////////////////////////////////////////////////////////// // ParsePolicyFile @@ -554,14 +545,6 @@ static bool EmailReportTo(const TSTRING &toAddress, const cFCOReportHeader& head case cMailMessage::MAIL_BY_PIPE: reportMail = std::auto_ptr(new cPipedMailMessage(modeCommon->mMailProgram)); break; - case cMailMessage::MAIL_BY_MAPI: -#if SUPPORTS_MAPI - reportMail = std::auto_ptr(new cMAPIMailMessage); - break; -#else - ASSERT(false); - return false; -#endif } TSTRING strTempFilename; @@ -716,14 +699,6 @@ bool cTWCmdLineUtil::SendEmailTestMessage(const TSTRING &mAddress, const cTWMode case cMailMessage::MAIL_BY_PIPE: reportMail = std::auto_ptr(new cPipedMailMessage(modeCommon->mMailProgram)); break; - case cMailMessage::MAIL_BY_MAPI: -#if SUPPORTS_MAPI - reportMail = std::auto_ptr(new cMAPIMailMessage); - break; -#else - ASSERT(false); - return false; -#endif } @@ -764,193 +739,5 @@ bool cTWCmdLineUtil::SendEmailTestMessage(const TSTRING &mAddress, const cTWMode } -#ifdef GMMS - -// -// Use gmms to send violation notification -// -// verbosity==1 One line summary of whole report -// verbosity==2 One line summary of each violation -// -bool cTWCmdLineUtil::GmmsReport(const cFCOReportHeader& header, const cFCOReport& report, - const TSTRING &gmmsProg, const TSTRING &gmmsOptions, int verbosity) // throw (eGmmsError) -{ - int violationCount = 0, maxSeverity = 0; - TSTRING alerts; - - // loop through all generes - cFCOReportGenreIter genreIter(report); - for (genreIter.SeekBegin(); !genreIter.Done(); genreIter.Next()) - { - // loop through all specs - cFCOReportSpecIter specIter(report, genreIter.GetGenre()); - for (specIter.SeekBegin(); ! specIter.Done(); specIter.Next()) - { - - ASSERT(true); - - // Get severity - int32 severity = specIter.GetAttr()->GetSeverity(); - - // Get rulename - TSTRING rulename = specIter.GetAttr()->GetName(); - - // Go through all of the added file rule violations - cIterProxy addedIter(specIter.GetAddedSet()->GetIter()); - for (addedIter->SeekBegin(); !addedIter->Done(); addedIter->Next()) - { - if (severity > maxSeverity) - maxSeverity = severity; - - if (verbosity == 2) - { - // get filename, send one line summary of this violation - TSTRING filename = addedIter->FCO()->GetName().AsString(); - alerts += FormatGmmsViolationSummary(header.GetCreationTime(), rulename, filename, severity); - alerts += _T("\n"); - } - - violationCount++; - } - - // Go through all of the removed file rule violations - cIterProxy removedIter(specIter.GetRemovedSet()->GetIter()); - for (removedIter->SeekBegin(); !removedIter->Done(); removedIter->Next()) - { - if (severity > maxSeverity) - maxSeverity = severity; - - if (verbosity == 2) - { - // get filename, send one line summary of this violation - TSTRING filename = removedIter->FCO()->GetName().AsString(); - alerts += FormatGmmsViolationSummary(header.GetCreationTime(), rulename, filename, severity); - alerts += _T("\n"); - } - - violationCount++; - } - - // Go through all of the changed file rule violations - cFCOReportChangeIter changedIter(specIter); - for (changedIter.SeekBegin(); !changedIter.Done(); changedIter.Next()) - { - if (severity > maxSeverity) - maxSeverity = severity; - - if (verbosity == 2) - { - // get filename, send one line summary of this violation - TSTRING filename = changedIter.GetOld()->GetName().AsString(); - alerts += FormatGmmsViolationSummary(header.GetCreationTime(), rulename, filename, severity); - alerts += _T("\n"); - } - - violationCount++; - } - } - } - - // Send one line summary of the whole report if that's what they want, - // or if there were no violations and the verbosity level is 2. That way - // verbosity level 2 and no violations will still send an all-is-well notification. - if (verbosity == 1 || (verbosity == 2 && violationCount==0)) - { - alerts += FormatGmmsReportSummary(header.GetCreationTime(), violationCount, maxSeverity); - alerts += _T("\n"); - } - - ASSERT(!alerts.empty()); - SendGmmsAlert(gmmsProg, gmmsOptions, alerts); - - return true; -} -// -// Use this with gmms verbosity level 1 -// -TSTRING FormatGmmsReportSummary(int32 date, int violationCount, int maxSeverity) -{ - TSTRING strDate; - cTWLocale::FormatTime(date, strDate); - - TOSTRINGSTREAM summary; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_START); - summary << strDate; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_VERBOSITY1A); - summary << violationCount; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_VERBOSITY1B); - summary << maxSeverity; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_END); - - return summary.str(); -} - - -// -// Use this with gmms verbosity level 2 -// -TSTRING FormatGmmsViolationSummary(int32 date, const TSTRING& rulename, const TSTRING& filename, int severity) -{ - TSTRING strDate; - cTWLocale::FormatTime(date, strDate); - - TOSTRINGSTREAM summary; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_START); - summary << strDate; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_VERBOSITY2A); - summary << rulename; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_VERBOSITY2B); - summary << filename; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_VERBOSITY2C); - summary << severity; - summary << TSS_GetString( cTripwire, tripwire::STR_GMMS_END); - - return summary.str(); -} - -static void SendGmmsAlert(const TSTRING& gmmsProg, const TSTRING& gmmsOptions, const TSTRING& alerts) // throw (eGmmsError) -{ -#if IS_UNIX - - // construct the command line for starting gmms - TSTRING command = gmmsProg + _T(" ") + gmmsOptions; - - // preserve environment variables necessary for gmms to run - le_set("GEOPLEX_DEPLOY"); - le_set("LD_LIBRARY_PATH"); - le_set("PATH"); - - // open the process - FILE *mpFile = mpopen((char*)command.c_str(), _T("w")); - if(!mpFile) - throw eGmmsError(eGmmsError::ERR_COULDNT_OPEN_PIPE, gmmsProg); - - // write the alert(s) to the process's standard-in. - if (_ftprintf(mpFile, "%s", alerts.c_str()) < 0) - throw eGmmsError(eGmmsError::ERR_COULDNT_WRITE_TO_PIPE, gmmsProg); - - // end the process by closing standard-in - int result = mpclose( mpFile ); - if (result != 0) - { - // complain about gmms returning an error code. - throw eGmmsError(eGmmsError::ERR_CMD_FAILED, gmmsProg); - } - - // unset environment variables necessary for gmms to run - le_unset("GEOPLEX_DEPLOY"); - le_unset("LD_LIBRARY_PATH"); - le_unset("PATH"); - -#else - - // GMMS is not for NT, so just do something cheap and easy for debugging purposes. - std::cerr << cStringUtil::TstrToStr(alerts); - -#endif -} - -#endif - diff --git a/src/tripwire/twcmdlineutil.h b/src/tripwire/twcmdlineutil.h index ce070b8..8de0508 100644 --- a/src/tripwire/twcmdlineutil.h +++ b/src/tripwire/twcmdlineutil.h @@ -48,11 +48,6 @@ class cTWModeCommon; class cErrorBucket; class cFCODatabaseFile; -TSS_EXCEPTION( eGmmsError, eError ); -TSS_EXCEPTION( eGmmsCouldntOpenPipe, eGmmsError ); -TSS_EXCEPTION( eGmmsCouldntWritePipe, eGmmsError ); -TSS_EXCEPTION( eGmmsCmdFailed, eGmmsError ); - class cTWCmdLineUtil { public: @@ -102,12 +97,6 @@ public: static void VerifySpecs( const cFCOSpecList& parsedList, const cFCOSpecList& dbList );//throw (eError) // determines whether the policy in the policy file (parsedList) is equal to the database's current // policy (dbList). If it is not, an exception is thrown - -#ifdef GMMS - static bool GmmsReport(const cFCOReportHeader& header, const cFCOReport& report, - const TSTRING &gmmsProg, const TSTRING &gmmsOptions, int verbosity); // throw (eGmmsError) - // Use gmms to send violation notification -#endif }; #endif diff --git a/src/tripwire/updatedb.h b/src/tripwire/updatedb.h index a73eaec..34cca8a 100644 --- a/src/tripwire/updatedb.h +++ b/src/tripwire/updatedb.h @@ -76,6 +76,8 @@ public: // when this flag is set, UpdateDb will attempt // undo any inadvertant modifications it may make // when executing. + + }; private: diff --git a/src/tw/Makefile.am b/src/tw/Makefile.am index 30eb44b..de2d025 100644 --- a/src/tw/Makefile.am +++ b/src/tw/Makefile.am @@ -1,8 +1,9 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libtw.a +libtw_adir=. libtw_a_SOURCES = \ configfile.cpp dbdatasource.cpp dbdebug.cpp dbexplore.cpp \ fcodatabasefile.cpp fcodatabaseutil.cpp fcoreport.cpp \ @@ -11,6 +12,13 @@ libtw_a_SOURCES = \ textreportviewer.cpp tw.cpp twerrors.cpp twinit.cpp \ twstrings.cpp twutil.cpp +libtw_a_HEADERS = \ + configfile.h dbdatasource.h dbdebug.h dbexplore.h \ + fcodatabasefile.h fcodatabaseutil.h fcoreport.h \ + fcoreportutil.h filemanipulator.h headerinfo.h policyfile.h \ + stdtw.h systeminfo.h textdbviewer.h textreportviewer.h \ + tw.h twerrors.h twinit.h twstrings.h twutil.h + DEFS = @DEFS@ -DCONFIG_DIR=\"$(sysconfdir)\" all: $(noinst_LIBRARIES) diff --git a/src/tw/Makefile.in b/src/tw/Makefile.in index 2fc8f3e..641bad0 100644 --- a/src/tw/Makefile.in +++ b/src/tw/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libtw_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/tw -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libtw_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtw_a_AR = $(AR) $(ARFLAGS) libtw_a_LIBADD = am_libtw_a_OBJECTS = configfile.$(OBJEXT) dbdatasource.$(OBJEXT) \ @@ -62,23 +120,95 @@ am_libtw_a_OBJECTS = configfile.$(OBJEXT) dbdatasource.$(OBJEXT) \ twerrors.$(OBJEXT) twinit.$(OBJEXT) twstrings.$(OBJEXT) \ twutil.$(OBJEXT) libtw_a_OBJECTS = $(am_libtw_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libtw_a_SOURCES) DIST_SOURCES = $(libtw_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libtw_adir)" +HEADERS = $(libtw_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -102,6 +232,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -113,6 +244,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -129,21 +261,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -173,15 +308,20 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libtw.a +libtw_adir = . libtw_a_SOURCES = \ configfile.cpp dbdatasource.cpp dbdebug.cpp dbexplore.cpp \ fcodatabasefile.cpp fcodatabaseutil.cpp fcoreport.cpp \ @@ -190,6 +330,13 @@ libtw_a_SOURCES = \ textreportviewer.cpp tw.cpp twerrors.cpp twinit.cpp \ twstrings.cpp twutil.cpp +libtw_a_HEADERS = \ + configfile.h dbdatasource.h dbdebug.h dbexplore.h \ + fcodatabasefile.h fcodatabaseutil.h fcoreport.h \ + fcoreportutil.h filemanipulator.h headerinfo.h policyfile.h \ + stdtw.h systeminfo.h textdbviewer.h textreportviewer.h \ + tw.h twerrors.h twinit.h twstrings.h twutil.h + all: all-am .SUFFIXES: @@ -198,15 +345,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tw/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/tw/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tw/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/tw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -223,13 +369,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtw.a: $(libtw_a_OBJECTS) $(libtw_a_DEPENDENCIES) - -rm -f libtw.a - $(libtw_a_AR) libtw.a $(libtw_a_OBJECTS) $(libtw_a_LIBADD) - $(RANLIB) libtw.a + +libtw.a: $(libtw_a_OBJECTS) $(libtw_a_DEPENDENCIES) $(EXTRA_libtw_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtw.a + $(AM_V_AR)$(libtw_a_AR) libtw.a $(libtw_a_OBJECTS) $(libtw_a_LIBADD) + $(AM_V_at)$(RANLIB) libtw.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -238,91 +386,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libtw_aHEADERS: $(libtw_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libtw_a_HEADERS)'; test -n "$(libtw_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libtw_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libtw_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtw_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtw_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libtw_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libtw_a_HEADERS)'; test -n "$(libtw_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libtw_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libtw_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -333,16 +511,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -362,18 +546,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libtw_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -392,22 +596,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libtw_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libtw_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libtw_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libtw_a_OBJECTS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/tw/configfile.cpp b/src/tw/configfile.cpp index 7302564..c6dc7a4 100644 --- a/src/tw/configfile.cpp +++ b/src/tw/configfile.cpp @@ -650,10 +650,6 @@ void cConfigFile::CheckThatAllMandatoryKeyWordsExists() // throw( eConfigFile ) _T("REPORTFILE"), _T("SITEKEYFILE"), _T("LOCALKEYFILE"), -#ifdef GMMS - _T("GMMS"), - _T("GMMSOPTIONS") -#endif }; diff --git a/src/tw/textdbviewer.cpp b/src/tw/textdbviewer.cpp index 6006843..3b7647b 100644 --- a/src/tw/textdbviewer.cpp +++ b/src/tw/textdbviewer.cpp @@ -135,13 +135,7 @@ void cTextDBViewer::PrintDB( cFCODatabaseFile& rd, const TSTRING& strFilename ) else { //Gonna have to insert a lame hack here, since ostr.open DEMANDS a const char*!! -#ifdef _UNICODE - char ncBuf[ iFSServices::TW_MAX_PATH ]; - wcstombs( ncBuf, strFilename.c_str(), sizeof(char)); - fileOut.open( ncBuf ); -#else //narrow character mode fileOut.open( strFilename.c_str() ); -#endif if( fileOut.is_open() ) { diff --git a/src/tw/textreportviewer.cpp b/src/tw/textreportviewer.cpp index a43de25..05eac5f 100644 --- a/src/tw/textreportviewer.cpp +++ b/src/tw/textreportviewer.cpp @@ -844,7 +844,7 @@ void cTextReportViewer::GetGenreInfo( FCOList** ppCurList ) cGenre::Genre g = cGenreSwitcher::GetInstance()->StringToGenre( strGenre.c_str() ); if( cGenre::GENRE_INVALID == g) { - throw eTextReportViewerReportCorrupt(); // TODO: ERR_UKNOWN_GENRE + throw eTextReportViewerReportCorrupt("Invalid Genre"); // TODO: ERR_UKNOWN_GENRE } cGenreSwitcher::GetInstance()->SelectGenre( g ); @@ -853,7 +853,7 @@ void cTextReportViewer::GetGenreInfo( FCOList** ppCurList ) // GenreList::iterator curIter = mFCOsRemoveFromReport.find( g ); if( curIter == mFCOsRemoveFromReport.end() ) - throw eTextReportViewerReportCorrupt(); // TODO: ERR_UKNOWN_GENRE + throw eTextReportViewerReportCorrupt("No files found in report"); // TODO: ERR_UKNOWN_GENRE *ppCurList = curIter->second; // @@ -866,7 +866,7 @@ void cTextReportViewer::GetGenreInfo( FCOList** ppCurList ) void cTextReportViewer::GetBallotInfo( FCOList* pCurList ) { if( ! pCurList ) - throw eTextReportViewerReportCorrupt(); + throw eTextReportViewerReportCorrupt("No ballot list found"); // if the box is checked, then the user elected to leave the item // in the report, so we do nothing. If the box isn't checked, then @@ -885,7 +885,7 @@ void cTextReportViewer::GetBallotInfo( FCOList* pCurList ) iter = pCurList->find( fcoName ); if( iter == pCurList->end() ) { - throw eTextReportViewerReportCorrupt();// TODO: ERR_UKNOWN_NAME + throw eTextReportViewerReportCorrupt("Unknown file name in report");// TODO: ERR_UKNOWN_NAME } pCurList->erase( fcoName ); @@ -979,7 +979,7 @@ void cTextReportViewer::GetFCONameFromBallotLine( cFCOName& fcoName ) //throw (e else if( TW_IS_EOL( chIn ) ) { // if EOL, there was no name! - throw eTextReportViewerReportCorrupt(); + throw eTextReportViewerReportCorrupt("Ballot item without a name"); } else { @@ -1014,7 +1014,8 @@ void cTextReportViewer::GetFCONameFromBallotLine( cFCOName& fcoName ) //throw (e cStringUtil::StrToTstr( strFCOName ), fcoName ) ) { - throw eTextReportViewerReportCorrupt(); // TODO -- it might be nice to be able to specify what line of the report got corrupted + std::string msg = "Invalid object name: " + strFCOName; + throw eTextReportViewerReportCorrupt(msg); // TODO -- it might be nice to be able to specify what line of the report got corrupted } } @@ -1118,7 +1119,7 @@ void cTextReportViewer::RemoveFCOsFromReport() //throw (eTextReportViewer) if( nFCOsToRemove != nFCOsRemoved ) { // TODO -- maybe have a different enumeration for this? - throw eTextReportViewerReportCorrupt(); + throw eTextReportViewerReportCorrupt("Mismatch in objects to remove"); } } @@ -1942,20 +1943,21 @@ void cTextReportViewer::GetChar() // initialize mCurrentChar mCurrentCharSize = 0; - for( int i = 0; i < (int)sizeof( mCurrentChar ); i++ ) + for( uint32 i = 0; i < sizeof( mCurrentChar ); i++ ) mCurrentChar[i] = 0; static const std::istream::char_type eof = - std::char_traits< char >::to_char_type( - std::char_traits< char >::eof() ); + std::char_traits< char >::to_char_type(std::char_traits< char >::eof() ); + std::streampos pos = mpIn->tellg(); + for( size_t nch = 0; nch < (size_t)MB_CUR_MAX; nch++ ) { if( mpIn->eof() || PeekIsEOF() ) { // should be first byte we read if( nch != 0 ) - throw eTextReportViewerReportCorrupt(); + throw eTextReportViewerReportCorrupt("Expected EOF"); if( PeekIsEOF() ) { @@ -1975,13 +1977,11 @@ void cTextReportViewer::GetChar() if( ! mpIn->good() ) { d.TraceDebug( _T("Input stream error.\n") ); - throw eTextReportViewerReportCorrupt(); + throw eTextReportViewerReportCorrupt("Input stream error"); } // get character from input stream - std::istream::char_type ch = - std::char_traits::to_char_type( - mpIn->get() ); + std::istream::char_type ch = std::char_traits::to_char_type(mpIn->get()); // add character to mb buffer mCurrentChar[nch] = ch; @@ -1999,6 +1999,16 @@ void cTextReportViewer::GetChar() } } } + + mpIn->seekg( pos ); + std::istream::char_type c = std::char_traits::to_char_type( mpIn->get() ); + if( (unsigned char)c > 0x7f ) + { + mCurrentChar[0] = c; + mCurrentChar[1] = 0; + mCurrentCharSize = 1; + return; + } // sequence was not a valid mb character // (searched MB_CUR_MAX chars and didn't find a complete mb character) @@ -2008,7 +2018,7 @@ void cTextReportViewer::GetChar() d.TraceDebug( _T("%u\n"), (size_t)(unsigned char)mCurrentChar[j] ); #endif ASSERT( false ); - throw eTextReportViewerReportCorrupt(); + throw eTextReportViewerReportCorrupt("Invalid multibyte sequence"); } void cTextReportViewer::AppendChar( std::string& str ) diff --git a/src/tw/twinit.cpp b/src/tw/twinit.cpp index 58ce031..99e2947 100644 --- a/src/tw/twinit.cpp +++ b/src/tw/twinit.cpp @@ -79,7 +79,8 @@ #include "core/tw_signal.h" // to ignore SIGPIPE #endif -#ifdef __AROS__ +#if IS_AROS +#include #include #include #include @@ -245,7 +246,7 @@ void cTWInit::Init( const TSTRING& strArgv0 ) // END:RAD // ------------------------------------------------------------ -#ifdef __AROS__ +#if IS_AROS aros_socketbase_init(); #endif // @@ -283,7 +284,7 @@ void cTWInit::Init( const TSTRING& strArgv0 ) mpData->et.SetChild( &mpData->er ); errorQueue.SetChild( &mpData->et ); -#if IS_UNIX +#if SUPPORTS_POSIX_SIGNALS // ignore SIGPIPE tw_sigign(SIGPIPE); //TODO: somebody add comment here! @@ -307,15 +308,21 @@ void cTWInit::Init( const TSTRING& strArgv0 ) tw_HandleSignal( SIGSYS ); // Bad system call. #endif tw_HandleSignal( SIGFPE ); // Floating point exception. + +#ifdef SIGXCPU tw_HandleSignal( SIGXCPU ); // CPU time exceeded. Might very well be an issue for us. +#endif + +#ifdef SIGXFSZ tw_HandleSignal( SIGXFSZ ); // File size limit exceeded. +#endif #endif } -#ifdef __AROS__ +#if IS_AROS struct Library* SocketBase=0; bool aros_socketbase_init() diff --git a/src/tw/twstrings.cpp b/src/tw/twstrings.cpp index 9f52e5c..262576b 100644 --- a/src/tw/twstrings.cpp +++ b/src/tw/twstrings.cpp @@ -40,15 +40,7 @@ #include "twstrings.h" #include "buildnum.h" -#ifdef _UNICODE -# ifdef _DEBUG // lets leave out the "u" for non-debug -# define UNICODE_STR _T("u") -# else -# define UNICODE_STR _T("") -# endif -#else -# define UNICODE_STR _T("") -#endif +#define UNICODE_STR _T("") #ifdef _DEBUG # define DEBUG_STR _T("d") @@ -56,10 +48,10 @@ # define DEBUG_STR _T("") #endif -#define TSS_PRODUCT_NAME _T("Open Source Tripwire(R) 2.4.3.1.") +#define TSS_PRODUCT_NAME _T("Open Source Tripwire(R) " PACKAGE_VERSION ".") #define TSS_COPYRIGHT_NOTICE \ -_T("Open Source Tripwire 2.4 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered\n\ +_T("Open Source Tripwire 2.4 Portions copyright 2000-2017 Tripwire, Inc. Tripwire is a registered\n\ trademark of Tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY;\n\ for details use --version. This is free software which may be redistributed\n\ or modified only under certain conditions; see COPYING for details.\n\ @@ -68,7 +60,7 @@ All rights reserved.") #define TSS_COPYRIGHT_NOTICE_LONG \ _T("The developer of the original code and/or files is Tripwire, Inc. Portions \n\ -created by Tripwire, Inc. are copyright 2000 Tripwire, Inc. Tripwire is a \n\ +created by Tripwire, Inc. are copyright 2000-2017 Tripwire, Inc. Tripwire is a \n\ registered trademark of Tripwire, Inc. All rights reserved.\n\ \n\ This program is free software. The contents of this file are subject to the \n\ @@ -115,7 +107,6 @@ TSS_BeginStringtable( cTW ) TSS_StringEntry( tw::STR_DEF_CFG_FILENAME, _T("/etc/tw.cfg")), #endif - TSS_StringEntry( tw::STR_WIN_NT_ONLY, _T("Open Source Tripwire(R) runs only on Windows NT.")), TSS_StringEntry( tw::STR_GET_HELP, _T("Use --help to get help.")), TSS_StringEntry( tw::STR_NEWLINE, _T("\n")), TSS_StringEntry( tw::STR_ERR_TWCFG_CANT_READ, _T("Configuration file could not be read.")), @@ -158,7 +149,7 @@ TSS_BeginStringtable( cTW ) TSS_StringEntry( tw::STR_WRITE_REPORT_FILE, _T("Wrote report file: ") ), TSS_StringEntry( tw::STR_WRITE_CONFIG_FILE, _T("Wrote configuration file: ") ), - TSS_StringEntry( tw::STR_REPORT_TITLE, _T("Open Source Tripwire(R) 2.4.3.1 Integrity Check Report") ), + TSS_StringEntry( tw::STR_REPORT_TITLE, _T("Open Source Tripwire(R) " PACKAGE_VERSION " Integrity Check Report") ), TSS_StringEntry( tw::STR_R_GENERATED_BY, _T("Report generated by: ") ), TSS_StringEntry( tw::STR_R_CREATED_ON, _T("Report created on: ") ), TSS_StringEntry( tw::STR_DB_CREATED_ON, _T("Database generated on: ") ), @@ -219,7 +210,7 @@ TSS_BeginStringtable( cTW ) TSS_StringEntry( tw::STR_REMOVED_SHORT, _T("R") ), TSS_StringEntry( tw::STR_CHANGED_SHORT, _T("C") ), - TSS_StringEntry( tw::STR_DBPRINT_TITLE, _T("Open Source Tripwire(R) 2.4.3.1 Database") ), + TSS_StringEntry( tw::STR_DBPRINT_TITLE, _T("Open Source Tripwire(R) " PACKAGE_VERSION " Database") ), TSS_StringEntry( tw::STR_DB_GENERATED_BY, _T("Database generated by: ") ), TSS_StringEntry( tw::STR_TOTAL_NUM_FILES, _T("Total number of objects: ") ), TSS_StringEntry( tw::STR_END_OF_DB, _T("*** End of database ***") ), diff --git a/src/tw/twstrings.h b/src/tw/twstrings.h index bb406d1..80bee5d 100644 --- a/src/tw/twstrings.h +++ b/src/tw/twstrings.h @@ -52,7 +52,6 @@ TSS_BeginStringIds( tw ) STR_ERR_WRONG_PASSPHRASE_LOCAL, STR_ERR_WRONG_PASSPHRASE_SITE, STR_DEF_CFG_FILENAME, - STR_WIN_NT_ONLY, STR_GET_HELP, STR_VERSION, STR_VERSION_LONG, @@ -73,7 +72,7 @@ TSS_BeginStringIds( tw ) STR_ENTER_LOCAL_PASSPHRASE, STR_ENTER_SITE_PASSPHRASE, STR_ENTER_PROVIDED_PASSPHRASE, - STR_DB_NOT_UPDATED, // db update not performed due to anal mode + STR_DB_NOT_UPDATED, // db update not performed due to secure mode STR_IGNORE_PROPS, // ignoring properties STR_NOT_IMPLEMENTED, STR_REPORT_EMPTY, diff --git a/src/tw/twutil.cpp b/src/tw/twutil.cpp index 2e4f9a3..4172aaa 100644 --- a/src/tw/twutil.cpp +++ b/src/tw/twutil.cpp @@ -74,15 +74,15 @@ #if IS_UNIX #include #include -#include -#include +#if SUPPORTS_TERMIOS +# include +# include +#endif + #include "core/tw_signal.h" int _getch(void); #endif -#ifdef _UNICODE // right now we only need this for unicode -#include -#endif // constants static const char* POLICY_FILE_MAGIC_8BYTE = "#POLTXT\n"; @@ -1121,10 +1121,15 @@ void cTWUtil::CreatePrivateKey(cPrivateKeyProxy& proxy, cKeyFile& keyFile, const #if IS_UNIX static void (*old_SIGINT)(int); static void (*old_SIGQUIT)(int); + +#if SUPPORTS_TERMIOS static struct termios Otty; +#endif + static void RestoreEcho(int sig) { +#if SUPPORTS_TERMIOS #ifdef _DEBUG std::cout << "Caught signal, resetting echo."<< std::endl; sleep(2); @@ -1133,7 +1138,7 @@ static void RestoreEcho(int sig) tcsetattr( 0, TCSAFLUSH, &Otty); tw_signal(SIGINT, old_SIGINT); tw_signal(SIGQUIT, old_SIGQUIT); - +#endif tw_raise(sig); } @@ -1143,6 +1148,12 @@ void cTWUtil::GetString(wc16_string& ret) #error We depend on Unix not being Unicode #endif +// tcsetattr doesn't seem to work on AROS, so tweak ANSI terminal settings to hide passphrases. +#if IS_AROS + printf("\e[8m"); // set the 'concealed' flag + fflush(stdout); +#endif + // get the string const int MAX_STRING = 1024; char buf[MAX_STRING]; @@ -1151,6 +1162,11 @@ void cTWUtil::GetString(wc16_string& ret) TCOUT.flush(); len = read( 0, buf, MAX_STRING ); +#if IS_AROS + printf("\e[0m"); // reset back to normal text + fflush(stdout); +#endif + // TODO:BAM -- mb-enable this! if (len < MAX_STRING - 1) buf[len] = 0; @@ -1165,6 +1181,7 @@ void cTWUtil::GetString(wc16_string& ret) cTWUtil::NoEcho::NoEcho() { +#if SUPPORTS_TERMIOS // set the terminal to no echo mode static struct termios Ntty; @@ -1182,12 +1199,16 @@ cTWUtil::NoEcho::NoEcho() { ThrowAndAssert(eTWUtilEchoModeSet()); } +#endif } -cTWUtil::NoEcho::~NoEcho() { +cTWUtil::NoEcho::~NoEcho() +{ +#if SUPPORTS_TERMIOS tcsetattr( 0, TCSAFLUSH, &Otty); tw_signal(SIGINT, old_SIGINT); tw_signal(SIGQUIT, old_SIGQUIT); +#endif } void cTWUtil::GetStringNoEcho(wc16_string& ret) diff --git a/src/twadmin/Makefile.am b/src/twadmin/Makefile.am index 98f514a..b59ec1c 100644 --- a/src/twadmin/Makefile.am +++ b/src/twadmin/Makefile.am @@ -1,17 +1,22 @@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. LIBS = -ltripwire -lcryptlib @LIBS@ LDFLAGS = @LDFLAGS@ -L../../lib LN_S = @LN@ sbin_PROGRAMS = twadmin +twadmindir=. twadmin_SOURCES = \ keygeneration.cpp stdtwadmin.cpp twadmin.cpp twadmincl.cpp \ twadminerrors.cpp twadminmain.cpp twadminstrings.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +twadmin_HEADERS = \ + keygeneration.h resource.h stdtwadmin.h twadmin.h \ + twadmincl.h twadminerrors.h twadminstrings.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit CLEANFILES = ../../bin/twadmin all: $(sbin_PROGRAMS) diff --git a/src/twadmin/Makefile.in b/src/twadmin/Makefile.in index 4d50108..1e1bbf9 100644 --- a/src/twadmin/Makefile.in +++ b/src/twadmin/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(twadmin_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,43 +87,117 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ sbin_PROGRAMS = twadmin$(EXEEXT) subdir = src/twadmin -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(twadmin_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(twadmindir)" PROGRAMS = $(sbin_PROGRAMS) am_twadmin_OBJECTS = keygeneration.$(OBJEXT) stdtwadmin.$(OBJEXT) \ twadmin.$(OBJEXT) twadmincl.$(OBJEXT) twadminerrors.$(OBJEXT) \ twadminmain.$(OBJEXT) twadminstrings.$(OBJEXT) twadmin_OBJECTS = $(am_twadmin_OBJECTS) twadmin_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(twadmin_SOURCES) DIST_SOURCES = $(twadmin_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(twadmin_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -88,7 +213,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -96,6 +221,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -107,6 +233,7 @@ LN = @LN@ LN_S = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -123,21 +250,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -167,19 +297,28 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. +twadmindir = . twadmin_SOURCES = \ keygeneration.cpp stdtwadmin.cpp twadmin.cpp twadmincl.cpp \ twadminerrors.cpp twadminmain.cpp twadminstrings.cpp +twadmin_HEADERS = \ + keygeneration.h resource.h stdtwadmin.h twadmin.h \ + twadmincl.h twadminerrors.h twadminstrings.h + CLEANFILES = ../../bin/twadmin all: all-am @@ -189,15 +328,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twadmin/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/twadmin/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twadmin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/twadmin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -214,32 +352,53 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) -twadmin$(EXEEXT): $(twadmin_OBJECTS) $(twadmin_DEPENDENCIES) + +twadmin$(EXEEXT): $(twadmin_OBJECTS) $(twadmin_DEPENDENCIES) $(EXTRA_twadmin_DEPENDENCIES) @rm -f twadmin$(EXEEXT) - $(CXXLINK) $(twadmin_LDFLAGS) $(twadmin_OBJECTS) $(twadmin_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(twadmin_OBJECTS) $(twadmin_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -248,93 +407,120 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-twadminHEADERS: $(twadmin_HEADERS) + @$(NORMAL_INSTALL) + @list='$(twadmin_HEADERS)'; test -n "$(twadmindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(twadmindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(twadmindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(twadmindir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(twadmindir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-twadminHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(twadmin_HEADERS)'; test -n "$(twadmindir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(twadmindir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(twadmindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -346,17 +532,23 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -376,18 +568,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-twadminHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -406,22 +618,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS +uninstall-am: uninstall-sbinPROGRAMS uninstall-twadminHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip install-twadminHEADERS installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-sbinPROGRAMS + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-sbinPROGRAMS uninstall-twadminHEADERS + +.PRECIOUS: Makefile all: $(sbin_PROGRAMS) @test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/twadmin/keygeneration.cpp b/src/twadmin/keygeneration.cpp index 5edb2a8..f8843eb 100644 --- a/src/twadmin/keygeneration.cpp +++ b/src/twadmin/keygeneration.cpp @@ -42,13 +42,6 @@ #include "twadminstrings.h" #include "core/usernotify.h" - -#ifndef _DEBUG -const cElGamalSig::KeySize TRIPWIRE_PUBLIC_KEYSIZE = cElGamalSig::KEY1024; -#else -const cElGamalSig::KeySize TRIPWIRE_PUBLIC_KEYSIZE = cElGamalSig::KEY1024; -#endif - struct tGK { bool doneFlag; @@ -76,7 +69,7 @@ struct tGK } }; -static void GeneratePublicPrivateKeys(void* pParams) +static void GeneratePublicPrivateKeys(void* pParams, const cElGamalSig::KeySize key_size) { tGK* pGK = (tGK*)pParams; @@ -99,7 +92,7 @@ static void GeneratePublicPrivateKeys(void* pParams) try { - keyfile.GenerateKeys(TRIPWIRE_PUBLIC_KEYSIZE, pGK->passphrase, pGK->passphraseLen); + keyfile.GenerateKeys(key_size, pGK->passphrase, pGK->passphraseLen); } catch(eKeyFile&) { @@ -136,7 +129,7 @@ static void GeneratePublicPrivateKeys(void* pParams) return; } -bool GenerateKey(const TCHAR* keyPath, wc16_string passphrase) +bool GenerateKey(const TCHAR* keyPath, wc16_string passphrase, const cElGamalSig::KeySize key_size) { #ifndef WORDS_BIGENDIAN passphrase.swapbytes(); @@ -160,7 +153,7 @@ bool GenerateKey(const TCHAR* keyPath, wc16_string passphrase) gk.keyPath = keyPath; #if IS_UNIX - GeneratePublicPrivateKeys(&gk); + GeneratePublicPrivateKeys(&gk, key_size); #endif if (gk.retValue != tGK::OK) diff --git a/src/twadmin/keygeneration.h b/src/twadmin/keygeneration.h index d2fe8fc..69be7df 100644 --- a/src/twadmin/keygeneration.h +++ b/src/twadmin/keygeneration.h @@ -44,7 +44,9 @@ #include "core/wchar16.h" #endif -bool GenerateKey(const TCHAR* keyPath, wc16_string passphrase); +#include "twcrypto/crypto.h" + +bool GenerateKey(const TCHAR* keyPath, wc16_string passphrase, const cElGamalSig::KeySize key_size); #endif diff --git a/src/twadmin/twadmincl.cpp b/src/twadmin/twadmincl.cpp index 0dc5012..f259640 100644 --- a/src/twadmin/twadmincl.cpp +++ b/src/twadmin/twadmincl.cpp @@ -63,7 +63,7 @@ #include "core/displayencoder.h" //Provide a swab() impl. from glibc, for platforms that don't have one -#if defined(__SYLLABLE__) || defined(__ANDROID_API__) || defined(_SORTIX_SOURCE) +#if NEEDS_SWAB_IMPL void swab (const void *bfrom, void *bto, ssize_t n) { const char *from = (const char *) bfrom; @@ -1625,6 +1625,7 @@ private: wc16_string mLocalPassphrase; bool mGenerateSite; // A Site key has been specified. bool mGenerateLocal; // A Local key has been specified. + cElGamalSig::KeySize mKeySize; }; cTWAModeGenerateKeys::cTWAModeGenerateKeys() @@ -1633,6 +1634,7 @@ cTWAModeGenerateKeys::cTWAModeGenerateKeys() mSiteProvided = false; mGenerateSite = false; mGenerateLocal = false; + mKeySize = cElGamalSig::KEY1024; } cTWAModeGenerateKeys::~cTWAModeGenerateKeys() @@ -1648,6 +1650,8 @@ void cTWAModeGenerateKeys::InitCmdLineParser(cCmdLineParser& parser) parser.AddArg(cTWAdminCmdLine::LOCAL_KEY_FILE, TSTRING(_T("L")), TSTRING(_T("local-keyfile")), cCmdLineParser::PARAM_ONE); parser.AddArg(cTWAdminCmdLine::SITEPASSPHRASE, TSTRING(_T("Q")), TSTRING(_T("site-passphrase")), cCmdLineParser::PARAM_ONE); parser.AddArg(cTWAdminCmdLine::LOCALPASSPHRASE, TSTRING(_T("P")), TSTRING(_T("local-passphrase")), cCmdLineParser::PARAM_ONE); + parser.AddArg(cTWAdminCmdLine::KEY_SIZE, TSTRING(_T("K")), TSTRING(_T("key-size")), + cCmdLineParser::PARAM_ONE); } bool cTWAModeGenerateKeys::Init(const cConfigFile* cf, const cCmdLineParser& parser) @@ -1679,6 +1683,14 @@ bool cTWAModeGenerateKeys::Init(const cConfigFile* cf, const cCmdLineParser& par case cTWAdminCmdLine::LOCAL_KEY_FILE: mGenerateLocal = true; break; + case cTWAdminCmdLine::KEY_SIZE: + if(iter.ParamAt(0) == "2048") + mKeySize = cElGamalSig::KEY2048; + else if(iter.ParamAt(0) == "1024") + mKeySize = cElGamalSig::KEY1024; + else + throw eBadCmdLine(TSS_GetString(cTWAdmin, twadmin::STR_ERR2_INVALID_KEY_SIZE)); + break; } } @@ -1810,7 +1822,7 @@ int cTWAModeGenerateKeys::Execute(cErrorQueue* pQueue) // backup current file if it exists cFileUtil::BackupFile(mSiteKeyFile); - if (GenerateKey(mSiteKeyFile.c_str(), mSitePassphrase) == false) + if (GenerateKey(mSiteKeyFile.c_str(), mSitePassphrase, mKeySize) == false) return 1; } @@ -1856,7 +1868,7 @@ int cTWAModeGenerateKeys::Execute(cErrorQueue* pQueue) // backup current file if it exists cFileUtil::BackupFile(mLocalKeyFile); - if (GenerateKey(mLocalKeyFile.c_str(), mLocalPassphrase) == false) + if (GenerateKey(mLocalKeyFile.c_str(), mLocalPassphrase, mKeySize) == false) return 1; } diff --git a/src/twadmin/twadmincl.h b/src/twadmin/twadmincl.h index 9d319b2..1278071 100644 --- a/src/twadmin/twadmincl.h +++ b/src/twadmin/twadmincl.h @@ -119,6 +119,7 @@ public: LOCALPASSPHRASE, SITEPASSPHRASEOLD, LOCALPASSPHRASEOLD, + KEY_SIZE, PARAMS, // the final params diff --git a/src/twadmin/twadminstrings.cpp b/src/twadmin/twadminstrings.cpp index a3ecc86..769dc10 100644 --- a/src/twadmin/twadminstrings.cpp +++ b/src/twadmin/twadminstrings.cpp @@ -39,9 +39,16 @@ #include "twadmin.h" #include "twadminstrings.h" +#if IS_AROS +# define VERSION_PREFIX "$VER: " +#else +# define VERSION_PREFIX "@(#)" +#endif + TSS_BeginStringtable( cTWAdmin ) TSS_StringEntry( twadmin::STR_TWADMIN_VERSION, _T("twadmin: Tripwire administrative tool.\n") ), + TSS_StringEntry( twadmin::STR_EMBEDDED_VERSION, _T(VERSION_PREFIX "twadmin " PACKAGE_VERSION)), TSS_StringEntry( twadmin::STR_TWADMIN_USAGE_SUMMARY, _T("Usage:\n") @@ -175,6 +182,7 @@ TSS_BeginStringtable( cTWAdmin ) _T(" -S sitekey --site-keyfile sitekey\n") _T(" -P passphrase --local-passphrase passphrase\n") _T(" -Q passphrase --site-passphrase passphrase\n") + _T(" -K size --key-size size [1024 or 2048]\n") _T("\n") _T("The -v and -s options are mutually exclusive.\n") _T("Exactly one of -S or -L must be specified.\n") @@ -294,5 +302,7 @@ TSS_BeginStringtable( cTWAdmin ) TSS_StringEntry( twadmin::STR_ERR2_CREATE_CFG_SITEKEY_MISMATCH2, _T("\" does not match the keyfile specified in the new config file text \"") ), TSS_StringEntry( twadmin::STR_ERR2_CREATE_CFG_SITEKEY_MISMATCH3, _T("\".") ), + TSS_StringEntry( twadmin::STR_ERR2_INVALID_KEY_SIZE, _T("Invalid key size specified. Valid sizes are 1024 & 2048 bits.") ), + TSS_EndStringtable( cTWAdmin ) diff --git a/src/twadmin/twadminstrings.h b/src/twadmin/twadminstrings.h index 7262fa7..4acaf26 100644 --- a/src/twadmin/twadminstrings.h +++ b/src/twadmin/twadminstrings.h @@ -45,6 +45,7 @@ TSS_BeginStringIds( twadmin ) STR_TWADMIN_VERSION, + STR_EMBEDDED_VERSION, STR_TWADMIN_USAGE_SUMMARY, STR_TWADMIN_HELP_CREATE_CFGFILE, STR_TWADMIN_HELP_PRINT_CFGFILE, @@ -151,7 +152,9 @@ TSS_BeginStringIds( twadmin ) STR_ERR2_CREATE_CFG_MISSING_KEYFILE, STR_ERR2_CREATE_CFG_SITEKEY_MISMATCH1, STR_ERR2_CREATE_CFG_SITEKEY_MISMATCH2, - STR_ERR2_CREATE_CFG_SITEKEY_MISMATCH3 + STR_ERR2_CREATE_CFG_SITEKEY_MISMATCH3, + + STR_ERR2_INVALID_KEY_SIZE TSS_EndStringIds( twadmin ) diff --git a/src/twcrypto/Makefile.am b/src/twcrypto/Makefile.am index 7685ffd..27d1fd3 100644 --- a/src/twcrypto/Makefile.am +++ b/src/twcrypto/Makefile.am @@ -1,13 +1,18 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libtwcrypto.a +libtwcrypto_adir=. libtwcrypto_a_SOURCES = \ bytequeue.cpp crypto.cpp cryptoarchive.cpp keyfile.cpp \ stdtwcrypto.cpp twcrypto.cpp twcryptoerrors.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +libtwcrypto_a_HEADERS = \ + bytequeue.h crypto.h cryptoarchive.h keyfile.h \ + stdtwcrypto.h twcrypto.h twcryptoerrors.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libtwcrypto_a_OBJECTS) diff --git a/src/twcrypto/Makefile.in b/src/twcrypto/Makefile.in index 855b82a..e34e90f 100644 --- a/src/twcrypto/Makefile.in +++ b/src/twcrypto/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libtwcrypto_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/twcrypto -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libtwcrypto_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtwcrypto_a_AR = $(AR) $(ARFLAGS) libtwcrypto_a_LIBADD = am_libtwcrypto_a_OBJECTS = bytequeue.$(OBJEXT) crypto.$(OBJEXT) \ @@ -57,23 +115,95 @@ am_libtwcrypto_a_OBJECTS = bytequeue.$(OBJEXT) crypto.$(OBJEXT) \ stdtwcrypto.$(OBJEXT) twcrypto.$(OBJEXT) \ twcryptoerrors.$(OBJEXT) libtwcrypto_a_OBJECTS = $(am_libtwcrypto_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libtwcrypto_a_SOURCES) DIST_SOURCES = $(libtwcrypto_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libtwcrypto_adir)" +HEADERS = $(libtwcrypto_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -89,7 +219,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -97,6 +227,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -108,6 +239,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -124,21 +256,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -168,19 +303,28 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libtwcrypto.a +libtwcrypto_adir = . libtwcrypto_a_SOURCES = \ bytequeue.cpp crypto.cpp cryptoarchive.cpp keyfile.cpp \ stdtwcrypto.cpp twcrypto.cpp twcryptoerrors.cpp +libtwcrypto_a_HEADERS = \ + bytequeue.h crypto.h cryptoarchive.h keyfile.h \ + stdtwcrypto.h twcrypto.h twcryptoerrors.h + all: all-am .SUFFIXES: @@ -189,15 +333,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twcrypto/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/twcrypto/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twcrypto/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/twcrypto/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -214,13 +357,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtwcrypto.a: $(libtwcrypto_a_OBJECTS) $(libtwcrypto_a_DEPENDENCIES) - -rm -f libtwcrypto.a - $(libtwcrypto_a_AR) libtwcrypto.a $(libtwcrypto_a_OBJECTS) $(libtwcrypto_a_LIBADD) - $(RANLIB) libtwcrypto.a + +libtwcrypto.a: $(libtwcrypto_a_OBJECTS) $(libtwcrypto_a_DEPENDENCIES) $(EXTRA_libtwcrypto_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtwcrypto.a + $(AM_V_AR)$(libtwcrypto_a_AR) libtwcrypto.a $(libtwcrypto_a_OBJECTS) $(libtwcrypto_a_LIBADD) + $(AM_V_at)$(RANLIB) libtwcrypto.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -229,91 +374,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libtwcrypto_aHEADERS: $(libtwcrypto_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libtwcrypto_a_HEADERS)'; test -n "$(libtwcrypto_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libtwcrypto_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libtwcrypto_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtwcrypto_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtwcrypto_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libtwcrypto_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libtwcrypto_a_HEADERS)'; test -n "$(libtwcrypto_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libtwcrypto_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libtwcrypto_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -324,16 +499,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -353,18 +534,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libtwcrypto_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -383,22 +584,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libtwcrypto_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libtwcrypto_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libtwcrypto_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libtwcrypto_a_OBJECTS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/twparser/Makefile.am b/src/twparser/Makefile.am index 138b838..bf75900 100644 --- a/src/twparser/Makefile.am +++ b/src/twparser/Makefile.am @@ -1,14 +1,20 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libtwparser.a +libtwparser_adir=. libtwparser_a_SOURCES = \ genreparseinfo.cpp parserhelper.cpp parserobjects.cpp \ policyparser.cpp stdtwparser.cpp twparser.cpp twparsererrors.cpp \ twparserstrings.cpp yylex.cpp yyparse.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +libtwparser_a_HEADERS = \ + genreparseinfo.h parserhelper.h parserobjects.h policyparser.h \ + stdtwparser.h twparser.h twparsererrors.h twparserstrings.h \ + yylex.h yyparse.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libtwparser_a_OBJECTS) diff --git a/src/twparser/Makefile.in b/src/twparser/Makefile.in index afc136d..d793002 100644 --- a/src/twparser/Makefile.in +++ b/src/twparser/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libtwparser_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,20 +87,27 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/twparser -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libtwparser_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtwparser_a_AR = $(AR) $(ARFLAGS) libtwparser_a_LIBADD = am_libtwparser_a_OBJECTS = genreparseinfo.$(OBJEXT) \ @@ -58,23 +116,95 @@ am_libtwparser_a_OBJECTS = genreparseinfo.$(OBJEXT) \ twparser.$(OBJEXT) twparsererrors.$(OBJEXT) \ twparserstrings.$(OBJEXT) yylex.$(OBJEXT) yyparse.$(OBJEXT) libtwparser_a_OBJECTS = $(am_libtwparser_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libtwparser_a_SOURCES) DIST_SOURCES = $(libtwparser_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libtwparser_adir)" +HEADERS = $(libtwparser_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -90,7 +220,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -98,6 +228,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -109,6 +240,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -125,21 +257,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -169,20 +304,30 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libtwparser.a +libtwparser_adir = . libtwparser_a_SOURCES = \ genreparseinfo.cpp parserhelper.cpp parserobjects.cpp \ policyparser.cpp stdtwparser.cpp twparser.cpp twparsererrors.cpp \ twparserstrings.cpp yylex.cpp yyparse.cpp +libtwparser_a_HEADERS = \ + genreparseinfo.h parserhelper.h parserobjects.h policyparser.h \ + stdtwparser.h twparser.h twparsererrors.h twparserstrings.h \ + yylex.h yyparse.h + all: all-am .SUFFIXES: @@ -191,15 +336,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twparser/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/twparser/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twparser/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/twparser/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -216,13 +360,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtwparser.a: $(libtwparser_a_OBJECTS) $(libtwparser_a_DEPENDENCIES) - -rm -f libtwparser.a - $(libtwparser_a_AR) libtwparser.a $(libtwparser_a_OBJECTS) $(libtwparser_a_LIBADD) - $(RANLIB) libtwparser.a + +libtwparser.a: $(libtwparser_a_OBJECTS) $(libtwparser_a_DEPENDENCIES) $(EXTRA_libtwparser_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtwparser.a + $(AM_V_AR)$(libtwparser_a_AR) libtwparser.a $(libtwparser_a_OBJECTS) $(libtwparser_a_LIBADD) + $(AM_V_at)$(RANLIB) libtwparser.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -231,91 +377,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libtwparser_aHEADERS: $(libtwparser_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libtwparser_a_HEADERS)'; test -n "$(libtwparser_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libtwparser_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libtwparser_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libtwparser_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libtwparser_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libtwparser_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libtwparser_a_HEADERS)'; test -n "$(libtwparser_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libtwparser_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libtwparser_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -326,16 +502,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -355,18 +537,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libtwparser_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -385,22 +587,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libtwparser_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libtwparser_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libtwparser_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libtwparser_a_OBJECTS) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/twparser/parserhelper.cpp b/src/twparser/parserhelper.cpp index b5543d1..5f1fc57 100644 --- a/src/twparser/parserhelper.cpp +++ b/src/twparser/parserhelper.cpp @@ -430,18 +430,11 @@ void cParserUtil::InterpretEscapedString( const std::string& strEscapedString, T // leaves it alone. After we have the wide string, we convert these encoded Unicode chars into true 16 bit // Unicode chars. - #ifdef _UNICODE - typedef char INTERCHAR; - const char unicodeEscape = '\x01'; // This value must be chosen carefully so not to conflict with escape chars or mb chars - const char unicodeBase = 'A'; // This value must not fool the convertion from single to multibyte - bool unicodeWasEscaped = false; - std::string strIntermediateString; - #else + // for unix we cheat a bit and do the initial interpretation // directly to the final string. typedef TCHAR INTERCHAR; TSTRING& strIntermediateString = strInterpretedString; - #endif const char* pchCur = strEscapedString.c_str(); @@ -451,15 +444,6 @@ void cParserUtil::InterpretEscapedString( const std::string& strEscapedString, T { if( *pchCur != '\\' ) // just regular char { - #ifdef _UNICODE - // check for our special unicode escape char, and escape it if necessary - if ( *pchCur == unicodeEscape ) - { - strIntermediateString += unicodeEscape; - unicodeWasEscaped = true; - } - #endif - strIntermediateString += *pchCur; } else // deal with escaped character sequence @@ -497,10 +481,6 @@ void cParserUtil::InterpretEscapedString( const std::string& strEscapedString, T { throw eParserBadHex( cStringUtil::StrToTstr( pchCur - (( nCharsRead == 0 ) ? 0 : nCharsRead - 1) ) ); } - - // For non-unicode Unix, we don't support > 0xff characters. - // Unicode Windows supports it just fine. - #ifndef _UNICODE else if (wcEscapedChar > 0xff) { throw eParserBadHex( cStringUtil::StrToTstr( pchCur - (( nCharsRead == 0 ) ? 0 : nCharsRead - 1) ) ); @@ -509,21 +489,6 @@ void cParserUtil::InterpretEscapedString( const std::string& strEscapedString, T { strIntermediateString += static_cast(wcEscapedChar); } - #else - else if (wcEscapedChar <= 0xff) - { - strIntermediateString += static_cast(wcEscapedChar); - } - else - { - strIntermediateString += unicodeEscape; - strIntermediateString += static_cast((wcEscapedChar >> 12 & 0xf) + unicodeBase); - strIntermediateString += static_cast((wcEscapedChar >> 8 & 0xf) + unicodeBase); - strIntermediateString += static_cast((wcEscapedChar >> 4 & 0xf) + unicodeBase); - strIntermediateString += static_cast((wcEscapedChar & 0xf) + unicodeBase); - unicodeWasEscaped = true; - } - #endif } else if( util_IsOctal( *pchCur ) ) // deal with \xxx where 'x' is an octal digit { @@ -538,48 +503,6 @@ void cParserUtil::InterpretEscapedString( const std::string& strEscapedString, T } } - #ifdef _UNICODE - // now convert to the wide vertion - strInterpretedString = cStringUtil::StrToTstr(strIntermediateString); - - // search for unicode escapes - if (unicodeWasEscaped) - { - TSTRING::iterator i; - for (i = strInterpretedString.begin(); i != strInterpretedString.end(); ++i) - { - if (*i == static_cast(unicodeEscape)) - { - i = strInterpretedString.erase(i); - ASSERT(i != strInterpretedString.end()); // This would indicate a logic error above - - if (*i != static_cast(unicodeEscape)) // check that this is escaped unicode - { - wchar_t wc; - TSTRING::iterator j = i; - - ASSERT(*j >= unicodeBase && *j < unicodeBase + 16); - wc = static_cast((*j++ - unicodeBase) << 12); - ASSERT(j != strInterpretedString.end()); - - ASSERT(*j >= unicodeBase && *j < unicodeBase + 16); - wc |= static_cast((*j++ - unicodeBase) << 8); - ASSERT(j != strInterpretedString.end()); - - ASSERT(*j >= unicodeBase && *j < unicodeBase + 16); - wc |= static_cast((*j++ - unicodeBase) << 4); - ASSERT(j != strInterpretedString.end()); - - ASSERT(*j >= unicodeBase && *j < unicodeBase + 16); - wc |= static_cast((*j++ - unicodeBase)); - i = strInterpretedString.erase(i, j); - i = strInterpretedString.insert(i, wc); - } - } - } - } - #endif - #ifdef _DEBUG std::string str; diff --git a/src/twparser/policyparser.cpp b/src/twparser/policyparser.cpp index a01d7df..bdedd97 100644 --- a/src/twparser/policyparser.cpp +++ b/src/twparser/policyparser.cpp @@ -139,17 +139,7 @@ void cPolicyParser::Execute( cGenreSpecListVector& policy, cErrorBucket* pError void tw_yy_scan::yyerror( const char* pszErr, ... ) //throw( eParserHelper ) { TOSTRINGSTREAM ssError; // final error string - -#ifdef _UNICODE - // passed in strings are narrow so we need to convert them to wide - wchar_t szErrorW[1024]; - size_t nWrote = ::mbstowcs( szErrorW, pszErr, strlen( pszErr ) + 1 ); - if ( nWrote == (size_t)-1 ) - throw eCharacterEncoding( TSS_GetString( cCore, core::STR_ERR_BADCHAR ) ); - ssError << szErrorW; -#else ssError << pszErr; -#endif throw eParseFailed( ssError.str() ); } @@ -219,7 +209,7 @@ std::string convert_to_encoded_hex( char ch ) std::string util_ConvertMB( const std::string& sIn ) { -#if defined(__ANDROID_API__) || defined(__AROS__) +#if !USES_MBLEN return sIn; #else cDebug d( "cPolicyParser::util_ConvertMB" ); diff --git a/src/twprint/Makefile.am b/src/twprint/Makefile.am index 5e6ee90..7973565 100644 --- a/src/twprint/Makefile.am +++ b/src/twprint/Makefile.am @@ -1,17 +1,22 @@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. LIBS = -ltripwire -lcryptlib @LIBS@ LDFLAGS = @LDFLAGS@ -L../../lib LN_S = @LN@ sbin_PROGRAMS = twprint +twprintdir=. twprint_SOURCES = \ stdtwprint.cpp twprint.cpp twprintcmdline.cpp twprinterrors.cpp \ twprintmain.cpp twprintstrings.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +twprint_HEADERS = \ + resource.h stdtwprint.h twprint.h twprintcmdline.h \ + twprinterrors.h twprintstrings.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit CLEANFILES = ../../bin/twprint all: $(sbin_PROGRAMS) diff --git a/src/twprint/Makefile.in b/src/twprint/Makefile.in index 4b4a64a..852d5f7 100644 --- a/src/twprint/Makefile.in +++ b/src/twprint/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(twprint_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,43 +87,117 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ sbin_PROGRAMS = twprint$(EXEEXT) subdir = src/twprint -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(twprint_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(twprintdir)" PROGRAMS = $(sbin_PROGRAMS) am_twprint_OBJECTS = stdtwprint.$(OBJEXT) twprint.$(OBJEXT) \ twprintcmdline.$(OBJEXT) twprinterrors.$(OBJEXT) \ twprintmain.$(OBJEXT) twprintstrings.$(OBJEXT) twprint_OBJECTS = $(am_twprint_OBJECTS) twprint_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(twprint_SOURCES) DIST_SOURCES = $(twprint_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(twprint_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -88,7 +213,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -96,6 +221,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -107,6 +233,7 @@ LN = @LN@ LN_S = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -123,21 +250,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -167,19 +297,28 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. +twprintdir = . twprint_SOURCES = \ stdtwprint.cpp twprint.cpp twprintcmdline.cpp twprinterrors.cpp \ twprintmain.cpp twprintstrings.cpp +twprint_HEADERS = \ + resource.h stdtwprint.h twprint.h twprintcmdline.h \ + twprinterrors.h twprintstrings.h + CLEANFILES = ../../bin/twprint all: all-am @@ -189,15 +328,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twprint/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/twprint/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twprint/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/twprint/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -214,32 +352,53 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) -twprint$(EXEEXT): $(twprint_OBJECTS) $(twprint_DEPENDENCIES) + +twprint$(EXEEXT): $(twprint_OBJECTS) $(twprint_DEPENDENCIES) $(EXTRA_twprint_DEPENDENCIES) @rm -f twprint$(EXEEXT) - $(CXXLINK) $(twprint_LDFLAGS) $(twprint_OBJECTS) $(twprint_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(twprint_OBJECTS) $(twprint_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -248,93 +407,120 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-twprintHEADERS: $(twprint_HEADERS) + @$(NORMAL_INSTALL) + @list='$(twprint_HEADERS)'; test -n "$(twprintdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(twprintdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(twprintdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(twprintdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(twprintdir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-twprintHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(twprint_HEADERS)'; test -n "$(twprintdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(twprintdir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(twprintdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -346,17 +532,23 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -376,18 +568,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-twprintHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -406,22 +618,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS +uninstall-am: uninstall-sbinPROGRAMS uninstall-twprintHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip install-twprintHEADERS installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-sbinPROGRAMS + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-sbinPROGRAMS uninstall-twprintHEADERS + +.PRECIOUS: Makefile all: $(sbin_PROGRAMS) @test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/twprint/twprintcmdline.cpp b/src/twprint/twprintcmdline.cpp index 3057b09..7e10372 100644 --- a/src/twprint/twprintcmdline.cpp +++ b/src/twprint/twprintcmdline.cpp @@ -288,14 +288,7 @@ static void FillOutCmdLineInfo(cTWPrintModeCommon* pModeInfo, const cCmdLinePars { // this bites! I have to make sure it is a narrow char string ASSERT(iter.NumParams() > 0); // should be caught by cmd line parser -#ifdef _UNICODE - char* buf = new char[2*(wcslen(iter.ParamAt(0).c_str()) + 1)]; - wcstombs(buf, iter.ParamAt(0).c_str(), sizeof(buf)); - pModeInfo->mPassPhrase = buf; - delete [] buf; -#else pModeInfo->mPassPhrase = iter.ParamAt(0); -#endif } break; case cTWPrintCmdLine::REPORTLEVEL: diff --git a/src/twprint/twprintstrings.cpp b/src/twprint/twprintstrings.cpp index 42eac57..1930851 100644 --- a/src/twprint/twprintstrings.cpp +++ b/src/twprint/twprintstrings.cpp @@ -39,6 +39,12 @@ #include "twprint.h" #include "twprintstrings.h" +#if IS_AROS +# define VERSION_PREFIX "$VER: " +#else +# define VERSION_PREFIX "@(#)" +#endif + TSS_BeginStringtable( cTWPrint ) TSS_StringEntry( twprint::STR_TWPRINT_USAGE_SUMMARY, @@ -82,7 +88,8 @@ TSS_BeginStringtable( cTWPrint ) _T("\n") ), - TSS_StringEntry( twprint::STR_TWPRINT_VERSION, _T("twprint: Tripwire database and report printer.\n") ), + TSS_StringEntry( twprint::STR_TWPRINT_VERSION, _T("twprint: Tripwire database and report printer.\n") ), + TSS_StringEntry( twprint::STR_EMBEDDED_VERSION, _T(VERSION_PREFIX "twprint " PACKAGE_VERSION)), TSS_EndStringtable( cTWPrint ) diff --git a/src/twprint/twprintstrings.h b/src/twprint/twprintstrings.h index 2acac1f..f233b02 100644 --- a/src/twprint/twprintstrings.h +++ b/src/twprint/twprintstrings.h @@ -47,7 +47,8 @@ TSS_BeginStringIds( twprint ) STR_TWPRINT_USAGE_SUMMARY, STR_TWPRINT_HELP_PRINT_REPORT, STR_TWPRINT_HELP_PRINT_DATABASE, - STR_TWPRINT_VERSION + STR_TWPRINT_VERSION, + STR_EMBEDDED_VERSION TSS_EndStringIds( twprint ) diff --git a/src/twtest/Makefile.am b/src/twtest/Makefile.am index f7fe7c0..b0d9824 100644 --- a/src/twtest/Makefile.am +++ b/src/twtest/Makefile.am @@ -1,14 +1,19 @@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. LIBS = -ltripwire -lcryptlib @LIBS@ LDFLAGS = @LDFLAGS@ -L../../lib LN_S = @LN@ sbin_PROGRAMS = twtest + +twtestdir=. + twtest_SOURCES = \ archive_t.cpp \ +blockfile_t.cpp \ +blockrecordarray_t.cpp \ charutil_t.cpp \ cmdlineparser_t.cpp \ codeconvert_t.cpp \ @@ -48,6 +53,7 @@ genrespeclist_t.cpp \ genreswitcher_t.cpp \ growheap_t.cpp \ hashtable_t.cpp \ +hierdatabase_t.cpp \ keyfile_t.cpp \ objectpool_t.cpp \ platform_t.cpp \ @@ -73,7 +79,9 @@ unixfsservices_t.cpp \ usernotifystdout_t.cpp \ wchar16_t.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +twtest_HEADERS = stdtest.h stringutil_t.h test.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit CLEANFILES = ../../bin/twtest all: $(sbin_PROGRAMS) diff --git a/src/twtest/Makefile.in b/src/twtest/Makefile.in old mode 100755 new mode 100644 index 8eba23d..ca9c7e7 --- a/src/twtest/Makefile.in +++ b/src/twtest/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(twtest_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,22 +87,26 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ sbin_PROGRAMS = twtest$(EXEEXT) subdir = src/twtest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(twtest_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" -sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(twtestdir)" PROGRAMS = $(sbin_PROGRAMS) -am_twtest_OBJECTS = archive_t.$(OBJEXT) charutil_t.$(OBJEXT) \ +am_twtest_OBJECTS = archive_t.$(OBJEXT) blockfile_t.$(OBJEXT) \ + blockrecordarray_t.$(OBJEXT) charutil_t.$(OBJEXT) \ cmdlineparser_t.$(OBJEXT) codeconvert_t.$(OBJEXT) \ configfile_t.$(OBJEXT) cryptoarchive_t.$(OBJEXT) \ crytpo_t.$(OBJEXT) dbdatasource_t.$(OBJEXT) debug_t.$(OBJEXT) \ @@ -69,7 +124,8 @@ am_twtest_OBJECTS = archive_t.$(OBJEXT) charutil_t.$(OBJEXT) \ fspropcalc_t.$(OBJEXT) fspropdisplayer_t.$(OBJEXT) \ fspropset_t.$(OBJEXT) fsspec_t.$(OBJEXT) genre_t.$(OBJEXT) \ genrespeclist_t.$(OBJEXT) genreswitcher_t.$(OBJEXT) \ - growheap_t.$(OBJEXT) hashtable_t.$(OBJEXT) keyfile_t.$(OBJEXT) \ + growheap_t.$(OBJEXT) hashtable_t.$(OBJEXT) \ + hierdatabase_t.$(OBJEXT) keyfile_t.$(OBJEXT) \ objectpool_t.$(OBJEXT) platform_t.$(OBJEXT) \ policyparser_t.$(OBJEXT) refcountobj_t.$(OBJEXT) \ resources_t.$(OBJEXT) serializer_t.$(OBJEXT) \ @@ -82,27 +138,106 @@ am_twtest_OBJECTS = archive_t.$(OBJEXT) charutil_t.$(OBJEXT) \ wchar16_t.$(OBJEXT) twtest_OBJECTS = $(am_twtest_OBJECTS) twtest_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(twtest_SOURCES) DIST_SOURCES = $(twtest_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +HEADERS = $(twtest_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -118,7 +253,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -126,6 +261,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -137,6 +273,7 @@ LN = @LN@ LN_S = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -153,21 +290,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -197,17 +337,24 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies AM_INSTALL_PROGRAM_FLAGS = -m 755 -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. +twtestdir = . twtest_SOURCES = \ archive_t.cpp \ +blockfile_t.cpp \ +blockrecordarray_t.cpp \ charutil_t.cpp \ cmdlineparser_t.cpp \ codeconvert_t.cpp \ @@ -247,6 +394,7 @@ genrespeclist_t.cpp \ genreswitcher_t.cpp \ growheap_t.cpp \ hashtable_t.cpp \ +hierdatabase_t.cpp \ keyfile_t.cpp \ objectpool_t.cpp \ platform_t.cpp \ @@ -272,6 +420,7 @@ unixfsservices_t.cpp \ usernotifystdout_t.cpp \ wchar16_t.cpp +twtest_HEADERS = stdtest.h stringutil_t.h test.h CLEANFILES = ../../bin/twtest all: all-am @@ -281,15 +430,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twtest/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/twtest/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/twtest/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/twtest/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -306,32 +454,53 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ - rm -f "$(DESTDIR)$(sbindir)/$$f"; \ - done + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) -twtest$(EXEEXT): $(twtest_OBJECTS) $(twtest_DEPENDENCIES) + +twtest$(EXEEXT): $(twtest_OBJECTS) $(twtest_DEPENDENCIES) $(EXTRA_twtest_DEPENDENCIES) @rm -f twtest$(EXEEXT) - $(CXXLINK) $(twtest_LDFLAGS) $(twtest_OBJECTS) $(twtest_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(twtest_OBJECTS) $(twtest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -340,93 +509,120 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-twtestHEADERS: $(twtest_HEADERS) + @$(NORMAL_INSTALL) + @list='$(twtest_HEADERS)'; test -n "$(twtestdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(twtestdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(twtestdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(twtestdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(twtestdir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-twtestHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(twtest_HEADERS)'; test -n "$(twtestdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(twtestdir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(sbindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(twtestdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -438,17 +634,23 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -468,18 +670,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-twtestHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: install-sbinPROGRAMS +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -498,22 +720,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS +uninstall-am: uninstall-sbinPROGRAMS uninstall-twtestHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-sbinPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-sbinPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ + install-strip install-twtestHEADERS installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-sbinPROGRAMS + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-sbinPROGRAMS uninstall-twtestHEADERS + +.PRECIOUS: Makefile all: $(sbin_PROGRAMS) @test -d ../../bin && $(LN) -f $(sbin_PROGRAMS) ../../bin + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/db/blockfile_t.cpp b/src/twtest/blockfile_t.cpp similarity index 97% rename from src/db/blockfile_t.cpp rename to src/twtest/blockfile_t.cpp index 340f555..65089e9 100644 --- a/src/db/blockfile_t.cpp +++ b/src/twtest/blockfile_t.cpp @@ -30,11 +30,11 @@ // info@tripwire.org or www.tripwire.org. // // blockfile_t -#include "stddb.h" -#include "blockfile.h" -#include "block.h" +#include "db/stddb.h" +#include "db/blockfile.h" +#include "db/block.h" #include "core/archive.h" -#include "test/test.h" +#include "test.h" #include "core/debug.h" void TestBlockFile() diff --git a/src/db/blockrecordarray_t.cpp b/src/twtest/blockrecordarray_t.cpp similarity index 99% rename from src/db/blockrecordarray_t.cpp rename to src/twtest/blockrecordarray_t.cpp index 181b7a2..4af4aff 100644 --- a/src/db/blockrecordarray_t.cpp +++ b/src/twtest/blockrecordarray_t.cpp @@ -31,9 +31,9 @@ // // blockrecordarray_t.cpp -#include "stddb.h" +#include "db/stddb.h" #include "db/blockrecordarray.h" -#include "test/test.h" +#include "test.h" #include "core/debug.h" #include "core/error.h" diff --git a/src/twtest/displayencoder_t.cpp b/src/twtest/displayencoder_t.cpp index ce3bc80..39935d2 100644 --- a/src/twtest/displayencoder_t.cpp +++ b/src/twtest/displayencoder_t.cpp @@ -50,13 +50,9 @@ // UTIL /////////////////////////////////////////////////////////////////////////////// -#ifdef _UNICODE - #define TSS_TCHAR_MIN WCHAR_MIN - #define TSS_TCHAR_MAX WCHAR_MAX -#else - #define TSS_TCHAR_MIN CHAR_MIN - #define TSS_TCHAR_MAX CHAR_MAX -#endif +#define TSS_TCHAR_MIN CHAR_MIN +#define TSS_TCHAR_MAX CHAR_MAX + template< class CharT > bool IsPrintable( const std::basic_string< CharT >& str ) { @@ -288,12 +284,8 @@ public: //============================================================= TSTRING strMessWithMe = _T("Mess with me..."); for( size_t c = TSS_TCHAR_MIN; - c < TSS_TCHAR_MAX; -#ifdef _UNICODE - c += ( TSS_TCHAR_MAX / 150 ) ) -#else + c < TSS_TCHAR_MAX; c++ ) -#endif { if( ( c != '\0' ) ) { @@ -322,12 +314,8 @@ public: //============================================================= TSTRING strMessWithMe2 = _T("Mess with me..."); for( size_t ch = TSS_TCHAR_MIN; - ch < TSS_TCHAR_MAX; -#ifdef _UNICODE - ch += ( TSS_TCHAR_MAX / 150 ) ) -#else + ch < TSS_TCHAR_MAX; ch++ ) -#endif { if( ( ch != '\0' ) ) { diff --git a/src/db/hierdatabase_t.cpp b/src/twtest/hierdatabase_t.cpp similarity index 99% rename from src/db/hierdatabase_t.cpp rename to src/twtest/hierdatabase_t.cpp index 064fc53..62d517c 100644 --- a/src/db/hierdatabase_t.cpp +++ b/src/twtest/hierdatabase_t.cpp @@ -30,9 +30,9 @@ // info@tripwire.org or www.tripwire.org. // // hierdatabase_t -#include "stddb.h" -#include "hierdatabase.h" -#include "test/test.h" +#include "db/stddb.h" +#include "db/hierdatabase.h" +#include "test.h" #include "core/error.h" static void PrintDb( cHierDatabase::iterator iter, cDebug d, bool bFirst = true ) diff --git a/src/core/stringutil_t.h b/src/twtest/stringutil_t.h similarity index 99% rename from src/core/stringutil_t.h rename to src/twtest/stringutil_t.h index 64aefca..12a5bdf 100644 --- a/src/core/stringutil_t.h +++ b/src/twtest/stringutil_t.h @@ -41,10 +41,10 @@ #ifndef __STRINGUTIL_T_H #define __STRINGUTIL_T_H -#include "ntmbs.h" +#include "core/ntmbs.h" #if USING_NTDBS_STUFF -#include "ntdbs.h" +#include "core/ntdbs.h" #endif // USING_NTDBS_STUFF //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/twtest/test.cpp b/src/twtest/test.cpp index 07023ce..c77e7ff 100644 --- a/src/twtest/test.cpp +++ b/src/twtest/test.cpp @@ -146,7 +146,7 @@ void TestFileUtil(); void TestFCONameTranslator(); void TestCodeConverter(); /// This is easier than all the (cpp) files and declarations -#include "core/stringutil_t.h" +#include "stringutil_t.h" void Usage() { diff --git a/src/twtest/textreportviewer_t.cpp b/src/twtest/textreportviewer_t.cpp index dfa13da..c6287e0 100644 --- a/src/twtest/textreportviewer_t.cpp +++ b/src/twtest/textreportviewer_t.cpp @@ -418,8 +418,8 @@ void MakeFile( TSTRING& strNameMakeMe ) std::string strA; for( TSTRING::iterator i = strNameMakeMe.begin(); i != strNameMakeMe.end(); i++ ) { - char ach[4]; - ASSERT( MB_CUR_MAX <= 4 ); + char ach[6]; + ASSERT( MB_CUR_MAX <= 6 ); int n = wctomb( ach, *i ); ASSERT( n != -1 ); diff --git a/src/twtest/twutil_t.cpp b/src/twtest/twutil_t.cpp index c96e4e4..3ed11e1 100644 --- a/src/twtest/twutil_t.cpp +++ b/src/twtest/twutil_t.cpp @@ -116,23 +116,6 @@ void TestTWUtil() std::string WideToNarrow( const TSTRING& strWide ) { -#ifdef _UNICODE - std::string strA; - for( TSTRING::const_iterator i = strWide.begin(); i != strWide.end(); i++ ) - { - char ach[4]; - ASSERT( MB_CUR_MAX <= 4 ); - - int n = wctomb( ach, *i ); - ASSERT( n != -1 ); - - for( int j = 0; j < n; j++ ) - strA += ach[j]; - } - - return strA; -#else - return strWide; -#endif + return strWide; } diff --git a/src/twtest/unixfsservices_t.cpp b/src/twtest/unixfsservices_t.cpp index 001ad5e..09fb401 100644 --- a/src/twtest/unixfsservices_t.cpp +++ b/src/twtest/unixfsservices_t.cpp @@ -119,23 +119,6 @@ void TestUnixFSServices() d.TraceDetail("Testing MakeTempFilename: \n"); d.TraceDetail("%s \n", _template.c_str() ); - //Test ChangeDir - d.TraceDetail("Testing ChangeDir: (should be /usr)\n"); - TSTRING newdir(_T("/usr")); - pFSServices->ChangeDir(newdir); - pFSServices->GetCurrentDir(currpath); - d.TraceDetail("%s \n", currpath.c_str() ); - //Did we get there?? - - //Test Mkdir: - d.TraceDetail("Testing Mkdir: \n"); - TSTRING makedir(_T("/tmp/tw_mkdir")); - pFSServices->Mkdir(makedir); // throws on error - - //Test Rmdir - d.TraceDetail("Testing Rmdir:\n"); - TEST( pFSServices->Rmdir(makedir) ); - // Test GetMachineName d.TraceDetail("Testing GetMachineName:\n"); TSTRING uname; diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 8a4b234..a268a3d 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -1,13 +1,17 @@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libutil.a +libutil_adir = . libutil_a_SOURCES = \ fileutil.cpp stdutil.cpp stringencoder.cpp \ util.cpp utilerrors.cpp utilstrings.cpp -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +libutil_a_HEADERS = fileutil.h miscutil.h stdutil.h \ + stringencoder.h util.h utilerrors.h utilstrings.h + +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libutil_a_OBJECTS) diff --git a/src/util/Makefile.in b/src/util/Makefile.in index 5f2b124..0559ab8 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,68 @@ @SET_MAKE@ -SOURCES = $(libutil_a_SOURCES) -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -36,43 +87,122 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ subdir = src/util -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(libutil_a_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libutil_a_AR = $(AR) $(ARFLAGS) libutil_a_LIBADD = am_libutil_a_OBJECTS = fileutil.$(OBJEXT) stdutil.$(OBJEXT) \ stringencoder.$(OBJEXT) util.$(OBJEXT) utilerrors.$(OBJEXT) \ utilstrings.$(OBJEXT) libutil_a_OBJECTS = $(am_libutil_a_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libutil_a_SOURCES) DIST_SOURCES = $(libutil_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libutil_adir)" +HEADERS = $(libutil_a_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -88,7 +218,7 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ # This gets rid of the -I. so INCLUDES must be more explicit +DEFS = @DEFS@ # This gets rid of the -I. so AM_CPPFLAGS must be more explicit DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -96,6 +226,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -107,6 +238,7 @@ LN = @LN@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -123,21 +255,24 @@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -167,19 +302,27 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies -INCLUDES = -I.. +AM_CPPFLAGS = -I$(srcdir)/.. noinst_LIBRARIES = libutil.a +libutil_adir = . libutil_a_SOURCES = \ fileutil.cpp stdutil.cpp stringencoder.cpp \ util.cpp utilerrors.cpp utilstrings.cpp +libutil_a_HEADERS = fileutil.h miscutil.h stdutil.h \ + stringencoder.h util.h utilerrors.h utilstrings.h + all: all-am .SUFFIXES: @@ -188,15 +331,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/util/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/util/Makefile -.PRECIOUS: Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/util/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/util/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -213,13 +355,15 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libutil.a: $(libutil_a_OBJECTS) $(libutil_a_DEPENDENCIES) - -rm -f libutil.a - $(libutil_a_AR) libutil.a $(libutil_a_OBJECTS) $(libutil_a_LIBADD) - $(RANLIB) libutil.a + +libutil.a: $(libutil_a_OBJECTS) $(libutil_a_DEPENDENCIES) $(EXTRA_libutil_a_DEPENDENCIES) + $(AM_V_at)-rm -f libutil.a + $(AM_V_AR)$(libutil_a_AR) libutil.a $(libutil_a_OBJECTS) $(libutil_a_LIBADD) + $(AM_V_at)$(RANLIB) libutil.a mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -228,91 +372,121 @@ distclean-compile: -rm -f *.tab.c .cpp.o: - $(CXXCOMPILE) -c -o $@ $< + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -uninstall-info-am: + $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-libutil_aHEADERS: $(libutil_a_HEADERS) + @$(NORMAL_INSTALL) + @list='$(libutil_a_HEADERS)'; test -n "$(libutil_adir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libutil_adir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libutil_adir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libutil_adir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libutil_adir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-libutil_aHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(libutil_a_HEADERS)'; test -n "$(libutil_adir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libutil_adir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: + for dir in "$(DESTDIR)$(libutil_adir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -323,16 +497,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -352,18 +532,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-libutil_aHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -382,23 +582,31 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: uninstall-libutil_aHEADERS -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libutil_aHEADERS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-libutil_aHEADERS + +.PRECIOUS: Makefile all: $(noinst_LIBRARIES) $(AR) ru ../../lib/libtripwire.a $(libutil_a_OBJECTS) $(RANLIB) ../../lib/libtripwire.a + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/touchconfig.sh b/touchconfig.sh index 9e3fbb3..2b6c8db 100755 --- a/touchconfig.sh +++ b/touchconfig.sh @@ -4,5 +4,6 @@ # and insists they need to be regenerated, though they really don't. # This script bumps the timestamps on the right files in the right order, # such that they don't all match, and make can proceed on its way. -touch configure.in acinclude.m4 aclocal.m4 configure Makefile.am Makefile.in +touch configure.ac acinclude.m4 aclocal.m4 configure Makefile.am Makefile.in config.h.in +