diff --git a/CHANGELOG b/CHANGELOG index b1322ba..d1aef02 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG 3054 2010-01-28 20:48:28Z chrfranke $ +$Id: CHANGELOG 3060 2010-02-03 22:16:40Z chrfranke $ The most recent version of this file is: http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/trunk/smartmontools/CHANGELOG?view=markup @@ -43,6 +43,139 @@ NOTES FOR FUTURE RELEASES: see TODO file. + [CF] drivedb.h update: + - Patriot Torqx SSD (patch provided by Gianpaolo Cugola) + + [CF] Makefile.am: Avoid duplication of man page filter script. + + [CF] smartd: Add option '-C, --capabilities' if libcap-ng is available + (ticket #45). + Support is added if libcap-ng is found during build. This can + be overridden by configure option '--with-libcap-ng=[auto|yes|no]'. + + Based on Debian patch: + http://patch-tracker.debian.org/patch/series/view/smartmontools/5.39-3/62_lowcap.patch + Modified to fix regression (ticket #41, Debian bug 564876). + + [CF] Bugfix release 5.39.1. + + [CF] Linux: Fix spin-up of SATA drive if '-n standby' is used + (ticket #37). For some reason, this happens if the SCSI/SAT + device is opened with O_RDWR instead of O_RDONLY. + + [CF] Windows: Fix parsing of 'tw_cli' output for 3ware 9.5.x release + (ticket #43). + + [CF] Add USB IDs of Seagate FreeAgent Go, Seagate Expansion Portable + and WD My Passport (IDE). + + [CF] autogen.sh: Fix version regexp, allow automake 1.11.1. + + [CF] Linux: Allow smartd 'DEVICESCAN -d sat' (ticket #13). + Detects (S)ATA devices behind a standard SAT layer + (Vendor ID: "ATA "), but not USB bridges with SAT support. + Only added for backward compatibility with 5.38. + No longer needed as 'DEVICESCAN' without '-d' includes these devices. + + [CF] Add USB ID of Seagate FreeAgent Desktop. + + [CF] smartd: Fix directive '-l selftest' (ticket #36) + Regression was introduced with r2773. + + [CF] smartd: Don't disable attribute tracking if read thresholds fails. + Windows: Don't return dummy thresholds if IOCTL_STORAGE_QUERY_PROPERTY + or 3ware CLI is used to read SMART data. + + [CF] Windows: Print warning if admin rights are missing. + + [CF] Replace some 'EXIT(status)' calls by 'return status'. + Remove unnecessary casts from 'nonempty()' calls. + + [CF] Windows: Set ata_device::ata_identify_is_cached() return value + according to I/O-control actually used. + + [CF] Print ATA output registers if SMART status command returns bogus + register values. + + [CF] Windows: Don't return false ATA version info if IDENTIFY data + is build from IOCTL_STORAGE_QUERY_PROPERTY result or from 3ware CLI + output. + smartctl: Handle missing info about ATA version in '-i' output. + + [CF] smartctl: Don't print log directory if '-q errorsonly' is specified. + + [CF] smartctl: Fix option '-q, --quietmode' (ticket #11). + Regression was introduced with r2807. + + [CF] drivedb.h update: + - SAMSUNG SpinPoint F2 EG series + + [CF] Add USB ID of Samsung Story Station. + + [MS] drivedb.h update: + - Hitachi Travelstar 5K320: some EA models miss last 2 "0" + in model string + - Seagate Barracuda LP series + + [CF] drivedb.h update: + - Crucial M225 SSD + + [CF] drivedb.h updates: + - WDC Scorpio Blue Serial ATA (640GB, 750GB, 1TB) + - WDC My Passport Essential SE + + [CF] Add USB ID of Toshiba PX1270E-1G16. + + [CF] Happy New Year! Update copyright year in version info. + + [CF] drivedb.h update: + - SAMSUNG SpinPoint M40/60/80 series + + [CF] Add direct access to 48-bit LBA register in 'ata_in/out_regs_48bit'. + + [DL] drivedb.h updates: + - WDC My Passport Essential/USB (capacity 250GB, 400GB & 500GB) + + [DL] -r ataioctl,2: print text representation of data also (ticket #32) + + [DL] FreeBSD: freebsd_ata_device::ata_pass_through implemented (part of ticket #18) + + [CF] drivedb.h updates: + - Hitachi Travelstar 7K320 (ticket #28) + - Hitachi Travelstar 7K500 + + [DL] -l gpllog,...: print text representation of data also (ticket #30) + + [DL] FreeBSD: check reallocf() result for failures + + [AS] FreeBSD: fixing crash on kFreeBSD (#29), patch provided by Petr Salinger + + [CF] Makefile.am: 'make check' now tests the syntax of drivedb.h. + + [CF] Cygwin: Open drive database files in text mode. + + [CF] Cygwin: Check for 'syslogd' and 'syslog-ng' in initd script. + + [CF] Windows: Disable Win9x/ME specific code if no longer supported + by compiler. + + [CF] Add '-v ID,FORMAT:BYTEORDER[,NAME]' to specify byte order + of attribute raw value. + + [CF] configure.in: Change --with-docdir default from + 'PREFIX/share/doc/smartmontools-VERSION' to + 'DATADIR/doc/smartmontools' to make it consistent with + --docdir option added in autoconf 2.6x (ticket #24). + Autoconf 2.5x is still supported. + + [CF] Move drive database entries from 'knowndrives.cpp' to new file + 'drivedb.h'. This allows to update the drive database from SVN + if installation was configured with '--enable-drivedb'. + Remove the Makefile target to create 'drivedb.h'. + + [CF] do_release: Add support to release from a dir below 'branches'. + Accept partial checkouts. + smartmontools 5.39.1 2010-01-28 [CF] Linux: Fix spin-up of SATA drive if '-n standby' is used diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..50eeac7 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,241 @@ +# Doxyfile 1.5.5 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = smartmontools +PROJECT_NUMBER = +OUTPUT_DIRECTORY = doc +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = YES +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +TYPEDEF_HIDES_STRUCT = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = NO +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = dev*.h \ + dev*.cpp \ + scsiata.cpp +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = NO +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = YES +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/INSTALL b/INSTALL index dae2f24..bb0f4d7 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ Smartmontools installation instructions ======================================= -$Id: INSTALL 2967 2009-10-23 21:45:56Z chrfranke $ +$Id: INSTALL 3057 2010-02-03 20:56:41Z chrfranke $ Please also see the smartmontools home page: http://smartmontools.sourceforge.net/ @@ -242,7 +242,7 @@ Table of contents: --sbindir=/usr/local/sbin --sysconfdir=/usr/local/etc --mandir=/usr/local/share/man - --with-docdir=/usr/local/share/doc/smartmontools-VERSION + --with-docdir=/usr/local/share/doc/smartmontools --with-initscriptdir=/usr/local/etc/rc.d/init.d --disable-sample @@ -415,7 +415,7 @@ Same as Red Hat: --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-initscriptdir=/etc/rc.d/init.d \ - --with-docdir=/usr/share/doc/smartmontools-VERSION + --with-docdir=/usr/share/doc/smartmontools Using DOS text file type as default for the working directories ("textmode" mount option) is not recommended. Building the binaries and man pages using @@ -655,18 +655,22 @@ OPTIONS DEFAULT AFFECTS --prefix /usr/local Please see below --sbindir ${prefix}/sbin Directory for smartd/smartctl executables; Contents of smartd/smartctl man pages +--docdir ${prefix}/share/doc/smartmontools Location of the documentation + (autoconf >= 2.60 only, see also --with-docdir below) --mandir ${prefix}/share/man Directory for smartctl/smartd/smartd.conf man pages --sysconfdir ${prefix}/etc Directory for smartd.conf; Contents of smartd executable; Contents of smartd/smartd.conf man pages; Directory for rc.d/init.d/smartd init script --with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts ---with-docdir ${prefix}/share/doc/smartmontools-5.X Location of the documentation +--with-docdir ${prefix}/share/doc/smartmontools Location of the documentation --enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file --with-os-deps os_.o OS dependent module(s) --with-selinux Enables SELinux support. If smartmontools has to create the /dev/tw[ae] device nodes for 3ware/AMCC controllers, this option ensures that the nodes are created with correct SELinux file contexts. +--with-libcap-ng --with-libcap-ng=auto Enables/disables libcap-ng support. If enabled and libcap-ng is + available, option --capabilities is added to smartd. --enable-drivedb --disable-drivedb Enables default drive database file '${drivedbdir}/drivedb.h' --with-drivedbdir ${prefix}/share/smartmontools Directory for 'drivedb.h' (implies --enable-drivedb) --enable-savestates --disable-savestates Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state' @@ -674,6 +678,12 @@ OPTIONS DEFAULT AFFECTS --enable-attributelog --disable-attributelog Enables default smartd attribute log files --with-attributelog ${prefix}/var/lib/smartmontools/attrlog. Prefix for smartd attribute log files (implies --enable-attributelog) +Please note that in previous versions of smartmontools (<= 5.39) the +default for --with-docdir was + ${prefix}/share/doc/smartmontools-VERSION +This was changed to make it consistent with the default of the +new --docdir option added in autoconf 2.60. + Here's an example: If you set --prefix=/home/joe and none of the other four variables then the different directories that are used would be: @@ -681,7 +691,7 @@ variables then the different directories that are used would be: --mandir /home/joe/share/man --sysconfdir /home/joe/etc --with-initscriptdir /home/joe/etc/init.d/rc.d ---with-docdir /home/joe/doc/smartmontools-5.X +--with-docdir /home/joe/doc/smartmontools This is useful for test installs in a harmless subdirectory somewhere. diff --git a/Makefile.am b/Makefile.am index 15dcdfa..fe1d2b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in # -# $Id: Makefile.am 2878 2009-08-26 20:03:06Z chrfranke $ +# $Id: Makefile.am 3059 2010-02-03 21:42:09Z chrfranke $ # @SET_MAKE@ @@ -35,6 +35,7 @@ smartd_SOURCES = smartd.cpp \ dev_interface.cpp \ dev_interface.h \ dev_tunnelled.h \ + drivedb.h \ extern.h \ int64.h \ knowndrives.cpp \ @@ -45,7 +46,7 @@ smartd_SOURCES = smartd.cpp \ utility.cpp \ utility.h -smartd_LDADD = @os_deps@ @os_libs@ +smartd_LDADD = @os_deps@ @os_libs@ @CAPNG_LDADD@ smartd_DEPENDENCIES = @os_deps@ EXTRA_smartd_SOURCES = os_darwin.cpp \ @@ -104,6 +105,7 @@ smartctl_SOURCES= smartctl.cpp \ dev_interface.cpp \ dev_interface.h \ dev_tunnelled.h \ + drivedb.h \ extern.h \ int64.h \ knowndrives.cpp \ @@ -242,8 +244,7 @@ EXTRA_DIST = smartd.initd.in \ os_win32/installer.nsi \ $(docs_DATA) -CLEANFILES = drivedb.h \ - smartd.conf.5 \ +CLEANFILES = smartd.conf.5 \ smartd.conf.4 \ smartd.8 \ smartd.1m \ @@ -301,11 +302,6 @@ svnversion.h: CHANGELOG Makefile endif -# Drive Database -drivedb.h: knowndrives.cpp Makefile - echo '/* drivedb.h. Generated from knowndrives.cpp by Makefile. */' > $@ - sed '1,/^\/\/ BEGIN drivedb.h/d;/^\/\/ END drivedb.h/,$$d;s/^ //' $(srcdir)/knowndrives.cpp >> $@ - if ENABLE_DRIVEDB drivedb_DATA = drivedb.h endif @@ -409,6 +405,12 @@ install-initdDATA : $(initd_DATA_install) uninstall-initdDATA: $(initd_DATA_uninstall) +if ENABLE_CAPABILITIES +MAN_CAPABILITIES = cat +else +MAN_CAPABILITIES = sed '/BEGIN ENABLE_CAPABILITIES/,/END ENABLE_CAPABILITIES/d' +endif + if ENABLE_DRIVEDB MAN_DRIVEDB = sed "s|/usr/local/share/smartmontools/drivedb\\.h|$(drivedbdir)/drivedb.h|g" else @@ -427,36 +429,29 @@ else MAN_ATTRIBUTELOG = sed '/BEGIN ENABLE_ATTRIBUTELOG/,/END ENABLE_ATTRIBUTELOG/d' endif +MAN_FILTER = \ + sed "s|CURRENT_CVS_VERSION|$(releaseversion)|g; \ + s|CURRENT_CVS_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g; \ + s|CURRENT_CVS_TIME|`sed -n 's,^.*TIME[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g; \ + s|/usr/local/share/man/|$(mandir)/|g; \ + s|/usr/local/sbin/|$(sbindir)/|g; \ + s|/usr/local/etc/rc\\.d/init.d/|$(initddir)/|g; \ + s|/usr/local/share/doc/smartmontools-5.1/|$(docsdir)/|g; \ + s|/usr/local/etc/smartd\\.conf|$(sysconfdir)/smartd.conf|g; \ + s|/usr/local/etc/smart_drivedb\\.h|$(sysconfdir)/smart_drivedb\\.h|g" | \ + $(MAN_CAPABILITIES) | \ + $(MAN_DRIVEDB) | \ + $(MAN_SAVESTATES) | \ + $(MAN_ATTRIBUTELOG) + if OS_FREEBSD .for file in $(man_MANS) ${file}: $(srcdir)/${file}.in Makefile svnversion.h - sed "s|CURRENT_CVS_VERSION|$(releaseversion)|g; \ - s|CURRENT_CVS_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g; \ - s|CURRENT_CVS_TIME|`sed -n 's,^.*TIME[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g; \ - s|/usr/local/share/man/|$(mandir)/|g; \ - s|/usr/local/sbin/|$(sbindir)/|g; \ - s|/usr/local/etc/rc\\.d/init.d/|$(initddir)/|g; \ - s|/usr/local/share/doc/smartmontools-5.1/|$(docsdir)/|g; \ - s|/usr/local/etc/smartd\\.conf|$(sysconfdir)/smartd.conf|g; \ - s|/usr/local/etc/smart_drivedb\\.h|$(sysconfdir)/smart_drivedb\\.h|g" ${.ALLSRC:M*.in} | \ - $(MAN_DRIVEDB) | \ - $(MAN_SAVESTATES) | \ - $(MAN_ATTRIBUTELOG) > $@ + cat ${.ALLSRC:M*.in} | $(MAN_FILTER) > $@ .endfor else smart%: $(srcdir)/smart%.in Makefile svnversion.h - sed "s|CURRENT_CVS_VERSION|$(releaseversion)|g" $< | \ - sed "s|CURRENT_CVS_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g" | \ - sed "s|CURRENT_CVS_TIME|`sed -n 's,^.*TIME[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g" | \ - sed "s|/usr/local/share/man/|$(mandir)/|g" | \ - sed "s|/usr/local/sbin/|$(sbindir)/|g" | \ - sed "s|/usr/local/etc/rc\\.d/init.d/|$(initddir)/|g" | \ - sed "s|/usr/local/share/doc/smartmontools-5.1/|$(docsdir)/|g" | \ - sed "s|/usr/local/etc/smartd\\.conf|$(sysconfdir)/smartd.conf|g" | \ - sed "s|/usr/local/etc/smart_drivedb\\.h|$(sysconfdir)/smart_drivedb\\.h|g" | \ - $(MAN_DRIVEDB) | \ - $(MAN_SAVESTATES) | \ - $(MAN_ATTRIBUTELOG) > $@ + cat $< | $(MAN_FILTER) > $@ endif # Commands to convert man pages into .html and .txt @@ -501,6 +496,14 @@ endif $(MAN2TXT) $< > $@ +# Check drive database syntax +check: + @if ./smartctl -B $(srcdir)/drivedb.h -P showall >/dev/null; then \ + echo "$(srcdir)/drivedb.h: OK"; \ + else \ + echo "$(srcdir)/drivedb.h: Syntax check failed"; exit 1; \ + fi + if OS_WIN32_MINGW # Definitions for Windows distribution diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index d169c6c..0000000 --- a/Makefile.in +++ /dev/null @@ -1,1724 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# $Id: Makefile.am 2878 2009-08-26 20:03:06Z chrfranke $ -# - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_DRIVEDB_TRUE@am__append_1 = -DSMARTMONTOOLS_DRIVEDBDIR='"$(drivedbdir)"' -@ENABLE_SAVESTATES_TRUE@am__append_2 = -DSMARTMONTOOLS_SAVESTATES='"$(savestates)"' -@ENABLE_ATTRIBUTELOG_TRUE@am__append_3 = -DSMARTMONTOOLS_ATTRIBUTELOG='"$(attributelog)"' -sbin_PROGRAMS = smartd$(EXEEXT) smartctl$(EXEEXT) -@OS_WIN32_MINGW_TRUE@am__append_4 = \ -@OS_WIN32_MINGW_TRUE@ posix/regex.h \ -@OS_WIN32_MINGW_TRUE@ posix/regex.c \ -@OS_WIN32_MINGW_TRUE@ os_win32/daemon_win32.h \ -@OS_WIN32_MINGW_TRUE@ os_win32/daemon_win32.cpp \ -@OS_WIN32_MINGW_TRUE@ os_win32/hostname_win32.h \ -@OS_WIN32_MINGW_TRUE@ os_win32/hostname_win32.cpp \ -@OS_WIN32_MINGW_TRUE@ os_win32/syslog.h \ -@OS_WIN32_MINGW_TRUE@ os_win32/syslog_win32.cpp - - -# Included by regex.c: -@OS_WIN32_MINGW_TRUE@am__append_5 = \ -@OS_WIN32_MINGW_TRUE@ posix/regcomp.c \ -@OS_WIN32_MINGW_TRUE@ posix/regexec.c \ -@OS_WIN32_MINGW_TRUE@ posix/regex_internal.c \ -@OS_WIN32_MINGW_TRUE@ posix/regex_internal.h - -@OS_WIN32_MINGW_TRUE@am__append_6 = \ -@OS_WIN32_MINGW_TRUE@ posix/regex.h \ -@OS_WIN32_MINGW_TRUE@ posix/regex.c \ -@OS_WIN32_MINGW_TRUE@ os_win32/syslog.h - - -# Included by regex.c: -@OS_WIN32_MINGW_TRUE@am__append_7 = \ -@OS_WIN32_MINGW_TRUE@ posix/regcomp.c \ -@OS_WIN32_MINGW_TRUE@ posix/regexec.c \ -@OS_WIN32_MINGW_TRUE@ posix/regex_internal.c \ -@OS_WIN32_MINGW_TRUE@ posix/regex_internal.h - -@SMARTD_SUFFIX_TRUE@am__append_8 = smartd.conf$(smartd_suffix) -@OS_WIN32_MINGW_TRUE@am__append_9 = $(FILES_WIN32) $(exedir_win32)/syslogevt.exe \ -@OS_WIN32_MINGW_TRUE@ smartctl-nc.exe smartctl-nc.exe.tmp \ -@OS_WIN32_MINGW_TRUE@ distdir.mkdir syslogevt.check - -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING INSTALL NEWS TODO \ - config.guess config.sub depcomp install-sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" \ - "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(attributelogdir)" \ - "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(drivedbdir)" \ - "$(DESTDIR)$(initddir)" "$(DESTDIR)$(savestatesdir)" \ - "$(DESTDIR)$(sysconfdir)" -PROGRAMS = $(sbin_PROGRAMS) -am__smartctl_SOURCES_DIST = smartctl.cpp smartctl.h atacmdnames.cpp \ - atacmdnames.h atacmds.cpp atacmds.h ataprint.cpp ataprint.h \ - dev_ata_cmd_set.cpp dev_ata_cmd_set.h dev_interface.cpp \ - dev_interface.h dev_tunnelled.h extern.h int64.h \ - knowndrives.cpp knowndrives.h scsicmds.cpp scsicmds.h \ - scsiata.cpp scsiprint.cpp scsiprint.h utility.cpp utility.h \ - posix/regex.h posix/regex.c os_win32/syslog.h -@OS_WIN32_MINGW_TRUE@am__objects_1 = regex.$(OBJEXT) -am_smartctl_OBJECTS = smartctl.$(OBJEXT) atacmdnames.$(OBJEXT) \ - atacmds.$(OBJEXT) ataprint.$(OBJEXT) dev_ata_cmd_set.$(OBJEXT) \ - dev_interface.$(OBJEXT) knowndrives.$(OBJEXT) \ - scsicmds.$(OBJEXT) scsiata.$(OBJEXT) scsiprint.$(OBJEXT) \ - utility.$(OBJEXT) $(am__objects_1) -am__EXTRA_smartctl_SOURCES_DIST = os_linux.cpp os_linux.h \ - os_freebsd.cpp os_freebsd.h os_netbsd.cpp os_netbsd.h \ - os_openbsd.cpp os_openbsd.h os_solaris.cpp os_solaris.h \ - os_win32.cpp os_generic.cpp os_generic.h cciss.cpp cciss.h \ - dev_legacy.cpp megaraid.h posix/regcomp.c posix/regexec.c \ - posix/regex_internal.c posix/regex_internal.h -smartctl_OBJECTS = $(am_smartctl_OBJECTS) -am__smartd_SOURCES_DIST = smartd.cpp atacmdnames.cpp atacmdnames.h \ - atacmds.cpp atacmds.h dev_ata_cmd_set.cpp dev_ata_cmd_set.h \ - dev_interface.cpp dev_interface.h dev_tunnelled.h extern.h \ - int64.h knowndrives.cpp knowndrives.h scsicmds.cpp scsicmds.h \ - scsiata.cpp utility.cpp utility.h posix/regex.h posix/regex.c \ - os_win32/daemon_win32.h os_win32/daemon_win32.cpp \ - os_win32/hostname_win32.h os_win32/hostname_win32.cpp \ - os_win32/syslog.h os_win32/syslog_win32.cpp -@OS_WIN32_MINGW_TRUE@am__objects_2 = regex.$(OBJEXT) \ -@OS_WIN32_MINGW_TRUE@ daemon_win32.$(OBJEXT) \ -@OS_WIN32_MINGW_TRUE@ hostname_win32.$(OBJEXT) \ -@OS_WIN32_MINGW_TRUE@ syslog_win32.$(OBJEXT) -am_smartd_OBJECTS = smartd.$(OBJEXT) atacmdnames.$(OBJEXT) \ - atacmds.$(OBJEXT) dev_ata_cmd_set.$(OBJEXT) \ - dev_interface.$(OBJEXT) knowndrives.$(OBJEXT) \ - scsicmds.$(OBJEXT) scsiata.$(OBJEXT) utility.$(OBJEXT) \ - $(am__objects_2) -am__EXTRA_smartd_SOURCES_DIST = os_darwin.cpp os_darwin.h os_linux.cpp \ - os_linux.h os_freebsd.cpp os_freebsd.h os_netbsd.cpp \ - os_netbsd.h os_openbsd.cpp os_openbsd.h os_solaris.cpp \ - os_solaris.h os_solaris_ata.s os_win32.cpp os_generic.cpp \ - os_generic.h cciss.cpp cciss.h dev_legacy.cpp megaraid.h \ - posix/regcomp.c posix/regexec.c posix/regex_internal.c \ - posix/regex_internal.h -smartd_OBJECTS = $(am_smartd_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) -SOURCES = $(smartctl_SOURCES) $(EXTRA_smartctl_SOURCES) \ - $(smartd_SOURCES) $(EXTRA_smartd_SOURCES) -DIST_SOURCES = $(am__smartctl_SOURCES_DIST) \ - $(am__EXTRA_smartctl_SOURCES_DIST) $(am__smartd_SOURCES_DIST) \ - $(am__EXTRA_smartd_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -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' -man5dir = $(mandir)/man5 -man8dir = $(mandir)/man8 -NROFF = nroff -MANS = $(man_MANS) -DATA = $(attributelog_DATA) $(docs_DATA) $(drivedb_DATA) $(initd_DATA) \ - $(savestates_DATA) $(sysconf_DATA) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -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 -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -ASFLAGS = @ASFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -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__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -attributelog = @attributelog@ -attributelogdir = @attributelogdir@ -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@ -drivedbdir = @drivedbdir@ -dvidir = @dvidir@ -exampledir = @exampledir@ -exec_prefix = @exec_prefix@ -gcc_have_attr_packed = @gcc_have_attr_packed@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -initddir = @initddir@ -install_sh = @install_sh@ -libc_have_working_snprintf = @libc_have_working_snprintf@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -os_deps = @os_deps@ -os_libs = @os_libs@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -releaseversion = @releaseversion@ -savestates = @savestates@ -savestatesdir = @savestatesdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -smartd_suffix = @smartd_suffix@ -smartmontools_release_date = @smartmontools_release_date@ -smartmontools_release_time = @smartmontools_release_time@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -with_selinux = @with_selinux@ - -# Make sure .cpp takes precedence to avoid compiling old .c file -SUFFIXES = .cpp .c .s .o - -# BUILD_INFO can be provided by package maintainers (see INSTALL file) -BUILD_INFO = "(local build)" -AM_CPPFLAGS = -DBUILD_INFO='$(BUILD_INFO)' \ - -DSMARTMONTOOLS_SYSCONFDIR='"$(sysconfdir)"' $(am__append_1) \ - $(am__append_2) $(am__append_3) -smartd_SOURCES = smartd.cpp atacmdnames.cpp atacmdnames.h atacmds.cpp \ - atacmds.h dev_ata_cmd_set.cpp dev_ata_cmd_set.h \ - dev_interface.cpp dev_interface.h dev_tunnelled.h extern.h \ - int64.h knowndrives.cpp knowndrives.h scsicmds.cpp scsicmds.h \ - scsiata.cpp utility.cpp utility.h $(am__append_4) -smartd_LDADD = @os_deps@ @os_libs@ -smartd_DEPENDENCIES = @os_deps@ -EXTRA_smartd_SOURCES = os_darwin.cpp os_darwin.h os_linux.cpp \ - os_linux.h os_freebsd.cpp os_freebsd.h os_netbsd.cpp \ - os_netbsd.h os_openbsd.cpp os_openbsd.h os_solaris.cpp \ - os_solaris.h os_solaris_ata.s os_win32.cpp os_generic.cpp \ - os_generic.h cciss.cpp cciss.h dev_legacy.cpp megaraid.h \ - $(am__append_5) -smartctl_SOURCES = smartctl.cpp smartctl.h atacmdnames.cpp \ - atacmdnames.h atacmds.cpp atacmds.h ataprint.cpp ataprint.h \ - dev_ata_cmd_set.cpp dev_ata_cmd_set.h dev_interface.cpp \ - dev_interface.h dev_tunnelled.h extern.h int64.h \ - knowndrives.cpp knowndrives.h scsicmds.cpp scsicmds.h \ - scsiata.cpp scsiprint.cpp scsiprint.h utility.cpp utility.h \ - $(am__append_6) -smartctl_LDADD = @os_deps@ @os_libs@ -smartctl_DEPENDENCIES = @os_deps@ -EXTRA_smartctl_SOURCES = os_linux.cpp os_linux.h os_freebsd.cpp \ - os_freebsd.h os_netbsd.cpp os_netbsd.h os_openbsd.cpp \ - os_openbsd.h os_solaris.cpp os_solaris.h os_win32.cpp \ - os_generic.cpp os_generic.h cciss.cpp cciss.h dev_legacy.cpp \ - megaraid.h $(am__append_7) - -# This block is required because Solaris uses manual page section 1m -# for administrative command (linux/freebsd use section 8) and Solaris -# uses manual page section 4 for file formats (linux/freebsd use -# section 5). Automake can deal cleanly with man page sections 1-8 -# and n, but NOT with sections of the form 1m. -@OS_SOLARIS_TRUE@extra_MANS = smartd.conf.4 \ -@OS_SOLARIS_TRUE@ smartctl.1m \ -@OS_SOLARIS_TRUE@ smartd.1m - -# For systems that adopts traditional manner -@OS_SOLARIS_FALSE@man_MANS = smartd.conf.5 \ -@OS_SOLARIS_FALSE@ smartctl.8 \ -@OS_SOLARIS_FALSE@ smartd.8 - -docsdir = $(docdir) -docs_DATA = AUTHORS \ - CHANGELOG \ - COPYING \ - INSTALL \ - NEWS \ - README \ - TODO \ - WARNINGS \ - smartd.conf - -sysconf_DATA = smartd.conf$(smartd_suffix) -EXTRA_DIST = smartd.initd.in \ - smartd.8.in \ - smartctl.8.in \ - smartd.conf.5.in \ - smartd.conf \ - autogen.sh \ - os_darwin/SMART.in \ - os_darwin/StartupParameters.plist \ - os_darwin/English_Localizable.strings \ - os_win32/installer.nsi \ - $(docs_DATA) - -CLEANFILES = drivedb.h smartd.conf.5 smartd.conf.4 smartd.8 smartd.1m \ - smartd.8.html smartd.8.txt smartctl.8 smartctl.1m \ - smartctl.8.html smartctl.8.txt smartd.conf.5.html \ - smartd.conf.5.txt smartd.initd svnversion.h SMART \ - $(am__append_8) $(am__append_9) - -# 'make maintainer-clean' also removes files generated by './autogen.sh' -MAINTAINERCLEANFILES = \ - $(srcdir)/Makefile.in \ - $(srcdir)/aclocal.m4 \ - $(srcdir)/configure \ - $(srcdir)/config.guess \ - $(srcdir)/config.h.in \ - $(srcdir)/config.h.in~ \ - $(srcdir)/config.sub \ - $(srcdir)/depcomp \ - $(srcdir)/install-sh \ - $(srcdir)/missing \ - $(srcdir)/mkinstalldirs - -@ENABLE_DRIVEDB_TRUE@drivedb_DATA = drivedb.h - -# Create $(savestatesdir) only -@ENABLE_SAVESTATES_TRUE@savestates_DATA = - -# Create $(attributelogdir) only -@ENABLE_ATTRIBUTELOG_TRUE@attributelog_DATA = -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@initd_DATA = smartd.initd -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@initd_DATA = SMART \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ os_darwin/StartupParameters.plist \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ os_darwin/English_Localizable.strings - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@initd_install_name = smartd$(smartd_suffix) -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@initd_install_name = SMART -@INSTALL_INITSCRIPT_FALSE@initd_DATA_install = install-initdDATA-null -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@initd_DATA_install = install-initdDATA-generic -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@initd_DATA_install = install-initdDATA-darwin -@INSTALL_INITSCRIPT_FALSE@initd_DATA_uninstall = uninstall-initdDATA-null -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@initd_DATA_uninstall = uninstall-initdDATA-generic -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@initd_DATA_uninstall = uninstall-initdDATA-darwin -@ENABLE_DRIVEDB_FALSE@MAN_DRIVEDB = sed '/BEGIN ENABLE_DRIVEDB/,/END ENABLE_DRIVEDB/d' -@ENABLE_DRIVEDB_TRUE@MAN_DRIVEDB = sed "s|/usr/local/share/smartmontools/drivedb\\.h|$(drivedbdir)/drivedb.h|g" -@ENABLE_SAVESTATES_FALSE@MAN_SAVESTATES = sed '/BEGIN ENABLE_SAVESTATES/,/END ENABLE_SAVESTATES/d' -@ENABLE_SAVESTATES_TRUE@MAN_SAVESTATES = sed "s|/usr/local/var/lib/smartmontools/smartd\\.|$(savestates)|g" -@ENABLE_ATTRIBUTELOG_FALSE@MAN_ATTRIBUTELOG = sed '/BEGIN ENABLE_ATTRIBUTELOG/,/END ENABLE_ATTRIBUTELOG/d' -@ENABLE_ATTRIBUTELOG_TRUE@MAN_ATTRIBUTELOG = sed "s|/usr/local/var/lib/smartmontools/attrlog\\.|$(attributelog)|g" - -# Commands to convert man pages into .html and .txt -# TODO: configure -MAN2HTML = man2html -#MAN2HTML = groff -man -Thtml -MAN2TXT = groff -man -Tascii -P'-bcou' - -# Remove HTTP header and fix links in man2html output -FIXHTML = sed '1s,^Content-type.*,,' \ - | sed 's,,,g' \ - | sed 's,,,g' \ - | sed 's,\([^<]*\),\1,g' \ - | sed 's,\([^<]*\),\1,g' - - -# Definitions for Windows distribution -@OS_WIN32_MINGW_TRUE@distdir_win32 = $(PACKAGE)-$(VERSION).win32 -@OS_WIN32_MINGW_TRUE@distzip_win32 = $(PACKAGE)-$(VERSION).win32.zip -@OS_WIN32_MINGW_TRUE@distinst_win32 = $(PACKAGE)-$(VERSION).win32-setup.exe -@OS_WIN32_MINGW_TRUE@exedir_win32 = $(distdir_win32)/bin -@OS_WIN32_MINGW_TRUE@docdir_win32 = $(distdir_win32)/doc -@OS_WIN32_MINGW_TRUE@FILES_WIN32 = $(exedir_win32)/smartctl.exe \ -@OS_WIN32_MINGW_TRUE@ $(exedir_win32)/smartctl-nc.exe \ -@OS_WIN32_MINGW_TRUE@ $(exedir_win32)/smartd.exe \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/AUTHORS.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/CHANGELOG.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/COPYING.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/INSTALL.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/NEWS.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/README.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/TODO.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/WARNINGS.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartd.conf \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartctl.8.html \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartctl.8.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartd.8.html \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartd.8.txt \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartd.conf.5.html \ -@OS_WIN32_MINGW_TRUE@ $(docdir_win32)/smartd.conf.5.txt - - -# Textfile converter from cygutils -@OS_WIN32_MINGW_TRUE@UNIX2DOS = unix2dos -D -@OS_WIN32_MINGW_TRUE@DOS2UNIX = dos2unix -U -SUBDIRS = . examplescripts -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .cpp .c .s .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -install-sbinPROGRAMS: $(sbin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - 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)'; 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) -smartctl$(EXEEXT): $(smartctl_OBJECTS) $(smartctl_DEPENDENCIES) - @rm -f smartctl$(EXEEXT) - $(CXXLINK) $(smartctl_OBJECTS) $(smartctl_LDADD) $(LIBS) -smartd$(EXEEXT): $(smartd_OBJECTS) $(smartd_DEPENDENCIES) - @rm -f smartd$(EXEEXT) - $(CXXLINK) $(smartd_OBJECTS) $(smartd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atacmdnames.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atacmds.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ataprint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cciss.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemon_win32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dev_ata_cmd_set.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dev_interface.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dev_legacy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostname_win32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/knowndrives.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_darwin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_freebsd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_generic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_linux.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_netbsd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_openbsd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_solaris.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_win32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scsiata.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scsicmds.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scsiprint.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smartctl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smartd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog_win32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -regex.o: posix/regex.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.o -MD -MP -MF $(DEPDIR)/regex.Tpo -c -o regex.o `test -f 'posix/regex.c' || echo '$(srcdir)/'`posix/regex.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regex.Tpo $(DEPDIR)/regex.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regex.c' object='regex.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.o `test -f 'posix/regex.c' || echo '$(srcdir)/'`posix/regex.c - -regex.obj: posix/regex.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex.obj -MD -MP -MF $(DEPDIR)/regex.Tpo -c -o regex.obj `if test -f 'posix/regex.c'; then $(CYGPATH_W) 'posix/regex.c'; else $(CYGPATH_W) '$(srcdir)/posix/regex.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regex.Tpo $(DEPDIR)/regex.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regex.c' object='regex.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex.obj `if test -f 'posix/regex.c'; then $(CYGPATH_W) 'posix/regex.c'; else $(CYGPATH_W) '$(srcdir)/posix/regex.c'; fi` - -regcomp.o: posix/regcomp.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regcomp.o -MD -MP -MF $(DEPDIR)/regcomp.Tpo -c -o regcomp.o `test -f 'posix/regcomp.c' || echo '$(srcdir)/'`posix/regcomp.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regcomp.Tpo $(DEPDIR)/regcomp.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regcomp.c' object='regcomp.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regcomp.o `test -f 'posix/regcomp.c' || echo '$(srcdir)/'`posix/regcomp.c - -regcomp.obj: posix/regcomp.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regcomp.obj -MD -MP -MF $(DEPDIR)/regcomp.Tpo -c -o regcomp.obj `if test -f 'posix/regcomp.c'; then $(CYGPATH_W) 'posix/regcomp.c'; else $(CYGPATH_W) '$(srcdir)/posix/regcomp.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regcomp.Tpo $(DEPDIR)/regcomp.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regcomp.c' object='regcomp.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regcomp.obj `if test -f 'posix/regcomp.c'; then $(CYGPATH_W) 'posix/regcomp.c'; else $(CYGPATH_W) '$(srcdir)/posix/regcomp.c'; fi` - -regexec.o: posix/regexec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regexec.o -MD -MP -MF $(DEPDIR)/regexec.Tpo -c -o regexec.o `test -f 'posix/regexec.c' || echo '$(srcdir)/'`posix/regexec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regexec.Tpo $(DEPDIR)/regexec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regexec.c' object='regexec.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regexec.o `test -f 'posix/regexec.c' || echo '$(srcdir)/'`posix/regexec.c - -regexec.obj: posix/regexec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regexec.obj -MD -MP -MF $(DEPDIR)/regexec.Tpo -c -o regexec.obj `if test -f 'posix/regexec.c'; then $(CYGPATH_W) 'posix/regexec.c'; else $(CYGPATH_W) '$(srcdir)/posix/regexec.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regexec.Tpo $(DEPDIR)/regexec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regexec.c' object='regexec.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regexec.obj `if test -f 'posix/regexec.c'; then $(CYGPATH_W) 'posix/regexec.c'; else $(CYGPATH_W) '$(srcdir)/posix/regexec.c'; fi` - -regex_internal.o: posix/regex_internal.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex_internal.o -MD -MP -MF $(DEPDIR)/regex_internal.Tpo -c -o regex_internal.o `test -f 'posix/regex_internal.c' || echo '$(srcdir)/'`posix/regex_internal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regex_internal.Tpo $(DEPDIR)/regex_internal.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regex_internal.c' object='regex_internal.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex_internal.o `test -f 'posix/regex_internal.c' || echo '$(srcdir)/'`posix/regex_internal.c - -regex_internal.obj: posix/regex_internal.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT regex_internal.obj -MD -MP -MF $(DEPDIR)/regex_internal.Tpo -c -o regex_internal.obj `if test -f 'posix/regex_internal.c'; then $(CYGPATH_W) 'posix/regex_internal.c'; else $(CYGPATH_W) '$(srcdir)/posix/regex_internal.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/regex_internal.Tpo $(DEPDIR)/regex_internal.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='posix/regex_internal.c' object='regex_internal.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regex_internal.obj `if test -f 'posix/regex_internal.c'; then $(CYGPATH_W) 'posix/regex_internal.c'; else $(CYGPATH_W) '$(srcdir)/posix/regex_internal.c'; fi` - -.cpp.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -daemon_win32.o: os_win32/daemon_win32.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT daemon_win32.o -MD -MP -MF $(DEPDIR)/daemon_win32.Tpo -c -o daemon_win32.o `test -f 'os_win32/daemon_win32.cpp' || echo '$(srcdir)/'`os_win32/daemon_win32.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/daemon_win32.Tpo $(DEPDIR)/daemon_win32.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='os_win32/daemon_win32.cpp' object='daemon_win32.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o daemon_win32.o `test -f 'os_win32/daemon_win32.cpp' || echo '$(srcdir)/'`os_win32/daemon_win32.cpp - -daemon_win32.obj: os_win32/daemon_win32.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT daemon_win32.obj -MD -MP -MF $(DEPDIR)/daemon_win32.Tpo -c -o daemon_win32.obj `if test -f 'os_win32/daemon_win32.cpp'; then $(CYGPATH_W) 'os_win32/daemon_win32.cpp'; else $(CYGPATH_W) '$(srcdir)/os_win32/daemon_win32.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/daemon_win32.Tpo $(DEPDIR)/daemon_win32.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='os_win32/daemon_win32.cpp' object='daemon_win32.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o daemon_win32.obj `if test -f 'os_win32/daemon_win32.cpp'; then $(CYGPATH_W) 'os_win32/daemon_win32.cpp'; else $(CYGPATH_W) '$(srcdir)/os_win32/daemon_win32.cpp'; fi` - -hostname_win32.o: os_win32/hostname_win32.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT hostname_win32.o -MD -MP -MF $(DEPDIR)/hostname_win32.Tpo -c -o hostname_win32.o `test -f 'os_win32/hostname_win32.cpp' || echo '$(srcdir)/'`os_win32/hostname_win32.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/hostname_win32.Tpo $(DEPDIR)/hostname_win32.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='os_win32/hostname_win32.cpp' object='hostname_win32.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hostname_win32.o `test -f 'os_win32/hostname_win32.cpp' || echo '$(srcdir)/'`os_win32/hostname_win32.cpp - -hostname_win32.obj: os_win32/hostname_win32.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT hostname_win32.obj -MD -MP -MF $(DEPDIR)/hostname_win32.Tpo -c -o hostname_win32.obj `if test -f 'os_win32/hostname_win32.cpp'; then $(CYGPATH_W) 'os_win32/hostname_win32.cpp'; else $(CYGPATH_W) '$(srcdir)/os_win32/hostname_win32.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/hostname_win32.Tpo $(DEPDIR)/hostname_win32.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='os_win32/hostname_win32.cpp' object='hostname_win32.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hostname_win32.obj `if test -f 'os_win32/hostname_win32.cpp'; then $(CYGPATH_W) 'os_win32/hostname_win32.cpp'; else $(CYGPATH_W) '$(srcdir)/os_win32/hostname_win32.cpp'; fi` - -syslog_win32.o: os_win32/syslog_win32.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT syslog_win32.o -MD -MP -MF $(DEPDIR)/syslog_win32.Tpo -c -o syslog_win32.o `test -f 'os_win32/syslog_win32.cpp' || echo '$(srcdir)/'`os_win32/syslog_win32.cpp -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/syslog_win32.Tpo $(DEPDIR)/syslog_win32.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='os_win32/syslog_win32.cpp' object='syslog_win32.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o syslog_win32.o `test -f 'os_win32/syslog_win32.cpp' || echo '$(srcdir)/'`os_win32/syslog_win32.cpp - -syslog_win32.obj: os_win32/syslog_win32.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT syslog_win32.obj -MD -MP -MF $(DEPDIR)/syslog_win32.Tpo -c -o syslog_win32.obj `if test -f 'os_win32/syslog_win32.cpp'; then $(CYGPATH_W) 'os_win32/syslog_win32.cpp'; else $(CYGPATH_W) '$(srcdir)/os_win32/syslog_win32.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/syslog_win32.Tpo $(DEPDIR)/syslog_win32.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='os_win32/syslog_win32.cpp' object='syslog_win32.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o syslog_win32.obj `if test -f 'os_win32/syslog_win32.cpp'; then $(CYGPATH_W) 'os_win32/syslog_win32.cpp'; else $(CYGPATH_W) '$(srcdir)/os_win32/syslog_win32.cpp'; fi` - -.s.o: - $(CCASCOMPILE) -c -o $@ $< - -.s.obj: - $(CCASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -install-man5: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^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 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=''; test -n "$(man5dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(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,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^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 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=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(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,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } -install-attributelogDATA: $(attributelog_DATA) - @$(NORMAL_INSTALL) - test -z "$(attributelogdir)" || $(MKDIR_P) "$(DESTDIR)$(attributelogdir)" - @list='$(attributelog_DATA)'; test -n "$(attributelogdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(attributelogdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(attributelogdir)" || exit $$?; \ - done - -uninstall-attributelogDATA: - @$(NORMAL_UNINSTALL) - @list='$(attributelog_DATA)'; test -n "$(attributelogdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(attributelogdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(attributelogdir)" && rm -f $$files -install-docsDATA: $(docs_DATA) - @$(NORMAL_INSTALL) - test -z "$(docsdir)" || $(MKDIR_P) "$(DESTDIR)$(docsdir)" - @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \ - done - -uninstall-docsDATA: - @$(NORMAL_UNINSTALL) - @list='$(docs_DATA)'; test -n "$(docsdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(docsdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(docsdir)" && rm -f $$files -install-drivedbDATA: $(drivedb_DATA) - @$(NORMAL_INSTALL) - test -z "$(drivedbdir)" || $(MKDIR_P) "$(DESTDIR)$(drivedbdir)" - @list='$(drivedb_DATA)'; test -n "$(drivedbdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivedbdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(drivedbdir)" || exit $$?; \ - done - -uninstall-drivedbDATA: - @$(NORMAL_UNINSTALL) - @list='$(drivedb_DATA)'; test -n "$(drivedbdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(drivedbdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(drivedbdir)" && rm -f $$files -install-savestatesDATA: $(savestates_DATA) - @$(NORMAL_INSTALL) - test -z "$(savestatesdir)" || $(MKDIR_P) "$(DESTDIR)$(savestatesdir)" - @list='$(savestates_DATA)'; test -n "$(savestatesdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(savestatesdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(savestatesdir)" || exit $$?; \ - done - -uninstall-savestatesDATA: - @$(NORMAL_UNINSTALL) - @list='$(savestates_DATA)'; test -n "$(savestatesdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(savestatesdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(savestatesdir)" && rm -f $$files -install-sysconfDATA: $(sysconf_DATA) - @$(NORMAL_INSTALL) - test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" - @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ - done - -uninstall-sysconfDATA: - @$(NORMAL_UNINSTALL) - @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files - -# 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): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(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" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - 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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - 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) - 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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - 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" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - 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="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -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 $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - 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 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-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(attributelogdir)" "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(drivedbdir)" "$(DESTDIR)$(initddir)" "$(DESTDIR)$(savestatesdir)" "$(DESTDIR)$(sysconfdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-attributelogDATA install-docsDATA \ - install-drivedbDATA install-initdDATA install-man \ - install-savestatesDATA - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-sbinPROGRAMS install-sysconfDATA - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -@OS_SOLARIS_FALSE@install-man: install-man5 install-man8 - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-attributelogDATA uninstall-docsDATA \ - uninstall-drivedbDATA uninstall-initdDATA uninstall-man \ - uninstall-savestatesDATA uninstall-sbinPROGRAMS \ - uninstall-sysconfDATA - -@OS_SOLARIS_FALSE@uninstall-man: uninstall-man5 uninstall-man8 - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-sbinPROGRAMS ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-attributelogDATA \ - install-data install-data-am install-docsDATA \ - install-drivedbDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-initdDATA install-man install-man5 \ - install-man8 install-pdf install-pdf-am install-ps \ - install-ps-am install-savestatesDATA install-sbinPROGRAMS \ - install-strip install-sysconfDATA installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-attributelogDATA \ - uninstall-docsDATA uninstall-drivedbDATA uninstall-initdDATA \ - uninstall-man uninstall-man5 uninstall-man8 \ - uninstall-savestatesDATA uninstall-sbinPROGRAMS \ - uninstall-sysconfDATA - - -@SET_MAKE@ -@OS_SOLARIS_TRUE@install-man: $(extra_MANS) -@OS_SOLARIS_TRUE@ @$(NORMAL_INSTALL) -@OS_SOLARIS_TRUE@ $(mkinstalldirs) $(DESTDIR)$(mandir)/man4 -@OS_SOLARIS_TRUE@ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1m -@OS_SOLARIS_TRUE@ for i in $(extra_MANS); do \ -@OS_SOLARIS_TRUE@ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ -@OS_SOLARIS_TRUE@ else file=$$i; fi; \ -@OS_SOLARIS_TRUE@ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ -@OS_SOLARIS_TRUE@ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ -@OS_SOLARIS_TRUE@ inst=`echo $$inst | sed -e 's/^.*\///'`; \ -@OS_SOLARIS_TRUE@ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ -@OS_SOLARIS_TRUE@ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$$ext/$$inst"; \ -@OS_SOLARIS_TRUE@ $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man$$ext/$$inst; \ -@OS_SOLARIS_TRUE@ done -@OS_SOLARIS_TRUE@uninstall-man: -@OS_SOLARIS_TRUE@ @$(NORMAL_UNINSTALL) -@OS_SOLARIS_TRUE@ for i in $(extra_MANS); do \ -@OS_SOLARIS_TRUE@ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ -@OS_SOLARIS_TRUE@ else file=$$i; fi; \ -@OS_SOLARIS_TRUE@ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ -@OS_SOLARIS_TRUE@ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ -@OS_SOLARIS_TRUE@ inst=`echo $$inst | sed -e 's/^.*\///'`; \ -@OS_SOLARIS_TRUE@ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ -@OS_SOLARIS_TRUE@ echo " rm -f $(DESTDIR)$(mandir)/man$$ext/$$inst"; \ -@OS_SOLARIS_TRUE@ rm -f $(DESTDIR)$(mandir)/man$$ext/$$inst; \ -@OS_SOLARIS_TRUE@ done -@OS_SOLARIS_TRUE@%.1m: %.8 -@OS_SOLARIS_TRUE@ awk '/^.TH/ {$$3="1m"} {print}' < $< | \ -@OS_SOLARIS_TRUE@ sed -e 's/smartd\.conf\(.*\)(5)/smartd.conf\1(4)/g' \ -@OS_SOLARIS_TRUE@ -e 's/syslog\.conf\(.*\)(5)/syslog.conf\1(4)/g' \ -@OS_SOLARIS_TRUE@ -e 's/smartctl\(.*\)(8)/smartctl\1(1m)/g' \ -@OS_SOLARIS_TRUE@ -e 's/syslogd\(.*\)(8)/syslogd\1(1m)/g' \ -@OS_SOLARIS_TRUE@ -e 's|/var/log/messages|/var/adm/messages|g' \ -@OS_SOLARIS_TRUE@ -e 's/smartd\(.*\)(8)/smartd\1(1m)/g' > $@ -@OS_SOLARIS_TRUE@%.4: %.5 -@OS_SOLARIS_TRUE@ awk '/^.TH/ {$$3="4"} {print}' < $< | \ -@OS_SOLARIS_TRUE@ sed -e 's/smartd\.conf\(.*\)(5)/smartd.conf\1(4)/g' \ -@OS_SOLARIS_TRUE@ -e 's/syslog\.conf\(.*\)(5)/syslog.conf\1(4)/g' \ -@OS_SOLARIS_TRUE@ -e 's/smartctl\(.*\)(8)/smartdctl\1(1m)/g' \ -@OS_SOLARIS_TRUE@ -e 's/syslogd\(.*\)(8)/syslogd\1(1m)/g' \ -@OS_SOLARIS_TRUE@ -e 's|/var/log/messages|/var/adm/messages|g' \ -@OS_SOLARIS_TRUE@ -e 's/smartd\(.*\)(8)/smartd\1(1m)/g' > $@ - -@SMARTD_SUFFIX_TRUE@smartd.conf$(smartd_suffix): smartd.conf -@SMARTD_SUFFIX_TRUE@ cp ${srcdir}/smartd.conf smartd.conf$(smartd_suffix) - -utility.o: svnversion.h - -# Get version info from SVN -@IS_SVN_BUILD_TRUE@svnversion.h: CHANGELOG Makefile $(srcdir)/.svn/entries -@IS_SVN_BUILD_TRUE@ echo '/* svnversion.h. Generated by Makefile from svn info. */' > $@ -@IS_SVN_BUILD_TRUE@ (cd $(srcdir) \ -@IS_SVN_BUILD_TRUE@ && svnversion 2>/dev/null | sed -n 's,^\([0-9].*\),REV "\1",p' \ -@IS_SVN_BUILD_TRUE@ && TZ= LC_ALL=C svn info 2>/dev/null \ -@IS_SVN_BUILD_TRUE@ | sed -n 'h;s,^.* Date: *\([^ ]*\) .*$$,DATE "\1",p;g;s,^.* Date: *[^ ]* *\([^ ]*\) .*$$,TIME "\1",p') \ -@IS_SVN_BUILD_TRUE@ | sed 's,^,#define SMARTMONTOOLS_SVN_,' >> $@ - -# SVN not available, guess version info from Id strings -@IS_SVN_BUILD_FALSE@svnversion.h: CHANGELOG Makefile -@IS_SVN_BUILD_FALSE@ echo '/* svnversion.h. Generated by Makefile from Id strings. */' > $@ -@IS_SVN_BUILD_FALSE@ (cd $(srcdir) && cat CHANGELOG Makefile.am configure.in smart*.in *.cpp *.h *.s) \ -@IS_SVN_BUILD_FALSE@ | sed -n 's,^.*\$$[I][d]: [^ ]* \([0-9][0-9]* [0-9][-0-9]* [0-9][:0-9]*\)[^:0-9][^$$]*\$$.*$$,\1,p' \ -@IS_SVN_BUILD_FALSE@ | sort -n -r \ -@IS_SVN_BUILD_FALSE@ | sed -n 'h;s,^\([^ ]*\) .*$$,REV "\1",p;g;s,^[^ ]* \([^ ]*\) .*$$,DATE "\1",p;g;s,^[^ ]* [^ ]* \([^ ]*\)$$,TIME "\1",p;q' \ -@IS_SVN_BUILD_FALSE@ | sed 's,^,#define SMARTMONTOOLS_SVN_,' >> $@ - -# Drive Database -drivedb.h: knowndrives.cpp Makefile - echo '/* drivedb.h. Generated from knowndrives.cpp by Makefile. */' > $@ - sed '1,/^\/\/ BEGIN drivedb.h/d;/^\/\/ END drivedb.h/,$$d;s/^ //' $(srcdir)/knowndrives.cpp >> $@ - -smartd.conf.5.in: smartd.8.in - sed '1,/STARTINCLUDE/ D;/ENDINCLUDE/,$$D' < $(srcdir)/smartd.8.in > $(top_builddir)/tmp.directives - sed '/STARTINCLUDE/,$$D' < $(srcdir)/smartd.conf.5.in > $(top_builddir)/tmp.head - sed '1,/ENDINCLUDE/D' < $(srcdir)/smartd.conf.5.in > $(top_builddir)/tmp.tail - cat $(top_builddir)/tmp.head > $(srcdir)/smartd.conf.5.in - echo '.\" STARTINCLUDE' >> $(srcdir)/smartd.conf.5.in - cat $(top_builddir)/tmp.directives >> $(srcdir)/smartd.conf.5.in - echo '.\" ENDINCLUDE' >> $(srcdir)/smartd.conf.5.in - cat $(top_builddir)/tmp.tail >> $(srcdir)/smartd.conf.5.in - rm -f $(top_builddir)/tmp.head $(top_builddir)/tmp.tail $(top_builddir)/tmp.directives - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@SMART : os_darwin/SMART.in -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ sed "s|/usr/sbin/|$(sbindir)/|" $< > $@ - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@install-initdDATA-darwin: $(initd_DATA) -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(mkinstalldirs) $(DESTDIR)$(initddir) -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(mkinstalldirs) $(DESTDIR)$(initddir)/SMART -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(mkinstalldirs) $(DESTDIR)$(initddir)/SMART/Resources -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(INSTALL_SCRIPT) $(top_builddir)/SMART $(DESTDIR)$(initddir)/SMART -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(INSTALL_DATA) $(srcdir)/os_darwin/StartupParameters.plist \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(DESTDIR)$(initddir)/SMART/StartupParameters.plist -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ for i in English ; do \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ RDIR=$(DESTDIR)$(initddir)/SMART/Resources/$${i}.lproj ; \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(mkinstalldirs) $$RDIR ;\ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $(INSTALL_DATA) $(srcdir)/os_darwin/$${i}_Localizable.strings \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ $$RDIR/Localizable.strings ; \ -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ done -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "\n\n####################################################################\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "# PLEASE READ THIS BOX!\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "# To manually start the smartd daemon, run:\n# ${initddir}/SMART/SMART start\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "# To automatically start smartd on bootup, add the line:\n# SMARTd=-YES-\n# to /etc/hostconfig\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "# smartd can now use a configuration file ${sysconfdir}/smartd.conf. Do:\n# man smartd" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "# to learn about it. A sample configuration file can be found in:\n# ${docdir}\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ @echo -e "####################################################################\n\n" - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@uninstall-initdDATA-darwin: -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_TRUE@ rm -rf $(DESTDIR)$(initddir)/$(initd_install_name) - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@smartd.initd: $(srcdir)/smartd.initd.in Makefile -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ sed "s|/usr/local/sbin/|$(sbindir)/|g" $(srcdir)/smartd.initd.in > $@ - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@install-initdDATA-generic: $(initd_DATA) -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ $(mkinstalldirs) $(DESTDIR)$(initddir) -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ $(INSTALL_SCRIPT) $(top_builddir)/smartd.initd $(DESTDIR)$(initddir)/smartd$(smartd_suffix) -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "\n\n####################################################################\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "# PLEASE READ THIS BOX!\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "# To manually start the smartd daemon, run:\n# ${initddir}/smartd start\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "# To automatically start smartd on bootup, run:\n# /sbin/chkconfig --add smartd\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "# smartd can now use a configuration file ${sysconfdir}/smartd.conf. Do:\n# man smartd" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "# to learn about it. A sample configuration file can be found in:\n# ${docdir}\n#" -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ @echo -e "####################################################################\n\n" - -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@uninstall-initdDATA-generic: -@INSTALL_INITSCRIPT_TRUE@@OS_DARWIN_FALSE@ rm -rf $(DESTDIR)$(initddir)/$(initd_install_name) - -@INSTALL_INITSCRIPT_FALSE@install-initdDATA-null: -@INSTALL_INITSCRIPT_FALSE@uninstall-initdDATA-null: - -install-initdDATA : $(initd_DATA_install) - -uninstall-initdDATA: $(initd_DATA_uninstall) - -@OS_FREEBSD_TRUE@.for file in $(man_MANS) -@OS_FREEBSD_TRUE@${file}: $(srcdir)/${file}.in Makefile svnversion.h -@OS_FREEBSD_TRUE@ sed "s|CURRENT_CVS_VERSION|$(releaseversion)|g; \ -@OS_FREEBSD_TRUE@ s|CURRENT_CVS_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g; \ -@OS_FREEBSD_TRUE@ s|CURRENT_CVS_TIME|`sed -n 's,^.*TIME[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g; \ -@OS_FREEBSD_TRUE@ s|/usr/local/share/man/|$(mandir)/|g; \ -@OS_FREEBSD_TRUE@ s|/usr/local/sbin/|$(sbindir)/|g; \ -@OS_FREEBSD_TRUE@ s|/usr/local/etc/rc\\.d/init.d/|$(initddir)/|g; \ -@OS_FREEBSD_TRUE@ s|/usr/local/share/doc/smartmontools-5.1/|$(docsdir)/|g; \ -@OS_FREEBSD_TRUE@ s|/usr/local/etc/smartd\\.conf|$(sysconfdir)/smartd.conf|g; \ -@OS_FREEBSD_TRUE@ s|/usr/local/etc/smart_drivedb\\.h|$(sysconfdir)/smart_drivedb\\.h|g" ${.ALLSRC:M*.in} | \ -@OS_FREEBSD_TRUE@ $(MAN_DRIVEDB) | \ -@OS_FREEBSD_TRUE@ $(MAN_SAVESTATES) | \ -@OS_FREEBSD_TRUE@ $(MAN_ATTRIBUTELOG) > $@ -@OS_FREEBSD_TRUE@.endfor -@OS_FREEBSD_FALSE@smart%: $(srcdir)/smart%.in Makefile svnversion.h -@OS_FREEBSD_FALSE@ sed "s|CURRENT_CVS_VERSION|$(releaseversion)|g" $< | \ -@OS_FREEBSD_FALSE@ sed "s|CURRENT_CVS_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g" | \ -@OS_FREEBSD_FALSE@ sed "s|CURRENT_CVS_TIME|`sed -n 's,^.*TIME[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`|g" | \ -@OS_FREEBSD_FALSE@ sed "s|/usr/local/share/man/|$(mandir)/|g" | \ -@OS_FREEBSD_FALSE@ sed "s|/usr/local/sbin/|$(sbindir)/|g" | \ -@OS_FREEBSD_FALSE@ sed "s|/usr/local/etc/rc\\.d/init.d/|$(initddir)/|g" | \ -@OS_FREEBSD_FALSE@ sed "s|/usr/local/share/doc/smartmontools-5.1/|$(docsdir)/|g" | \ -@OS_FREEBSD_FALSE@ sed "s|/usr/local/etc/smartd\\.conf|$(sysconfdir)/smartd.conf|g" | \ -@OS_FREEBSD_FALSE@ sed "s|/usr/local/etc/smart_drivedb\\.h|$(sysconfdir)/smart_drivedb\\.h|g" | \ -@OS_FREEBSD_FALSE@ $(MAN_DRIVEDB) | \ -@OS_FREEBSD_FALSE@ $(MAN_SAVESTATES) | \ -@OS_FREEBSD_FALSE@ $(MAN_ATTRIBUTELOG) > $@ - -# Convert man pages into .html and .txt - -htmlman: smartctl.8.html smartd.8.html smartd.conf.5.html - -txtman: smartctl.8.txt smartd.8.txt smartd.conf.5.txt - -@OS_WIN32_MINGW_TRUE@%.5.html: %.5 -@OS_WIN32_MINGW_TRUE@ $(DOS2UNIX) < $< | $(MAN2HTML) | $(FIXHTML) > $@ - -@OS_WIN32_MINGW_TRUE@%.8.html: %.8 -@OS_WIN32_MINGW_TRUE@ $(DOS2UNIX) < $< | $(MAN2HTML) | $(FIXHTML) > $@ - -@OS_WIN32_MINGW_FALSE@%.5.html: %.5 -@OS_WIN32_MINGW_FALSE@ $(MAN2HTML) $< | $(FIXHTML) > $@ - -@OS_WIN32_MINGW_FALSE@%.8.html: %.8 -@OS_WIN32_MINGW_FALSE@ $(MAN2HTML) $< | $(FIXHTML) > $@ - -%.5.txt: %.5 - $(MAN2TXT) $< > $@ - -%.8.txt: %.8 - $(MAN2TXT) $< > $@ - -# Build Windows distribution - -@OS_WIN32_MINGW_TRUE@dist-win32: $(distzip_win32) - -@OS_WIN32_MINGW_TRUE@install-win32: $(distinst_win32) -@OS_WIN32_MINGW_TRUE@ ./$(distinst_win32) - -@OS_WIN32_MINGW_TRUE@installer-win32: $(distinst_win32) - -@OS_WIN32_MINGW_TRUE@distdir-win32: distdir.mkdir $(FILES_WIN32) syslogevt.check - -@OS_WIN32_MINGW_TRUE@$(distzip_win32): distdir.mkdir $(FILES_WIN32) syslogevt.check -@OS_WIN32_MINGW_TRUE@ @rm -fv $(distzip_win32) -@OS_WIN32_MINGW_TRUE@ cd $(distdir_win32) && zip -9Dr ../$(distzip_win32) . - -# Build NSIS installer, try to locate makensis in default location first -@OS_WIN32_MINGW_TRUE@$(distinst_win32): $(srcdir)/os_win32/installer.nsi distdir.mkdir $(FILES_WIN32) syslogevt.check -@OS_WIN32_MINGW_TRUE@ @makensis="$(MAKENSIS)"; if [ -z "$$makensis" ]; then \ -@OS_WIN32_MINGW_TRUE@ if [ ! -z "$$PROGRAMFILES" ] && "$$PROGRAMFILES/NSIS/makensis" /VERSION >/dev/null 2>&1; then \ -@OS_WIN32_MINGW_TRUE@ makensis="$$PROGRAMFILES/NSIS/makensis"; \ -@OS_WIN32_MINGW_TRUE@ elif makensis /VERSION >/dev/null 2>&1; then \ -@OS_WIN32_MINGW_TRUE@ makensis=makensis; \ -@OS_WIN32_MINGW_TRUE@ else \ -@OS_WIN32_MINGW_TRUE@ echo 'makensis: command not found. Please download and install NSIS' 1>&2; \ -@OS_WIN32_MINGW_TRUE@ echo 'from http://nsis.sourceforge.net/Download' 1>&2; exit 1; \ -@OS_WIN32_MINGW_TRUE@ fi; \ -@OS_WIN32_MINGW_TRUE@ fi; \ -@OS_WIN32_MINGW_TRUE@ date=`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$$,\1,p' svnversion.h`; \ -@OS_WIN32_MINGW_TRUE@ rev=`sed -n 's,^.*REV[^"]*"\([^"]*\)".*$$,r\1,p' svnversion.h`; \ -@OS_WIN32_MINGW_TRUE@ verstr="$(PACKAGE_VERSION) $$date $$rev "$(BUILD_INFO); \ -@OS_WIN32_MINGW_TRUE@ echo "$$makensis /V2 /NOCD /DINPDIR=$(distdir_win32) /DOUTFILE=$(distinst_win32) /DVERSTR='$$verstr' $(srcdir)/os_win32/installer.nsi"; \ -@OS_WIN32_MINGW_TRUE@ "$$makensis" /V2 /NOCD /DINPDIR="$(distdir_win32)" /DOUTFILE="$(distinst_win32)" /DVERSTR="$$verstr" "$(srcdir)/os_win32/installer.nsi" - -@OS_WIN32_MINGW_TRUE@cleandist-win32: -@OS_WIN32_MINGW_TRUE@ rm -rf $(distdir_win32) distdir.mkdir syslogevt.check - -@OS_WIN32_MINGW_TRUE@distdir.mkdir: -@OS_WIN32_MINGW_TRUE@ @test -d $(exedir_win32) || mkdir -pv $(exedir_win32) -@OS_WIN32_MINGW_TRUE@ @test -d $(docdir_win32) || mkdir -pv $(docdir_win32) -@OS_WIN32_MINGW_TRUE@ touch $@ - -@OS_WIN32_MINGW_TRUE@syslogevt.check: -@OS_WIN32_MINGW_TRUE@ @if [ -f $(srcdir)/os_win32/syslogevt.exe ]; then \ -@OS_WIN32_MINGW_TRUE@ cp -pv $(srcdir)/os_win32/syslogevt.exe $(exedir_win32)/syslogevt.exe; \ -@OS_WIN32_MINGW_TRUE@ else echo "Warning: $(srcdir)/os_win32/syslogevt.exe missing."; fi -@OS_WIN32_MINGW_TRUE@ touch $@ - -@OS_WIN32_MINGW_TRUE@$(exedir_win32)/%.exe: %.exe -@OS_WIN32_MINGW_TRUE@ cp -p $< $@ -@OS_WIN32_MINGW_TRUE@ strip -s $@ -@OS_WIN32_MINGW_TRUE@ touch -r $< $@ - -@OS_WIN32_MINGW_TRUE@$(docdir_win32)/%.html: %.html -@OS_WIN32_MINGW_TRUE@ $(UNIX2DOS) < $< > $@ -@OS_WIN32_MINGW_TRUE@ touch -r $< $@ - -@OS_WIN32_MINGW_TRUE@$(docdir_win32)/%.txt: %.txt -@OS_WIN32_MINGW_TRUE@ $(UNIX2DOS) < $< > $@ -@OS_WIN32_MINGW_TRUE@ touch -r $< $@ - -@OS_WIN32_MINGW_TRUE@$(docdir_win32)/%.txt: $(srcdir)/% -@OS_WIN32_MINGW_TRUE@ $(UNIX2DOS) < $< > $@ -@OS_WIN32_MINGW_TRUE@ touch -r $< $@ - -@OS_WIN32_MINGW_TRUE@$(docdir_win32)/%.conf: $(srcdir)/%.conf -@OS_WIN32_MINGW_TRUE@ $(UNIX2DOS) < $< > $@ -@OS_WIN32_MINGW_TRUE@ touch -r $< $@ - -# Build non-console version of smartctl for GSmartControl. -# The script below changes the word at offset 220 (Subsystem) from 3 -# (Console) to 2 (GUI) in a copy of smartctl.exe. -# This will be changed when a tool (like 'editbin') is available in -# the Cygwin distribution -@OS_WIN32_MINGW_TRUE@smartctl-nc.exe: smartctl.exe -@OS_WIN32_MINGW_TRUE@ @rm -f $@ -@OS_WIN32_MINGW_TRUE@ cp -p smartctl.exe $@.tmp -@OS_WIN32_MINGW_TRUE@ @if test `od -A n -j 220 -N 2 -d $@.tmp` -eq 3; then :; \ -@OS_WIN32_MINGW_TRUE@ else echo "invalid EXE header"; exit 1; fi -@OS_WIN32_MINGW_TRUE@ @echo "editbin /subsystem:windows $@.tmp" -@OS_WIN32_MINGW_TRUE@ @echo -ne '\002' | dd bs=1 seek=220 count=1 conv=notrunc of=$@.tmp 2>/dev/null -@OS_WIN32_MINGW_TRUE@ @if test `od -A n -j 220 -N 2 -d $@.tmp` -eq 2; then :; \ -@OS_WIN32_MINGW_TRUE@ else echo "EXE patch failed"; exit 1; fi -@OS_WIN32_MINGW_TRUE@ mv -f $@.tmp $@ - -# Build {config,svnversion}_vc8.h for MSVC8 from MinGW {config,svnversion}.h - -@OS_WIN32_MINGW_TRUE@config-vc8: $(srcdir)/os_win32/config_vc8.h $(srcdir)/os_win32/svnversion_vc8.h - -@OS_WIN32_MINGW_TRUE@$(srcdir)/os_win32/config_vc8.h: config.h -@OS_WIN32_MINGW_TRUE@ sed '1i/* config_vc8.h. Generated from config.h by Makefile. */' $< | \ -@OS_WIN32_MINGW_TRUE@ sed 's,^#define HAVE_\(ATTR_PACKED\|INTTYPES_H\|STDINT_H\|STRINGS_H\|STRTOULL\|U*INT64_T\|UNISTD_H\|WORKING_SNPRINTF\) 1$$,/* #undef HAVE_\1 */,' | \ -@OS_WIN32_MINGW_TRUE@ sed 's,i.86-pc-mingw32,i686-pc-win32vc8,' > $@ - -@OS_WIN32_MINGW_TRUE@$(srcdir)/os_win32/svnversion_vc8.h: svnversion.h -@OS_WIN32_MINGW_TRUE@ cp svnversion.h $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/NEWS b/NEWS index 71c7d2f..6892d0c 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,19 @@ smartmontools NEWS ------------------ -$Id: NEWS 3054 2010-01-28 20:48:28Z chrfranke $ +$Id: NEWS 3057 2010-02-03 20:56:41Z chrfranke $ The most up-to-date version of this file is: http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/trunk/smartmontools/NEWS?view=markup +Date +Summary: smartmontools release 5.40 +----------------------------------------------------------- +- Option '-v' allows to specify byte order of attribute raw value +- configure: New default value for '--with-docdir'. +- Drive database is in a separate source file 'drivedb.h' + which can be downloaded from SVN. +- smartd libcap-ng support, option '-C, --capabilities'. + Date 2010-01-28 Summary: smartmontools release 5.39.1 ----------------------------------------------------------- diff --git a/TODO b/TODO index fb0e6c3..caa27ef 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,9 @@ TODO list for smartmontools: -$Id: TODO 2966 2009-10-23 21:05:16Z chrfranke $ +$Id: TODO 3006 2009-12-19 21:04:17Z chrfranke $ + +See also the list of active tickets: +http://sourceforge.net/apps/trac/smartmontools/report/1 USB devices under Linux ----------------------- @@ -16,11 +19,6 @@ Add ability to print counters/values from "Device Statistics" pages (General Purpose Log address 0x04). See ATA ACS-2 T13/2015-D Revision 1, Section A.5. -smartctl/smartd ---------------- -Add additional -v options (corresponding to comments in -atacmds.c:ataPrintSmartAttribName(). - smartctl: --------- Parse and print additional Attribute flag meanings (IBM ones, eg diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 104cb9b..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,1025 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -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'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -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.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# Figure out how to run the assembler. -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_PROG_AS -# ---------- -AC_DEFUN([AM_PROG_AS], -[# By default we simply use the C compiler to build assembly code. -AC_REQUIRE([AC_PROG_CC]) -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS -AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) -AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) -_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl -]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - 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 - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # 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 - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - 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 - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $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 $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 - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 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"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# 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 -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl 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 -]) - -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 -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != 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)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# 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 - 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]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -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 " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# 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 -# 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 - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _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, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/atacmds.cpp b/atacmds.cpp index 72c4030..06024e5 100644 --- a/atacmds.cpp +++ b/atacmds.cpp @@ -3,8 +3,8 @@ * * Home page of code is: http://smartmontools.sourceforge.net * - * Copyright (C) 2002-9 Bruce Allen - * Copyright (C) 2008-9 Christian Franke + * Copyright (C) 2002-10 Bruce Allen + * Copyright (C) 2008-10 Christian Franke * Copyright (C) 1999-2000 Michael Cornwell * Copyright (C) 2000 Andre Hedrick * @@ -37,7 +37,7 @@ #include "utility.h" #include "dev_ata_cmd_set.h" // for parsed_ata_device -const char * atacmds_cpp_cvsid = "$Id: atacmds.cpp 3046 2010-01-22 21:30:02Z chrfranke $" +const char * atacmds_cpp_cvsid = "$Id: atacmds.cpp 3040 2010-01-18 20:57:39Z chrfranke $" ATACMDS_H_CVSID; // for passing global control variables @@ -58,7 +58,8 @@ extern smartmonctrl *con; // that SMART was first added into the ATA/ATAPI-3 Standard with // Revision 3 of the document, July 25, 1995. Look at the "Document // Status" revision commands at the beginning of -// http://www.t13.org/project/d2008r6.pdf to see this. +// http://www.t13.org/Documents/UploadedDocuments/project/d2008r7b-ATA-3.pdf +// to see this. #define NOVAL_0 0x0000 #define NOVAL_1 0xffff /* word 81: minor version number */ @@ -271,6 +272,19 @@ bool parse_attribute_def(const char * opt, ata_vendor_attr_defs & defs, flags = ATTRFLAG_INCREASING; } + // Split "format[:byteorder]" + char byteorder[8+1] = ""; + if (strchr(fmtname, ':')) { + if (!( sscanf(fmtname, "%*[^:]%n:%8[012345rvwz]%n", &n1, byteorder, &n2) >= 1 + && n2 == (int)strlen(fmtname))) + return false; + fmtname[n1] = 0; + if (strchr(byteorder, 'v')) + flags |= (ATTRFLAG_NO_NORMVAL|ATTRFLAG_NO_WORSTVAL); + if (strchr(byteorder, 'w')) + flags |= ATTRFLAG_NO_WORSTVAL; + } + // Find format name for (i = 0; ; i++) { if (i >= num_format_names) @@ -280,9 +294,9 @@ bool parse_attribute_def(const char * opt, ata_vendor_attr_defs & defs, } ata_attr_raw_format format = format_names[i].format; - // 64-bit formats use the normalized value bytes. - if (format == RAWFMT_RAW64 || format == RAWFMT_HEX64) - flags |= ATTRFLAG_NO_NORMVAL; + // 64-bit formats use the normalized and worst value bytes. + if (!*byteorder && (format == RAWFMT_RAW64 || format == RAWFMT_HEX64)) + flags |= (ATTRFLAG_NO_NORMVAL|ATTRFLAG_NO_WORSTVAL); if (!id) { // "N,format" -> set format for all entries @@ -294,6 +308,7 @@ bool parse_attribute_def(const char * opt, ata_vendor_attr_defs & defs, defs[i].priority = priority; defs[i].raw_format = format; defs[i].flags = flags; + strcpy(defs[i].byteorder, byteorder); } } else if (defs[id].priority <= priority) { @@ -303,6 +318,7 @@ bool parse_attribute_def(const char * opt, ata_vendor_attr_defs & defs, defs[id].raw_format = format; defs[id].priority = priority; defs[id].flags = flags; + strcpy(defs[id].byteorder, byteorder); } return true; @@ -317,7 +333,7 @@ std::string create_vendor_attribute_arg_list() std::string s; unsigned i; for (i = 0; i < num_format_names; i++) - s += strprintf("%s\tN,%s[,ATTR_NAME]", + s += strprintf("%s\tN,%s[:012345rvwz][,ATTR_NAME]", (i>0 ? "\n" : ""), format_names[i].name); for (i = 0; i < num_old_vendor_opts; i++) s += strprintf("\n\t%s", map_old_vendor_opts[i][0]); @@ -420,12 +436,19 @@ void print_regs(const char * prefix, const ata_out_regs & r, const char * suffix static void prettyprint(const unsigned char *p, const char *name){ pout("\n===== [%s] DATA START (BASE-16) =====\n", name); for (int i=0; i<512; i+=16, p+=16) +#define P(n) (isprint((int)(p[n]))?(int)(p[n]):'.') // print complete line to avoid slow tty output and extra lines in syslog. pout("%03d-%03d: %02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x\n", + "%02x %02x %02x %02x %02x %02x %02x %02x" + " |%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c|" + "%c", i, i+16-1, p[ 0], p[ 1], p[ 2], p[ 3], p[ 4], p[ 5], p[ 6], p[ 7], - p[ 8], p[ 9], p[10], p[11], p[12], p[13], p[14], p[15]); + p[ 8], p[ 9], p[10], p[11], p[12], p[13], p[14], p[15], + P( 0), P( 1), P( 2), P( 3), P( 4), P( 5), P( 6), P( 7), + P( 8), P( 9), P(10), P(11), P(12), P(13), P(14), P(15), + '\n'); +#undef P pout("===== [%s] DATA END (512 Bytes) =====\n\n", name); } @@ -600,8 +623,10 @@ int smartcommandhandler(ata_device * device, smart_command_set command, int sele "probable SAT/USB truncation\n"); } else { // We haven't gotten output that makes sense; print out some debugging info - pout("Error SMART Status command failed\n" - "Please get assistance from %s\n", PACKAGE_HOMEPAGE); + pout("Error SMART Status command failed\n"); + pout("Please get assistance from %s\n", PACKAGE_HOMEPAGE); + pout("Register values returned from SMART Status command are:\n"); + print_regs(" ", out.out_regs); errno = EIO; retval = -1; } @@ -837,7 +862,7 @@ int ataVersionInfo(const char ** description, const ata_identify_device * drive, // First check if device has ANY ATA version information in it if (major==NOVAL_0 || major==NOVAL_1) { *description=NULL; - return -1; + return 0; // No info found } // The minor revision number has more information - try there first @@ -1736,8 +1761,8 @@ ata_attr_state ata_get_attr_state(const ata_smart_attribute & attr, if (attr.current <= thre.threshold) return ATTRSTATE_FAILED_NOW; - // Failed in the passed if worst value is below threshold - if (attr.worst <= thre.threshold) + // Failed in the past if worst value is below threshold + if (!(defs[attr.id].flags & ATTRFLAG_NO_WORSTVAL) && attr.worst <= thre.threshold) return ATTRSTATE_FAILED_PAST; return ATTRSTATE_OK; @@ -1767,24 +1792,36 @@ static ata_attr_raw_format get_default_raw_format(unsigned char id) uint64_t ata_get_attr_raw_value(const ata_smart_attribute & attr, const ata_vendor_attr_defs & defs) { - // Get 48 bit raw value - const unsigned char * raw = attr.raw; - uint64_t rawvalue; - rawvalue = raw[0] - | ( raw[1] << 8) - | ( raw[2] << 16) - | ((uint64_t)raw[3] << 24) - | ((uint64_t)raw[4] << 32) - | ((uint64_t)raw[5] << 40); + const ata_vendor_attr_defs::entry & def = defs[attr.id]; - if (defs[attr.id].flags & ATTRFLAG_NO_NORMVAL) { - // Some SSD vendors use bytes 3-10 from the Attribute - // Data Structure to store a 64-bit raw value. - rawvalue <<= 8; - rawvalue |= attr.worst; - rawvalue <<= 8; - rawvalue |= attr.current; + // Use default byteorder if not specified + const char * byteorder = def.byteorder; + if (!*byteorder) { + if (def.raw_format == RAWFMT_RAW64 || def.raw_format == RAWFMT_HEX64) + byteorder = "543210wv"; + else + byteorder = "543210"; } + + // Build 64-bit value from selected bytes + uint64_t rawvalue = 0; + for (int i = 0; byteorder[i]; i++) { + unsigned char b; + switch (byteorder[i]) { + case '0': b = attr.raw[0]; break; + case '1': b = attr.raw[1]; break; + case '2': b = attr.raw[2]; break; + case '3': b = attr.raw[3]; break; + case '4': b = attr.raw[4]; break; + case '5': b = attr.raw[5]; break; + case 'r': b = attr.reserv; break; + case 'v': b = attr.current; break; + case 'w': b = attr.worst; break; + default : b = 0; break; + } + rawvalue <<= 8; rawvalue |= b; + } + return rawvalue; } @@ -1793,7 +1830,7 @@ uint64_t ata_get_attr_raw_value(const ata_smart_attribute & attr, std::string ata_format_attr_raw_value(const ata_smart_attribute & attr, const ata_vendor_attr_defs & defs) { - // Get 48 bit or64 bit raw value + // Get 48 bit or 64 bit raw value uint64_t rawvalue = ata_get_attr_raw_value(attr, defs); // Get 16 bit words @@ -1821,6 +1858,7 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attr, break; case RAWFMT_RAW48: + case RAWFMT_RAW64: s = strprintf("%"PRIu64, rawvalue); break; @@ -1828,10 +1866,6 @@ std::string ata_format_attr_raw_value(const ata_smart_attribute & attr, s = strprintf("0x%012"PRIx64, rawvalue); break; - case RAWFMT_RAW64: - s = strprintf("%"PRIu64, rawvalue); - break; - case RAWFMT_HEX64: s = strprintf("0x%016"PRIx64, rawvalue); break; @@ -2198,7 +2232,7 @@ int ataReadSCTTempHist(ata_device * device, ata_sct_temperature_history_table * return -1; if (!(sts->ext_status_code == 0 && sts->action_code == 5 && sts->function_code == 1)) { - pout("Error unexcepted SCT status 0x%04x (action_code=%u, function_code=%u)\n", + pout("Error unexpected SCT status 0x%04x (action_code=%u, function_code=%u)\n", sts->ext_status_code, sts->action_code, sts->function_code); return -1; } diff --git a/atacmds.h b/atacmds.h index 4500b86..f0a15a0 100644 --- a/atacmds.h +++ b/atacmds.h @@ -26,7 +26,7 @@ #ifndef ATACMDS_H_ #define ATACMDS_H_ -#define ATACMDS_H_CVSID "$Id: atacmds.h 2983 2009-11-14 21:41:41Z chrfranke $" +#define ATACMDS_H_CVSID "$Id: atacmds.h 3020 2009-12-31 01:11:51Z dlukes $" #include "dev_interface.h" // ata_device @@ -656,8 +656,9 @@ enum ata_attr_raw_format // Attribute flags enum { - ATTRFLAG_INCREASING = 0x01, // Value not reset (for reallocated/pending counts) - ATTRFLAG_NO_NORMVAL = 0x02 // Normalized value not valid + ATTRFLAG_INCREASING = 0x01, // Value not reset (for reallocated/pending counts) + ATTRFLAG_NO_NORMVAL = 0x02, // Normalized value not valid + ATTRFLAG_NO_WORSTVAL = 0x04 // Worst value not valid }; // Vendor attribute display defs for all attribute ids @@ -670,12 +671,13 @@ public: ata_attr_raw_format raw_format; // Raw value print format ata_vendor_def_prior priority; // Setting priority unsigned flags; // ATTRFLAG_* + char byteorder[8+1]; // String [012345rvwz] to define byte order entry() : raw_format(RAWFMT_DEFAULT), priority(PRIOR_DEFAULT), flags(0) - { } + { byteorder[0] = 0; } }; entry & operator[](unsigned char id) diff --git a/ataprint.cpp b/ataprint.cpp index 4eb188e..11d6be9 100644 --- a/ataprint.cpp +++ b/ataprint.cpp @@ -44,7 +44,7 @@ #include "utility.h" #include "knowndrives.h" -const char * ataprint_cpp_cvsid = "$Id: ataprint.cpp 3046 2010-01-22 21:30:02Z chrfranke $" +const char * ataprint_cpp_cvsid = "$Id: ataprint.cpp 3037 2010-01-16 20:07:13Z chrfranke $" ATAPRINT_H_CVSID; // for passing global control variables @@ -490,26 +490,29 @@ static bool PrintDriveInfo(const ata_identify_device * drive, bool fix_swapped_i const char *description; unsigned short minorrev; int version = ataVersionInfo(&description, drive, &minorrev); - // unrecognized minor revision code - char unknown[64]; - if (!description){ - if (!minorrev) - sprintf(unknown, "Exact ATA specification draft version not indicated"); - else - sprintf(unknown,"Not recognized. Minor revision code: 0x%02hx", minorrev); - description=unknown; - } - - // SMART Support was first added into the ATA/ATAPI-3 Standard with // Revision 3 of the document, July 25, 1995. Look at the "Document // Status" revision commands at the beginning of - // http://www.t13.org/project/d2008r6.pdf to see this. So it's not - // enough to check if we are ATA-3. Version=-3 indicates ATA-3 - // BEFORE Revision 3. - pout("ATA Version is: %d\n",(int)abs(version)); - pout("ATA Standard is: %s\n",description); - + // http://www.t13.org/Documents/UploadedDocuments/project/d2008r7b-ATA-3.pdf + // to see this. So it's not enough to check if we are ATA-3. + // Version=-3 indicates ATA-3 BEFORE Revision 3. + // Version=0 indicates that no info is found. This may happen if + // the OS provides only part of the IDENTIFY data. + + std::string majorstr, minorstr; + if (version) { + majorstr = strprintf("%d", abs(version)); + if (description) + minorstr = description; + else if (!minorrev) + minorstr = "Exact ATA specification draft version not indicated"; + else + minorstr = strprintf("Not recognized. Minor revision code: 0x%04x", minorrev); + } + + pout("ATA Version is: %s\n", infofound(majorstr.c_str())); + pout("ATA Standard is: %s\n", infofound(minorstr.c_str())); + // print current time and date and timezone char timedatetz[DATEANDEPOCHLEN]; dateandtimezone(timedatetz); pout("Local Time is: %s\n", timedatetz); @@ -518,7 +521,7 @@ static bool PrintDriveInfo(const ata_identify_device * drive, bool fix_swapped_i if (dbentry && *dbentry->warningmsg) pout("\n==> WARNING: %s\n\n", dbentry->warningmsg); - if (version>=3) + if (!version || version >= 3) return !!dbentry; pout("SMART is only available in ATA Version 3 Revision 3 or greater.\n"); @@ -836,11 +839,15 @@ static void PrintSmartAttribWithThres(const ata_smart_values * data, } // Format value, worst, threshold - std::string valstr, threstr; + std::string valstr, worstr, threstr; if (state > ATTRSTATE_NO_NORMVAL) - valstr = strprintf("%.3d %.3d", attr.current, attr.worst); + valstr = strprintf("%.3d", attr.current); else - valstr = "--- ---"; + valstr = "---"; + if (!(defs[attr.id].flags & ATTRFLAG_NO_WORSTVAL)) + worstr = strprintf("%.3d", attr.worst); + else + worstr = "---"; if (state > ATTRSTATE_NO_THRESHOLD) threstr = strprintf("%.3d", thre.threshold); else @@ -848,9 +855,9 @@ static void PrintSmartAttribWithThres(const ata_smart_values * data, // Print line for each valid attribute std::string attrname = ata_get_smart_attr_name(attr.id, defs); - pout("%3d %-24s0x%04x %-9s %-3s %-10s%-9s%-12s%s\n", + pout("%3d %-24s0x%04x %-3s %-3s %-3s %-10s%-9s%-12s%s\n", attr.id, attrname.c_str(), attr.flags, - valstr.c_str(), threstr.c_str(), + valstr.c_str(), worstr.c_str(), threstr.c_str(), (ATTRIBUTE_FLAGS_PREFAILURE(attr.flags)? "Pre-fail" : "Old_age"), (ATTRIBUTE_FLAGS_ONLINE(attr.flags)? "Always" : "Offline"), (state == ATTRSTATE_FAILED_NOW ? "FAILING_NOW" : @@ -1012,10 +1019,16 @@ static void PrintLogPages(const char * type, const unsigned char * data, for (unsigned i = 0; i < num_pages * 512; i += 16) { const unsigned char * p = data+i; pout("%07x: %02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x\n", + "%02x %02x %02x %02x %02x %02x %02x %02x ", (page * 512) + i, p[ 0], p[ 1], p[ 2], p[ 3], p[ 4], p[ 5], p[ 6], p[ 7], p[ 8], p[ 9], p[10], p[11], p[12], p[13], p[14], p[15]); +#define P(n) (isprint((int)(p[n]))?(int)(p[n]):'.') + pout("|%c%c%c%c%c%c%c%c" + "%c%c%c%c%c%c%c%c|\n", + P( 0), P( 1), P( 2), P( 3), P( 4), P( 5), P( 6), P( 7), + P( 8), P( 9), P(10), P(11), P(12), P(13), P(14), P(15)); +#undef P if ((i & 0x1ff) == 0x1f0) pout("\n"); } @@ -1159,7 +1172,7 @@ static int PrintSmartErrorlog(const ata_smart_errorlog *data, const ata_smart_errorlog_error_struct * summary = &(elog->error_struct); // Spec says: unused error log structures shall be zero filled - if (nonempty((unsigned char*)elog,sizeof(*elog))){ + if (nonempty(elog, sizeof(*elog))){ // Table 57 of T13/1532D Volume 1 Revision 3 const char *msgstate = get_error_log_state_desc(summary->state); int days = (int)summary->timestamp/24; @@ -1195,7 +1208,7 @@ static int PrintSmartErrorlog(const ata_smart_errorlog *data, const ata_smart_errorlog_command_struct * thiscommand = elog->commands+j; // Spec says: unused data command structures shall be zero filled - if (nonempty((unsigned char*)thiscommand,sizeof(*thiscommand))) { + if (nonempty(thiscommand, sizeof(*thiscommand))) { char timestring[32]; // Convert integer milliseconds to a text-format string @@ -1763,7 +1776,7 @@ int ataPrintMain (ata_device * device, const ata_print_options & options) // If requested, show which presets would be used for this drive and exit. if (options.show_presets) { show_presets(&drive, options.fix_swapped_id); - EXIT(0); + return 0; } // Use preset vendor attribute options unless user has requested otherwise. diff --git a/ataprint.h b/ataprint.h index 58a629d..7fd3be7 100644 --- a/ataprint.h +++ b/ataprint.h @@ -26,7 +26,7 @@ #ifndef ATAPRINT_H_ #define ATAPRINT_H_ -#define ATAPRINT_H_CVSID "$Id: ataprint.h 2975 2009-10-29 22:52:38Z chrfranke $\n" +#define ATAPRINT_H_CVSID "$Id: ataprint.h 3020 2009-12-31 01:11:51Z dlukes $\n" #include diff --git a/autogen.sh b/autogen.sh index e90692f..ca1c411 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: autogen.sh 2844 2009-07-18 12:59:21Z chrfranke $ +# $Id: autogen.sh 3043 2010-01-22 19:24:59Z chrfranke $ # # Generate ./configure from config.in and Makefile.in from Makefile.am. # This also adds files like missing,depcomp,install-sh to the source @@ -64,7 +64,7 @@ case "$AUTOMAKE" in *automake-1.8) ver=1.8 ;; *) - ver="`$AUTOMAKE --version | sed -n '1s,^.*\([12]\.[.0-9]*[-pl0-9]*\).*$,\1,p'`" + ver="`$AUTOMAKE --version | sed -n '1s,^.*[^.0-9]\([12]\.[0-9][-.0-9pl]*\).*$,\1,p'`" ver="${ver:-?.?.?}" esac @@ -83,7 +83,7 @@ case "$ver" in rm -f casetest.tmp ;; - 1.9.[1-6]|1.10|1.10.[12]|1.11) + 1.9.[1-6]|1.10|1.10.[12]|1.11|1.11.1) # OK ;; diff --git a/config.guess b/config.guess deleted file mode 100755 index dc84c68..0000000 --- a/config.guess +++ /dev/null @@ -1,1501 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.h.in b/config.h.in deleted file mode 100644 index 7f13133..0000000 --- a/config.h.in +++ /dev/null @@ -1,169 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* smartmontools CVS Tag */ -#undef CONFIG_H_CVSID - -/* use mailx as default mailer */ -#undef DEFAULT_MAILER - -/* Define to 1 if you have the `ata_identify_is_cached' function in os_*.c. */ -#undef HAVE_ATA_IDENTIFY_IS_CACHED - -/* Define to 1 if C++ compiler supports __attribute__((packed)) */ -#undef HAVE_ATTR_PACKED - -/* Define to 1 if you have the header file. */ -#undef HAVE_DEV_ATA_ATAVAR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_DEV_CISS_CISSIO_H - -/* Define to 1 if you have the `getaddrinfo' function. */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getdomainname' function. */ -#undef HAVE_GETDOMAINNAME - -/* Define to 1 if you have the `gethostbyname' function. */ -#undef HAVE_GETHOSTBYNAME - -/* Define to 1 if you have the `gethostname' function. */ -#undef HAVE_GETHOSTNAME - -/* Define to 1 if you have the `getopt_long' function. */ -#undef HAVE_GETOPT_LONG - -/* Define to 1 if you have the `get_os_version_str' function in os_*.c. */ -#undef HAVE_GET_OS_VERSION_STR - -/* Define to 1 if the system has the type `int64_t'. */ -#undef HAVE_INT64_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `usb' library (-lusb). */ -#undef HAVE_LIBUSB - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_CCISS_IOCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LINUX_COMPILER_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SELINUX_SELINUX_H - -/* Define to 1 if you have the `sigset' function. */ -#undef HAVE_SIGSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strtoull' function. */ -#undef HAVE_STRTOULL - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_INT_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TWEIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TWEREG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TW_OSL_IOCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if the system has the type `uint64_t'. */ -#undef HAVE_UINT64_T - -/* Define to 1 if you have the `uname' function. */ -#undef HAVE_UNAME - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if the `snprintf' function is sane */ -#undef HAVE_WORKING_SNPRINTF - -/* need assembly code os_solaris_ata.s */ -#undef NEED_SOLARIS_ATA_CODE - -/* Define to 1 if os_*.cpp still uses the old interface */ -#undef OLD_INTERFACE - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* smartmontools Home Page */ -#undef PACKAGE_HOMEPAGE - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* smartmontools Build Host */ -#undef SMARTMONTOOLS_BUILD_HOST - -/* smartmontools Configure Arguments */ -#undef SMARTMONTOOLS_CONFIGURE_ARGS - -/* smartmontools Configure Date */ -#undef SMARTMONTOOLS_CONFIGURE_DATE - -/* smartmontools Release Date */ -#undef SMARTMONTOOLS_RELEASE_DATE - -/* smartmontools Release Time */ -#undef SMARTMONTOOLS_RELEASE_TIME - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to 1 if SELinux support is enabled */ -#undef WITH_SELINUX diff --git a/config.sub b/config.sub deleted file mode 100755 index 2a55a50..0000000 --- a/config.sub +++ /dev/null @@ -1,1705 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/configure b/configure deleted file mode 100755 index eb57ee3..0000000 --- a/configure +++ /dev/null @@ -1,7490 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for smartmontools 5.39.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $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 and -$0: smartmontools-support@lists.sourceforge.net about your -$0: system, 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." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='smartmontools' -PACKAGE_TARNAME='smartmontools' -PACKAGE_VERSION='5.39.1' -PACKAGE_STRING='smartmontools 5.39.1' -PACKAGE_BUGREPORT='smartmontools-support@lists.sourceforge.net' -PACKAGE_URL='' - -ac_unique_file="smartctl.cpp" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -OS_FREEBSD_FALSE -OS_FREEBSD_TRUE -OS_WIN32_MINGW_FALSE -OS_WIN32_MINGW_TRUE -OS_SOLARIS_FALSE -OS_SOLARIS_TRUE -OS_DARWIN_FALSE -OS_DARWIN_TRUE -os_libs -os_deps -smartmontools_release_time -smartmontools_release_date -releaseversion -with_selinux -SMARTD_SUFFIX_FALSE -SMARTD_SUFFIX_TRUE -smartd_suffix -ENABLE_ATTRIBUTELOG_FALSE -ENABLE_ATTRIBUTELOG_TRUE -attributelogdir -attributelog -ENABLE_SAVESTATES_FALSE -ENABLE_SAVESTATES_TRUE -savestatesdir -savestates -ENABLE_DRIVEDB_FALSE -ENABLE_DRIVEDB_TRUE -drivedbdir -INSTALL_INITSCRIPT_FALSE -INSTALL_INITSCRIPT_TRUE -initddir -exampledir -ASFLAGS -gcc_have_attr_packed -libc_have_working_snprintf -EGREP -GREP -CXXCPP -IS_SVN_BUILD_FALSE -IS_SVN_BUILD_TRUE -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -am__fastdepCCAS_FALSE -am__fastdepCCAS_TRUE -CCASDEPMODE -CCASFLAGS -CCAS -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -ac_ct_CC -CFLAGS -CC -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CXX -CPPFLAGS -LDFLAGS -CXXFLAGS -CXX -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_dependency_tracking -with_initscriptdir -with_docdir -enable_drivedb -with_drivedbdir -enable_savestates -with_savestates -enable_attributelog -with_attributelog -enable_sample -with_os_deps -with_selinux -' - ac_precious_vars='build_alias -host_alias -target_alias -CXX -CXXFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCC -CC -CFLAGS -CCAS -CCASFLAGS -CXXCPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures smartmontools 5.39.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/smartmontools] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of smartmontools 5.39.1:";; - 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-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-drivedb Enables drive database file - --enable-savestates Enables default smartd state files - --enable-attributelog Enables default smartd attribute log files - --enable-sample Enables appending .sample to the installed smartd rc - script and configuration file - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-initscriptdir=dir - Location of init scripts (default is - ${sysconfdir}/rc.d/init.d) - --with-docdir=dir Location of documentation (default is - ${prefix}/share/doc/smartmontools-5.X) - --with-drivedbdir=DIR Location of drive database file (implies - --enable-drivedb) [DATADIR/smartmontools] - --with-savestates=PREFIX - Prefix for default smartd state files (implies - --enable-savestates) - [LOCALSTATEDIR/lib/smartmontools/smartd.] - --with-attributelog=PREFIX - Prefix for default smartd attribute log files - (implies --enable-attributelog) - [LOCALSTATEDIR/lib/smartmontools/attrlog.] - --with-os-deps='os_module.o ...' - Specify OS dependent module(s) [guessed] - --with-selinux Enables SELinux support - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CC C compiler command - CFLAGS C compiler flags - CCAS assembler compiler command (defaults to CC) - CCASFLAGS assembler compiler flags (defaults to CFLAGS) - CXXCPP C++ preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -smartmontools configure 5.39.1 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_cxx_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$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;} -( cat <<\_ASBOX -## ---------------------------------------------------------- ## -## Report this to smartmontools-support@lists.sourceforge.net ## -## ---------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_header_mongrel - -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run - -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES -# --------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_header_compile - -# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES -# --------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_cxx_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_type - -# ac_fn_cxx_check_func LINENO FUNC VAR -# ------------------------------------ -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_cxx_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* 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 $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_cxx_check_func -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 smartmontools $as_me 5.39.1, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -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 - - - - -smartmontools_configure_date=`date -u +'%Y-%m-%d %T %Z'` -smartmontools_cvs_tag=`echo '$Id: configure.in 3054 2010-01-28 20:48:28Z chrfranke $'` -smartmontools_release_date=2010-01-28 -smartmontools_release_time="20:46:44 UTC" - - -cat >>confdefs.h <<_ACEOF -#define SMARTMONTOOLS_CONFIGURE_ARGS "$ac_configure_args" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SMARTMONTOOLS_CONFIGURE_DATE "$smartmontools_configure_date" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SMARTMONTOOLS_RELEASE_DATE "$smartmontools_release_date" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define SMARTMONTOOLS_RELEASE_TIME "$smartmontools_release_time" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define CONFIG_H_CVSID "$smartmontools_cvs_tag" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_HOMEPAGE "http://smartmontools.sourceforge.net/" -_ACEOF - - -ac_config_headers="$ac_config_headers config.h" - - -am__api_version='1.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $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 -# 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 - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - 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 " -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;} -fi - -if test x"${install_sh}" != 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 - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $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 -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $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_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - 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 - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $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 test "${ac_cv_path_mkdir+set}" = set; 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 - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - 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; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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 - -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='smartmontools' - VERSION='5.39.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"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; 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 - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$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 -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -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 -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 test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$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 -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - 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 - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C++ compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# 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 - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - 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 - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # 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 - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - 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 - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $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 $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 - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $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 - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $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 - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $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 -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;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - 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 - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # 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 - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - 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 - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $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 $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 - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -# By default we simply use the C compiler to build assembly code. - -test "${CCAS+set}" = set || CCAS=$CC -test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS - - - -depcc="$CCAS" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CCAS_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # 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 - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - 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 - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $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 $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 - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CCAS_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CCAS_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } -CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then - am__fastdepCCAS_TRUE= - am__fastdepCCAS_FALSE='#' -else - am__fastdepCCAS_TRUE='#' - am__fastdepCCAS_FALSE= -fi - - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -case "${host}" in - *-*-mingw*) - # If building on Cygwin and not cross-compiling add '-mno-cygwin' - # to select MinGW gcc. This does no longer work for gcc 4.x. - if test "${build}" = "${host}" && test -x /usr/bin/uname && \ - /usr/bin/uname | grep -i '^CYGWIN' >/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C and C++ compiler support -mno-cygwin" >&5 -$as_echo_n "checking whether C and C++ compiler support -mno-cygwin... " >&6; } - gcc_support_m_no_cygwin=no - if $CC -v -mno-cygwin >/dev/null 2>&1 && \ - $CXX -v -mno-cygwin >/dev/null 2>&1; then - gcc_support_m_no_cygwin=yes - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_support_m_no_cygwin" >&5 -$as_echo "$gcc_support_m_no_cygwin" >&6; } - if test "$gcc_support_m_no_cygwin" != "yes"; then - as_fn_error "$CC and $CXX do not support -mno-cygwin, see INSTALL file for details." "$LINENO" 5 - fi - CPPFLAGS="$CPPFLAGS -mno-cygwin" - LDFLAGS="$LDFLAGS -mno-cygwin" - fi - CPPFLAGS="$CPPFLAGS -idirafter ${srcdir}/posix -idirafter ${srcdir}/os_win32" - ;; - *-*-freebsd*) - CPPFLAGS="$CPPFLAGS -I/usr/src/sys" - ;; -esac - -# Check for SVN. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is a build from SVN" >&5 -$as_echo_n "checking whether this is a build from SVN... " >&6; } -is_svn_build=no -if test -f "$srcdir/.svn/entries"; then - is_svn_build=unknown - if (cd "$srcdir" && svn --version && svnversion && svn info) >/dev/null 2>&1; then - is_svn_build=yes - fi -fi - if test "$is_svn_build" = "yes"; then - IS_SVN_BUILD_TRUE= - IS_SVN_BUILD_FALSE='#' -else - IS_SVN_BUILD_TRUE='#' - IS_SVN_BUILD_FALSE= -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $is_svn_build" >&5 -$as_echo "$is_svn_build" >&6; } - -# AC_SEARCH_LIBS (FUNCTION, SEARCH-LIBS, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [OTHER-LIBRARIES]) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 -$as_echo_n "checking for library containing socket... " >&6; } -if test "${ac_cv_search_socket+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -for ac_lib in '' socket; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_search_socket=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_socket+set}" = set; then : - break -fi -done -if test "${ac_cv_search_socket+set}" = set; then : - -else - ac_cv_search_socket=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 -$as_echo "$ac_cv_search_socket" >&6; } -ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -$as_echo_n "checking for library containing gethostbyname... " >&6; } -if test "${ac_cv_search_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_search_gethostbyname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_gethostbyname+set}" = set; then : - break -fi -done -if test "${ac_cv_search_gethostbyname+set}" = set; then : - -else - ac_cv_search_gethostbyname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 -$as_echo "$ac_cv_search_gethostbyname" >&6; } -ac_res=$ac_cv_search_gethostbyname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 -$as_echo_n "checking for library containing getaddrinfo... " >&6; } -if test "${ac_cv_search_getaddrinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 getaddrinfo (); -int -main () -{ -return getaddrinfo (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_search_getaddrinfo=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_getaddrinfo+set}" = set; then : - break -fi -done -if test "${ac_cv_search_getaddrinfo+set}" = set; then : - -else - ac_cv_search_getaddrinfo=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5 -$as_echo "$ac_cv_search_getaddrinfo" >&6; } -ac_res=$ac_cv_search_getaddrinfo -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getdomainname" >&5 -$as_echo_n "checking for library containing getdomainname... " >&6; } -if test "${ac_cv_search_getdomainname+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$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 getdomainname (); -int -main () -{ -return getdomainname (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_search_getdomainname=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_getdomainname+set}" = set; then : - break -fi -done -if test "${ac_cv_search_getdomainname+set}" = set; then : - -else - ac_cv_search_getdomainname=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getdomainname" >&5 -$as_echo "$ac_cv_search_getdomainname" >&6; } -ac_res=$ac_cv_search_getdomainname -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in locale.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" -if test "x$ac_cv_header_locale_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALE_H 1 -_ACEOF - -fi - -done - -for ac_header in dev/ata/atavar.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "dev/ata/atavar.h" "ac_cv_header_dev_ata_atavar_h" "$ac_includes_default" -if test "x$ac_cv_header_dev_ata_atavar_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DEV_ATA_ATAVAR_H 1 -_ACEOF - -fi - -done - -for ac_header in netdb.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETDB_H 1 -_ACEOF - -fi - -done - -for ac_header in inttypes.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_inttypes_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H 1 -_ACEOF - -fi - -done - for ac_header in stdint.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 -_ACEOF - -fi - -done - for ac_header in sys/inttypes.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_inttypes_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_INTTYPES_H 1 -_ACEOF - -fi - -done - for ac_header in sys/int_types.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sys/int_types.h" "ac_cv_header_sys_int_types_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_int_types_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_INT_TYPES_H 1 -_ACEOF - -fi - -done - for ac_header in sys/tweio.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sys/tweio.h" "ac_cv_header_sys_tweio_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_tweio_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TWEIO_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/twereg.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sys/twereg.h" "ac_cv_header_sys_twereg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_twereg_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TWEREG_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/tw_osl_ioctl.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "sys/tw_osl_ioctl.h" "ac_cv_header_sys_tw_osl_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_tw_osl_ioctl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TW_OSL_IOCTL_H 1 -_ACEOF - -fi - -done - -for ac_header in dev/ciss/cissio.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "dev/ciss/cissio.h" "ac_cv_header_dev_ciss_cissio_h" "$ac_includes_default" -if test "x$ac_cv_header_dev_ciss_cissio_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DEV_CISS_CISSIO_H 1 -_ACEOF - -fi - -done - -for ac_header in linux/compiler.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_compiler_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_COMPILER_H 1 -_ACEOF - -fi - -done - -for ac_header in linux/cciss_ioctl.h -do : - ac_fn_cxx_check_header_compile "$LINENO" "linux/cciss_ioctl.h" "ac_cv_header_linux_cciss_ioctl_h" "$ac_includes_default -#ifdef HAVE_LINUX_COMPILER_H -# include -#endif - -" -if test "x$ac_cv_header_linux_cciss_ioctl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_CCISS_IOCTL_H 1 -_ACEOF - -fi - -done - - -ac_fn_cxx_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" -if test "x$ac_cv_type_int64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT64_T 1 -_ACEOF - - -fi -ac_fn_cxx_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT64_T 1 -_ACEOF - - -fi - - -for ac_func in getopt_long -do : - ac_fn_cxx_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" -if test "x$ac_cv_func_getopt_long" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_LONG 1 -_ACEOF - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: smartmontools does no longer support platforms without getopt_long()." >&5 -$as_echo "$as_me: smartmontools does no longer support platforms without getopt_long()." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Please inform ${PACKAGE_BUGREPORT}," >&5 -$as_echo "$as_me: Please inform ${PACKAGE_BUGREPORT}," >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: including details about your build environment." >&5 -$as_echo "$as_me: including details about your build environment." >&6;} - as_fn_error "function getopt_long() not found" "$LINENO" 5 - -fi -done - - -for ac_func in getdomainname -do : - ac_fn_cxx_check_func "$LINENO" "getdomainname" "ac_cv_func_getdomainname" -if test "x$ac_cv_func_getdomainname" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETDOMAINNAME 1 -_ACEOF - -fi -done - -for ac_func in gethostname -do : - ac_fn_cxx_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" -if test "x$ac_cv_func_gethostname" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTNAME 1 -_ACEOF - -fi -done - -for ac_func in getaddrinfo -do : - ac_fn_cxx_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETADDRINFO 1 -_ACEOF - -fi -done - -for ac_func in gethostbyname -do : - ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYNAME 1 -_ACEOF - -fi -done - -for ac_func in sigset -do : - ac_fn_cxx_check_func "$LINENO" "sigset" "ac_cv_func_sigset" -if test "x$ac_cv_func_sigset" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGSET 1 -_ACEOF - -fi -done - -for ac_func in strtoull -do : - ac_fn_cxx_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" -if test "x$ac_cv_func_strtoull" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOULL 1 -_ACEOF - -fi -done - -for ac_func in uname -do : - ac_fn_cxx_check_func "$LINENO" "uname" "ac_cv_func_uname" -if test "x$ac_cv_func_uname" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNAME 1 -_ACEOF - -fi -done - - -# Check whether snprintf appends null char and returns expected length on overflow - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working snprintf" >&5 -$as_echo_n "checking for working snprintf... " >&6; } -if test "$cross_compiling" = yes; then : - libc_have_working_snprintf=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - char buf[]="ABCDEFGHI"; - int i=snprintf(buf,8,"12345678"); return !(!buf[7] && i==8); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - libc_have_working_snprintf=yes -else - libc_have_working_snprintf=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -if test "$libc_have_working_snprintf" = "yes"; then - $as_echo "#define HAVE_WORKING_SNPRINTF 1" >>confdefs.h - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_have_working_snprintf" >&5 -$as_echo "$libc_have_working_snprintf" >&6; } - -# check for __attribute__((packed)) - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports __attribute__((packed))" >&5 -$as_echo_n "checking whether C++ compiler supports __attribute__((packed))... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -struct a { int b; } __attribute__((packed)); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - gcc_have_attr_packed=yes -else - gcc_have_attr_packed=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#error "Sun's compiler cannot handle __attribute__((packed))!" -#endif - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - true -else - gcc_have_attr_packed=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test "$gcc_have_attr_packed" = "yes"; then - $as_echo "#define HAVE_ATTR_PACKED 1" >>confdefs.h - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_have_attr_packed" >&5 -$as_echo "$gcc_have_attr_packed" >&6; } - - - - - -exampledir='${docdir}/examplescripts' - - - -# Check whether --with-initscriptdir was given. -if test "${with_initscriptdir+set}" = set; then : - withval=$with_initscriptdir; initddir="$withval" -else - initddir='${sysconfdir}/rc.d/init.d' -fi - - - if test "$with_initscriptdir" != "no"; then - INSTALL_INITSCRIPT_TRUE= - INSTALL_INITSCRIPT_FALSE='#' -else - INSTALL_INITSCRIPT_TRUE='#' - INSTALL_INITSCRIPT_FALSE= -fi - - - -# Check whether --with-docdir was given. -if test "${with_docdir+set}" = set; then : - withval=$with_docdir; docdir="$withval" -else - docdir='${prefix}/share/doc/${PACKAGE}-${VERSION}' -fi - - - -# Check whether --enable-drivedb was given. -if test "${enable_drivedb+set}" = set; then : - enableval=$enable_drivedb; -fi - - - -# Check whether --with-drivedbdir was given. -if test "${with_drivedbdir+set}" = set; then : - withval=$with_drivedbdir; drivedbdir="$withval"; enable_drivedb="yes" -else - drivedbdir=; test "$enable_drivedb" = "yes" && drivedbdir='${datadir}/${PACKAGE}' -fi - - - if test "$enable_drivedb" = "yes"; then - ENABLE_DRIVEDB_TRUE= - ENABLE_DRIVEDB_FALSE='#' -else - ENABLE_DRIVEDB_TRUE='#' - ENABLE_DRIVEDB_FALSE= -fi - - -# Check whether --enable-savestates was given. -if test "${enable_savestates+set}" = set; then : - enableval=$enable_savestates; -fi - - - -# Check whether --with-savestates was given. -if test "${with_savestates+set}" = set; then : - withval=$with_savestates; savestates="$withval"; enable_savestates="yes" -else - savestates=; test "$enable_savestates" = "yes" && savestates='${localstatedir}/lib/${PACKAGE}/smartd.' -fi - -savestatesdir="${savestates%/*}" - - - if test "$enable_savestates" = "yes"; then - ENABLE_SAVESTATES_TRUE= - ENABLE_SAVESTATES_FALSE='#' -else - ENABLE_SAVESTATES_TRUE='#' - ENABLE_SAVESTATES_FALSE= -fi - - -# Check whether --enable-attributelog was given. -if test "${enable_attributelog+set}" = set; then : - enableval=$enable_attributelog; -fi - - - -# Check whether --with-attributelog was given. -if test "${with_attributelog+set}" = set; then : - withval=$with_attributelog; attributelog="$withval"; enable_attributelog="yes" -else - attributelog=; test "$enable_attributelog" = "yes" && attributelog='${localstatedir}/lib/${PACKAGE}/attrlog.' -fi - -attributelogdir="${attributelog%/*}" - - - if test "$enable_attributelog" = "yes"; then - ENABLE_ATTRIBUTELOG_TRUE= - ENABLE_ATTRIBUTELOG_FALSE='#' -else - ENABLE_ATTRIBUTELOG_TRUE='#' - ENABLE_ATTRIBUTELOG_FALSE= -fi - - -# Check whether --enable-sample was given. -if test "${enable_sample+set}" = set; then : - enableval=$enable_sample; smartd_suffix='.sample' -else - smartd_suffix='' -fi - - - if test $smartd_suffix; then - SMARTD_SUFFIX_TRUE= - SMARTD_SUFFIX_FALSE='#' -else - SMARTD_SUFFIX_TRUE='#' - SMARTD_SUFFIX_FALSE= -fi - - - -# Check whether --with-os-deps was given. -if test "${with_os_deps+set}" = set; then : - withval=$with_os_deps; for x in $with_os_deps; do - case $x in - *.o) ;; - *) as_fn_error "non-object file specified by --with-os-deps" "$LINENO" 5 ;; - esac - done - -fi - - - -# Check whether --with-selinux was given. -if test "${with_selinux+set}" = set; then : - withval=$with_selinux; - for ac_header in selinux/selinux.h -do : - ac_fn_cxx_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SELINUX_SELINUX_H 1 -_ACEOF - -else - echo "*** Error: Missing SELinux header files";exit 1 -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for matchpathcon in -lselinux" >&5 -$as_echo_n "checking for matchpathcon in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_matchpathcon+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lselinux $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 matchpathcon (); -int -main () -{ -return matchpathcon (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_selinux_matchpathcon=yes -else - ac_cv_lib_selinux_matchpathcon=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_selinux_matchpathcon" >&5 -$as_echo "$ac_cv_lib_selinux_matchpathcon" >&6; } -if test "x$ac_cv_lib_selinux_matchpathcon" = x""yes; then : - with_selinux=yes -else - echo "*** Error: Missing or incorrect SELinux library files"; exit 1 -fi - - -fi - - -if test "$with_selinux" = "yes"; then - -$as_echo "#define WITH_SELINUX 1" >>confdefs.h - -fi - -if test "$prefix" = "NONE"; then - if test "$mandir" = '${prefix}/man'; then - mandir='${prefix}/share/man' - - fi -fi - -releaseversion='${PACKAGE}-${VERSION}' - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OS dependent modules and libraries" >&5 -$as_echo_n "checking for OS dependent modules and libraries... " >&6; } -case "${host}" in - *-*-linux*) - os_deps='os_linux.o cciss.o' - - if test "$with_selinux" = "yes"; then - os_libs='-lselinux' - - else - os_libs='' - - fi;; - *-*-freebsd*|*-*-dragonfly*|*-*-kfreebsd*-gnu*) - os_deps='os_freebsd.o cciss.o' - - os_libs='-lcam' - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb20_dev_get_device_desc in -lusb" >&5 -$as_echo_n "checking for libusb20_dev_get_device_desc in -lusb... " >&6; } -if test "${ac_cv_lib_usb_libusb20_dev_get_device_desc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lusb $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 libusb20_dev_get_device_desc (); -int -main () -{ -return libusb20_dev_get_device_desc (); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_usb_libusb20_dev_get_device_desc=yes -else - ac_cv_lib_usb_libusb20_dev_get_device_desc=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_usb_libusb20_dev_get_device_desc" >&5 -$as_echo "$ac_cv_lib_usb_libusb20_dev_get_device_desc" >&6; } -if test "x$ac_cv_lib_usb_libusb20_dev_get_device_desc" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB 1 -_ACEOF - - LIBS="-lusb $LIBS" - -fi - - ;; - sparc-*-solaris*) - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_MAILER "mailx" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define NEED_SOLARIS_ATA_CODE "os_solaris_ata.s" -_ACEOF - - os_deps='os_solaris.o os_solaris_ata.o' - - os_libs='' - ;; - *-pc-solaris*) - -cat >>confdefs.h <<_ACEOF -#define DEFAULT_MAILER "mailx" -_ACEOF - - os_deps='os_solaris.o' - - os_libs='' - ;; - *-*-netbsd*) - os_deps='os_netbsd.o' - - os_libs='-lutil' - ;; - *-*-openbsd*) - os_deps='os_openbsd.o' - - os_libs='-lutil' - ;; - *-*-cygwin*) - os_deps='os_win32.o' - - os_libs='' - ;; - *-*-mingw*) - os_deps='os_win32.o' - - os_libs='' - ;; - *-*-darwin*) - os_deps='os_darwin.o' - - os_libs='-framework CoreFoundation -framework IOKit' - ;; - *-*-nto-qnx*) - os_deps='os_qnxnto.o' - - os_libs='' - ;; - - *) - os_deps='os_generic.o' - - os_libs='' - ;; -esac - -# Replace if '--with-os-deps' was specified -test -z "$with_os_deps" || os_deps="$with_os_deps" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $os_deps $os_libs" >&5 -$as_echo "$os_deps $os_libs" >&6; } - -# Define symbols for optional functions in OS specific module -case "${os_deps}" in - os_win32*) - -$as_echo "#define HAVE_ATA_IDENTIFY_IS_CACHED 1" >>confdefs.h - ;; -esac -case "${os_deps}" in - os_win32*) - -$as_echo "#define HAVE_GET_OS_VERSION_STR 1" >>confdefs.h - ;; -esac - -# Check if we need adapter to old interface (dev_legacy.cpp) -os_src=`echo "${os_deps}"|sed -n 's,^\([^ .]*\)\.o.*$,\1.cpp,p'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${os_src} uses new interface" >&5 -$as_echo_n "checking whether ${os_src} uses new interface... " >&6; } -if grep "smart_interface" "${srcdir}/${os_src}" >/dev/null 2>&1; then - os_new_interface=yes -else - os_new_interface=no - os_deps="${os_deps} dev_legacy.o" - -$as_echo "#define OLD_INTERFACE 1" >>confdefs.h - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $os_new_interface" >&5 -$as_echo "$os_new_interface" >&6; } - - if echo $host_os | grep '^darwin' > /dev/null; then - OS_DARWIN_TRUE= - OS_DARWIN_FALSE='#' -else - OS_DARWIN_TRUE='#' - OS_DARWIN_FALSE= -fi - - if echo $host_os | grep '^solaris' > /dev/null; then - OS_SOLARIS_TRUE= - OS_SOLARIS_FALSE='#' -else - OS_SOLARIS_TRUE='#' - OS_SOLARIS_FALSE= -fi - - if echo $host_os | grep '^mingw' > /dev/null; then - OS_WIN32_MINGW_TRUE= - OS_WIN32_MINGW_FALSE='#' -else - OS_WIN32_MINGW_TRUE='#' - OS_WIN32_MINGW_FALSE= -fi - - if echo $host_os | grep '^freebsd' > /dev/null; then - OS_FREEBSD_TRUE= - OS_FREEBSD_FALSE='#' -else - OS_FREEBSD_TRUE='#' - OS_FREEBSD_FALSE= -fi - - -if test "$GXX" = "yes"; then - if test -z "`echo "$CXXFLAGS" | grep "\-Wall" 2> /dev/null`" ; then - CXXFLAGS="$CXXFLAGS -Wall" - fi -# In the next line, do NOT delete the 2 spaces inside double quotes. - if test -z "`echo "$CXXFLAGS " | grep "\-W " 2> /dev/null`" ; then - CXXFLAGS="$CXXFLAGS -W" - fi - case "${host}" in - *-*-mingw*) - # MinGW uses MSVCRT.DLL which uses printf format "%I64d" and not "%lld" for int64_t - CXXFLAGS="$CXXFLAGS -Wno-format";; - esac - - # Disable strict aliasing rules by default (see ticket #23). - if test -z "`echo "$CXXFLAGS" | grep "\-f[no-]*strict-aliasing" 2> /dev/null`" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ supports -fno-strict-aliasing" >&5 -$as_echo_n "checking whether g++ supports -fno-strict-aliasing... " >&6; } - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-fno-strict-aliasing" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - gcc_have_fno_strict_aliasing=yes -else - gcc_have_fno_strict_aliasing=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS="$ac_save_CXXFLAGS" - if test "$gcc_have_fno_strict_aliasing" = "yes"; then - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_have_fno_strict_aliasing" >&5 -$as_echo "$gcc_have_fno_strict_aliasing" >&6; } - fi - -else - case "${host}" in - sparc*-*-solaris*) - if test -z "`echo "$CXXFLAGS" | grep "\-xmemalign" 2> /dev/null`" ; then - CXXFLAGS="-xmemalign=1i $CXXFLAGS" - fi - esac - case "${host}" in - *-*-solaris*) - if test -z "`echo "$CXXFLAGS" | grep "\-xO" 2> /dev/null`" ; then - CXXFLAGS="-xO2 $CXXFLAGS" - fi - if test -z "`echo "$CXXFLAGS" | grep "\-erroff" 2> /dev/null`" ; then - CXXFLAGS="-erroff=%none,wbadinitl,wbadasgl,badargtypel2w,badargtype2w $CXXFLAGS" - fi - esac -fi - - -cat >>confdefs.h <<_ACEOF -#define SMARTMONTOOLS_BUILD_HOST "${host}" -_ACEOF - - - - -ac_config_files="$ac_config_files Makefile examplescripts/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -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 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then - as_fn_error "conditional \"am__fastdepCCAS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${IS_SVN_BUILD_TRUE}" && test -z "${IS_SVN_BUILD_FALSE}"; then - as_fn_error "conditional \"IS_SVN_BUILD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${INSTALL_INITSCRIPT_TRUE}" && test -z "${INSTALL_INITSCRIPT_FALSE}"; then - as_fn_error "conditional \"INSTALL_INITSCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_DRIVEDB_TRUE}" && test -z "${ENABLE_DRIVEDB_FALSE}"; then - as_fn_error "conditional \"ENABLE_DRIVEDB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_SAVESTATES_TRUE}" && test -z "${ENABLE_SAVESTATES_FALSE}"; then - as_fn_error "conditional \"ENABLE_SAVESTATES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_ATTRIBUTELOG_TRUE}" && test -z "${ENABLE_ATTRIBUTELOG_FALSE}"; then - as_fn_error "conditional \"ENABLE_ATTRIBUTELOG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SMARTD_SUFFIX_TRUE}" && test -z "${SMARTD_SUFFIX_FALSE}"; then - as_fn_error "conditional \"SMARTD_SUFFIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OS_DARWIN_TRUE}" && test -z "${OS_DARWIN_FALSE}"; then - as_fn_error "conditional \"OS_DARWIN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OS_SOLARIS_TRUE}" && test -z "${OS_SOLARIS_FALSE}"; then - as_fn_error "conditional \"OS_SOLARIS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OS_WIN32_MINGW_TRUE}" && test -z "${OS_WIN32_MINGW_FALSE}"; then - as_fn_error "conditional \"OS_WIN32_MINGW\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OS_FREEBSD_TRUE}" && test -z "${OS_FREEBSD_FALSE}"; then - as_fn_error "conditional \"OS_FREEBSD\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by smartmontools $as_me 5.39.1, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -smartmontools config.status 5.39.1 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "examplescripts/Makefile") CONFIG_FILES="$CONFIG_FILES examplescripts/Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || 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 - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -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 - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 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\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - -{ $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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 - diff --git a/configure.in b/configure.in index 14fa458..136526d 100644 --- a/configure.in +++ b/configure.in @@ -1,15 +1,15 @@ # -# $Id: configure.in 3054 2010-01-28 20:48:28Z chrfranke $ +# $Id: configure.in 3057 2010-02-03 20:56:41Z chrfranke $ # dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(smartmontools, 5.39.1, smartmontools-support@lists.sourceforge.net) +AC_INIT(smartmontools, 5.40, smartmontools-support@lists.sourceforge.net) AC_CONFIG_SRCDIR(smartctl.cpp) smartmontools_configure_date=`date -u +'%Y-%m-%d %T %Z'` -smartmontools_cvs_tag=`echo '$Id: configure.in 3054 2010-01-28 20:48:28Z chrfranke $'` -smartmontools_release_date=2010-01-28 -smartmontools_release_time="20:46:44 UTC" +smartmontools_cvs_tag=`echo '$Id: configure.in 3057 2010-02-03 20:56:41Z chrfranke $'` +smartmontools_release_date=2009-12-09 +smartmontools_release_time="21:00:32 UTC" AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_ARGS, "$ac_configure_args", [smartmontools Configure Arguments]) AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_DATE, "$smartmontools_configure_date", [smartmontools Configure Date]) @@ -157,11 +157,25 @@ AC_SUBST(ASFLAGS) AC_SUBST([exampledir], ['${docdir}/examplescripts']) -AC_ARG_WITH(initscriptdir,[AC_HELP_STRING([--with-initscriptdir=dir],[Location of init scripts (default is ${sysconfdir}/rc.d/init.d)])],[initddir="$withval"],[initddir='${sysconfdir}/rc.d/init.d']) +AC_ARG_WITH(initscriptdir, + [AC_HELP_STRING([--with-initscriptdir=DIR],[Location of init scripts [SYSCONFDIR/rc.d/init.d]])], + [initddir="$withval"],[initddir='${sysconfdir}/rc.d/init.d']) AC_SUBST(initddir) AM_CONDITIONAL(INSTALL_INITSCRIPT, [test "$with_initscriptdir" != "no"]) -AC_ARG_WITH(docdir,[AC_HELP_STRING([--with-docdir=dir],[Location of documentation (default is ${prefix}/share/doc/smartmontools-5.X)])],[docdir="$withval"],[docdir='${prefix}/share/doc/${PACKAGE}-${VERSION}']) +docdir_is_default=no +AC_ARG_WITH(docdir, + [AC_HELP_STRING([--with-docdir=DIR],[Location of documentation [DATADIR/doc/smartmontools]])], + [docdir="$withval"], + [ if test -z "$docdir"; then + # autoconf 2.5x without '--docdir' support + docdir='${datadir}/doc/${PACKAGE}' + docdir_is_default=yes + elif test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}'; then + # autoconf 2.6x '--docdir' default + docdir_is_default=yes + fi + ]) AC_SUBST(docdir) AC_ARG_ENABLE(drivedb, [AC_HELP_STRING([--enable-drivedb],[Enables drive database file])]) @@ -219,6 +233,29 @@ if test "$with_selinux" = "yes"; then AC_DEFINE(WITH_SELINUX, [1], [Define to 1 if SELinux support is enabled]) fi +AC_ARG_WITH(libcap-ng, + [AC_HELP_STRING([--with-libcap-ng=[auto|yes|no]], [Add Libcap-ng support to smartd [auto]])], + [with_libcap_ng="$withval"], + [with_libcap_ng=auto]) + +use_libcap_ng=no +if test "$with_libcap_ng" != "no"; then + AC_CHECK_LIB(cap-ng, capng_clear, + [AC_DEFINE(HAVE_LIBCAP_NG, 1, [Define to 1 if you have the `cap-ng' library (-lcap-ng).]) + CAPNG_LDADD="-lcap-ng"; use_libcap_ng=yes]) + + if test "$use_libcap_ng" = "yes"; then + AC_CHECK_HEADER(cap-ng.h, [], [AC_MSG_ERROR([libcap-ng libraries found but headers are missing])]) + elif test "$with_libcap_ng" = "yes"; then + AC_MSG_ERROR([libcap-ng support was requested but the library was not found]) + fi +fi + +AC_MSG_CHECKING([whether to use libcap-ng]) +AC_SUBST(CAPNG_LDADD) +AM_CONDITIONAL(ENABLE_CAPABILITIES, [test "$use_libcap_ng" = "yes"]) +AC_MSG_RESULT([$use_libcap_ng]) + if test "$prefix" = "NONE"; then dnl no prefix and no mandir, so use ${prefix}/share/man as default if test "$mandir" = '${prefix}/man'; then @@ -368,3 +405,16 @@ AC_SUBST(CXXFLAGS) AC_OUTPUT(Makefile examplescripts/Makefile) AC_PROG_MAKE_SET + +# Print note that the docdir default value has changed +# TODO: Remove this after next release +if test "$docdir_is_default" = "yes"; then + old_def_docdir='${prefix}/share/doc/${PACKAGE}-${VERSION}' + old_def_docdir_eval="`eval eval eval echo $old_def_docdir`" + docdir_eval="`eval eval eval echo $docdir`" + AC_MSG_NOTICE([********** PLEASE NOTE **********]) + AC_MSG_NOTICE(['docdir' default has changed]) + AC_MSG_NOTICE([from: $old_def_docdir_eval]) + AC_MSG_NOTICE([to: $docdir_eval]) + AC_MSG_NOTICE([*********************************]) +fi diff --git a/depcomp b/depcomp deleted file mode 100755 index df8eea7..0000000 --- a/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# 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/dev_interface.cpp b/dev_interface.cpp index a14f47c..01dc01f 100644 --- a/dev_interface.cpp +++ b/dev_interface.cpp @@ -25,7 +25,7 @@ #include -const char * dev_interface_cpp_cvsid = "$Id: dev_interface.cpp 2971 2009-10-26 22:05:54Z chrfranke $" +const char * dev_interface_cpp_cvsid = "$Id: dev_interface.cpp 3015 2009-12-30 16:25:59Z chrfranke $" DEV_INTERFACE_H_CVSID; ///////////////////////////////////////////////////////////////////////////// @@ -89,7 +89,9 @@ ata_in_regs_48bit::ata_in_regs_48bit() sector_count_16(sector_count, prev.sector_count), lba_low_16(lba_low, prev.lba_low), lba_mid_16(lba_mid, prev.lba_mid), - lba_high_16(lba_high, prev.lba_high) + lba_high_16(lba_high, prev.lba_high), + lba_48( lba_low, lba_mid, lba_high, + prev.lba_low, prev.lba_mid, prev.lba_high) { } @@ -97,7 +99,9 @@ ata_out_regs_48bit::ata_out_regs_48bit() : sector_count_16(sector_count, prev.sector_count), lba_low_16(lba_low, prev.lba_low), lba_mid_16(lba_mid, prev.lba_mid), - lba_high_16(lba_high, prev.lba_high) + lba_high_16(lba_high, prev.lba_high), + lba_48( lba_low, lba_mid, lba_high, + prev.lba_low, prev.lba_mid, prev.lba_high) { } diff --git a/dev_interface.h b/dev_interface.h index 5f54fd8..44940d4 100644 --- a/dev_interface.h +++ b/dev_interface.h @@ -18,7 +18,7 @@ #ifndef DEV_INTERFACE_H #define DEV_INTERFACE_H -#define DEV_INTERFACE_H_CVSID "$Id: dev_interface.h 2973 2009-10-26 22:38:19Z chrfranke $\n" +#define DEV_INTERFACE_H_CVSID "$Id: dev_interface.h 3015 2009-12-30 16:25:59Z chrfranke $\n" #include #include @@ -325,6 +325,50 @@ private: }; +/// 48-bit alias to six 8-bit ATA registers (for LBA). +class ata_reg_alias_48 +{ +public: + ata_reg_alias_48(ata_register & ll, ata_register & lm, ata_register & lh, + ata_register & hl, ata_register & hm, ata_register & hh) + : m_ll(ll), m_lm(lm), m_lh(lh), + m_hl(hl), m_hm(hm), m_hh(hh) + { } + + ata_reg_alias_48 & operator=(uint64_t val) + { + m_ll = (unsigned char) val; + m_lm = (unsigned char)(val >> 8); + m_lh = (unsigned char)(val >> 16); + m_hl = (unsigned char)(val >> 24); + m_hm = (unsigned char)(val >> 32); + m_hh = (unsigned char)(val >> 40); + return * this; + } + + uint64_t val() const + { + return ( (unsigned)m_ll + | ((unsigned)m_lm << 8) + | ((unsigned)m_lh << 16) + | ((unsigned)m_hl << 24) + | ((uint64_t)m_hm << 32) + | ((uint64_t)m_hh << 40)); + } + + operator uint64_t() const + { return val(); } + +private: + ata_register & m_ll, & m_lm, & m_lh, + & m_hl, & m_hm, & m_hh; + + // References must not be copied. + ata_reg_alias_48(const ata_reg_alias_48 &); + void operator=(const ata_reg_alias_48 &); +}; + + /// ATA Input registers for 48-bit commands // See section 4.14 of T13/1532D Volume 1 Revision 4b // @@ -348,6 +392,9 @@ struct ata_in_regs_48bit ata_reg_alias_16 lba_mid_16; ata_reg_alias_16 lba_high_16; + // 48-bit alias to all 8-bit LBA registers. + ata_reg_alias_48 lba_48; + /// Return true if 48-bit command bool is_48bit_cmd() const { return prev.is_set(); } @@ -373,6 +420,9 @@ struct ata_out_regs_48bit ata_reg_alias_16 lba_mid_16; ata_reg_alias_16 lba_high_16; + // 48-bit alias to all 8-bit LBA registers. + ata_reg_alias_48 lba_48; + ata_out_regs_48bit(); }; diff --git a/do_release b/do_release new file mode 100755 index 0000000..967f9b7 --- /dev/null +++ b/do_release @@ -0,0 +1,139 @@ +#!/bin/bash +# +# do a smartmontools release +# (C) 2003-9 Bruce Allen , +# Guido Guenther +# Christian Franke +# $Id: do_release 2997 2009-12-11 21:25:59Z chrfranke $ + +# Notes on generating releases: +# (1) update NEWS +# (2) update CHANGELOG -- put in release number +# (3) update release number in configure.in +# (4) to test, run without '--commit' +# (5) when satisfied, add option '--commit' + +set -e + +inc_release() +{ + MINOR=`echo $VERSION | cut -d. -f2` + MAJOR=`echo $VERSION | cut -d. -f1` + PERL_OLD=$MAJOR\\.$MINOR + ((MINOR++)) + NEW_VERSION=$MAJOR.$MINOR + PERL_NEW=$MAJOR\\.$MINOR + NEW_RELEASE="RELEASE_${NEW_VERSION//\./_}" + echo "New Version: $NEW_VERSION" + echo "New Release: $NEW_RELEASE" +} + +COMMIT= +RC= + +case "$1" in + --commit) COMMIT=yes; shift ;; +esac + +case "$*" in + RC[1-9]) RC="$1" ;; + FINAL) ;; + *) echo "Usage: $0 [--commit] RC[1-9]|FINAL"; exit 1 ;; +esac + +# Check workdir +case "`/bin/pwd`" in + */trunk/smartmontools) WDROOT="../.."; DIRPAT="trunk" ;; + */branches/*/smartmontools) WDROOT="../../.."; DIRPAT="branches/*" ;; + *) echo "`/bin/pwd`: no trunk or branch working dir"; exit 1 ;; +esac + +if [ ! -d "$WDROOT/tags" ]; then + echo "tags directory missing"; exit 1 +fi + +REVX="`(cd $WDROOT && svnversion)`" || exit 1 +REV="${REVX/%[PM]/}"; REV="${REV/%[PM]/}" +if [ -n "${REV//[0-9]/}" ]; then + echo "Working directory not clean: $REVX"; exit 1 +fi + +(cd $WDROOT && svn status) | while read s; do + case "$s" in + "M "$DIRPAT/smartmontools/CHANGELOG) echo "$s: OK";; + "M "$DIRPAT/smartmontools/NEWS) echo "$s: OK";; + "M "$DIRPAT/smartmontools/configure.in) echo "$s: OK";; + *) echo "$s: not allowed"; exit 1;; + esac +done +if [ $? -ne 0 ]; then + exit 1 +fi + +# Get release number +VERSION=`sed -n 's|^AC_INIT[^,]*, *\([0-9.]*\) *,.*$|\1|p' configure.in` +if [ -z "$VERSION" ]; then + echo "AC_INIT not found in configure.in"; exit 1 +fi +VERSIONRC="$VERSION" +RELEASE="RELEASE_${VERSION//\./_}" + +if [ "$RC" ]; then + VERSIONRC="${VERSION}-${RC/#RC/rc}" + RELEASE="${RELEASE}_${RC}" +fi + +if [ -e "$WDROOT/tags/$RELEASE" ]; then + echo "tags/$RELEASE exists"; exit 1 +fi + +echo "r$REV: Release $VERSIONRC $RELEASE" + +# Update timestamp +smartmontools_release_date=`date -u +"%Y-%m-%d"` +smartmontools_release_time=`date -u +"%T %Z"` +cat configure.in | sed "s|smartmontools_release_date=.*|smartmontools_release_date=${smartmontools_release_date}|" > configure.tmp +cat configure.tmp | sed "s|smartmontools_release_time=.*|smartmontools_release_time=\"${smartmontools_release_time}\"|" > configure.in +rm -f configure.tmp + +# Review changes +svn diff +echo "===================================================================" +echo ">>> Continuing in 20 seconds ..." +sleep 20 +set -v + +# Create tag and commit +if [ "$COMMIT" = "yes" ]; then + svn mkdir $WDROOT/tags/$RELEASE + svn copy ../smartmontools $WDROOT/tags/$RELEASE/smartmontools + svn commit -m "Release $VERSIONRC $RELEASE" $WDROOT +fi + +# Build +./autogen.sh + +mkdir build +cd build +../configure +make distcheck || exit 1 +make maintainer-clean +cd .. + +TARFILE=smartmontools-$VERSIONRC.tar.gz + +mv -f build/smartmontools-$VERSION.tar.gz $TARFILE +rm -rvf build + +md5sum $TARFILE > $TARFILE.md5 +sha1sum $TARFILE > $TARFILE.sha1 + +# Increase release number +if [ -z "$RC" -a "$DIRPAT" = "trunk" ]; then + inc_release + if [ "$COMMIT" = "yes" ]; then + perl -p -i.bak -e "s/$PERL_OLD/$PERL_NEW/" configure.in + # svn commit -m "Bump release number to $NEW_VERSION" configure.in + fi +fi + diff --git a/drivedb.h b/drivedb.h new file mode 100644 index 0000000..d87c3d4 --- /dev/null +++ b/drivedb.h @@ -0,0 +1,1445 @@ +/* + * drivedb.h - smartmontools drive database file + * + * Home page of code is: http://smartmontools.sourceforge.net + * + * Copyright (C) 2003-10 Philip Williams, Bruce Allen + * Copyright (C) 2008-10 Christian Franke + * + * 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. + * + * You should have received a copy of the GNU General Public License + * (for example COPYING); If not, see . + * + */ + +/* + * Structure used to store drive database entries: + * + * struct drive_settings { + * const char * modelfamily; + * const char * modelregexp; + * const char * firmwareregexp; + * const char * warningmsg; + * const char * presets; + * }; + * + * The elements are used in the following ways: + * + * modelfamily Informal string about the model family/series of a + * device. Set to "" if no info (apart from device id) + * known. The entry is ignored if this string starts with + * a dollar sign. + * modelregexp POSIX extended regular expression to match the model of + * a device. This should never be "". + * firmwareregexp POSIX extended regular expression to match a devices's + * firmware. This is optional and should be "" if it is not + * to be used. If it is nonempty then it will be used to + * narrow the set of devices matched by modelregexp. + * warningmsg A message that may be displayed for matching drives. For + * example, to inform the user that they may need to apply a + * firmware patch. + * presets String with vendor-specific attribute ('-v') and firmware + * bug fix ('-F') options. Same syntax as in smartctl command + * line. The user's own settings override these. + * + * The regular expressions for drive model and firmware must match the full + * string. The effect of "^FULLSTRING$" is identical to "FULLSTRING". + * The form ".*SUBSTRING.*" can be used if substring match is desired. + * + * The table will be searched from the start to end or until the first match, + * so the order in the table is important for distinct entries that could match + * the same drive. + */ + +/* +const drive_settings builtin_knowndrives[] = { + */ + { "$Id: drivedb.h 3060 2010-02-03 22:16:40Z chrfranke $", + "-", "-", + "This is a dummy entry to hold the SVN-Id of drivedb.h", + "" + }, + { "Apple SSD SM128", + "APPLE SSD SM128", + "", "", "" + }, + { "Asus-Phison SSD", + "ASUS-PHISON SSD", + "", "", "" + }, + { "Patriot Torqx SSD", + "Patriot[ -]Torqx.*", + "", "", + " -v 9,raw64" + " -v 12,raw64" + " -v 184,raw64,Initial_Bad_Block_Count" + " -v 195,raw64,Program_Failure_Blk_Ct" + " -v 196,raw64,Erase_Failure_Blk_Ct" + " -v 197,raw64,Read_Failure_Blk_Ct" + " -v 198,raw64,Read_Sectors_Tot_Ct" + " -v 199,raw64,Write_Sectors_Tot_Ct" + " -v 200,raw64,Read_Commands_Tot_Ct" + " -v 201,raw64,Write_Commands_Tot_Ct" + " -v 202,raw64,Error_Bits_Flash_Tot_Ct" + " -v 203,raw64,Corr_Read_Errors_Tot_Ct" + " -v 204,raw64,Bad_Block_Full_Flag" + " -v 205,raw64,Max_PE_Count_Spec" + " -v 206,raw64,Min_Erase_Count" + " -v 207,raw64,Max_Erase_Count" + " -v 208,raw64,Average_Erase_Count" + " -v 209,raw64,Remaining_Lifetime_Perc" + }, + { "OCZ Vertex SSD", + "OCZ[ -]VERTEX.*", + "", "", + " -v 9,raw64" + " -v 12,raw64" + " -v 184,raw64,Initial_Bad_Block_Count" + " -v 195,raw64,Program_Failure_Blk_Ct" + " -v 196,raw64,Erase_Failure_Blk_Ct" + " -v 197,raw64,Read_Failure_Blk_Ct" + " -v 198,raw64,Read_Sectors_Tot_Ct" + " -v 199,raw64,Write_Sectors_Tot_Ct" + " -v 200,raw64,Read_Commands_Tot_Ct" + " -v 201,raw64,Write_Commands_Tot_Ct" + " -v 202,raw64,Error_Bits_Flash_Tot_Ct" + " -v 203,raw64,Corr_Read_Errors_Tot_Ct" + " -v 204,raw64,Bad_Block_Full_Flag" + " -v 205,raw64,Max_PE_Count_Spec" + " -v 206,raw64,Min_Erase_Count" + " -v 207,raw64,Max_Erase_Count" + " -v 208,raw64,Average_Erase_Count" + " -v 209,raw64,Remaining_Lifetime_Perc" + }, + { "OCZ Agility SSD", + "OCZ[ -]AGILITY", + "", "", + " -v 9,raw64" + " -v 12,raw64" + " -v 184,raw64,Initial_Bad_Block_Count" + " -v 195,raw64,Program_Failure_Blk_Ct" + " -v 196,raw64,Erase_Failure_Blk_Ct" + " -v 197,raw64,Read_Failure_Blk_Ct" + " -v 198,raw64,Read_Sectors_Tot_Ct" + " -v 199,raw64,Write_Sectors_Tot_Ct" + " -v 200,raw64,Read_Commands_Tot_Ct" + " -v 201,raw64,Write_Commands_Tot_Ct" + " -v 202,raw64,Error_Bits_Flash_Tot_Ct" + " -v 203,raw64,Corr_Read_Errors_Tot_Ct" + " -v 204,raw64,Bad_Block_Full_Flag" + " -v 205,raw64,Max_PE_Count_Spec" + " -v 206,raw64,Min_Erase_Count" + " -v 207,raw64,Max_Erase_Count" + " -v 208,raw64,Average_Erase_Count" + " -v 209,raw64,Remaining_Lifetime_Perc" + }, + { "Crucial M225 SSD", + "CRUCIAL_CT(64|128|256)M225", + "", "", + " -v 1,raw64" + " -v 9,raw64" + " -v 12,raw64" + " -v 184,raw64,Initial_Bad_Block_Count" + " -v 195,raw64,Program_Failure_Blk_Ct" + " -v 196,raw64,Erase_Failure_Blk_Ct" + " -v 197,raw64,Read_Failure_Blk_Ct" + " -v 198,raw64,Read_Sectors_Tot_Ct" + " -v 199,raw64,Write_Sectors_Tot_Ct" + " -v 200,raw64,Read_Commands_Tot_Ct" + " -v 201,raw64,Write_Commands_Tot_Ct" + " -v 202,raw64,Error_Bits_Flash_Tot_Ct" + " -v 203,raw64,Corr_Read_Errors_Tot_Ct" + " -v 204,raw64,Bad_Block_Full_Flag" + " -v 205,raw64,Max_PE_Count_Spec" + " -v 206,raw64,Min_Erase_Count" + " -v 207,raw64,Max_Erase_Count" + " -v 208,raw64,Average_Erase_Count" + " -v 209,raw64,Remaining_Lifetime_Perc" + " -v 210,raw64" + " -v 211,raw64" + }, + { "Intel X25-E SSD", + "SSDSA2SH(032|064)G1.* INTEL", + "", "", + "-v 225,raw48,Host_Writes_Count" + }, + { "Transcend Solid-State Drive", + "TS(8|16|32|64|128)GSSD25-(M|S)", + "", "", "" + }, + { "Transcend Solid-State Drive V series", + "TS(8|16|32|64|128|192)GSSD25S-(M|S)", + "", "", "" + }, + { "Marvell SSD SD88SA024BA0 (SUN branded)", + "MARVELL SD88SA024BA0 SUN24G 0902M0054V", + "", "", "" + }, + { "HP 1TB SATA disk GB1000EAFJL", + "GB1000EAFJL", + "", "", "" + }, + { "IBM Deskstar 60GXP series", // ER60A46A firmware + "(IBM-|Hitachi )?IC35L0[12346]0AVER07.*", + "ER60A46A", + "", "" + }, + { "IBM Deskstar 60GXP series", // All other firmware + "(IBM-|Hitachi )?IC35L0[12346]0AVER07.*", + "", + "IBM Deskstar 60GXP drives may need upgraded SMART firmware.\n" + "Please see http://www.geocities.com/dtla_update/index.html#rel and\n" + "http://www.ibm.com/pc/support/site.wss/MIGR-42215.html", + "" + }, + { "IBM Deskstar 40GV & 75GXP series (A5AA/A6AA firmware)", + "(IBM-)?DTLA-30[57]0[123467][05].*", + "T[WX][123468AG][OF]A[56]AA", + "", "" + }, + { "IBM Deskstar 40GV & 75GXP series (all other firmware)", + "(IBM-)?DTLA-30[57]0[123467][05].*", + "", + "IBM Deskstar 40GV and 75GXP drives may need upgraded SMART firmware.\n" + "Please see http://www.geocities.com/dtla_update/ and\n" + "http://www.ibm.com/pc/support/site.wss/MIGR-42215.html", + "" + }, + { "", // ExcelStor J240, J340, J360, J680, and J880 + "ExcelStor Technology J(24|34|36|68|88)0", + "", "", "" + }, + { "", // Fujitsu M1623TAU + "FUJITSU M1623TAU", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHG series", + "FUJITSU MHG2...ATU?.*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHH series", + "FUJITSU MHH2...ATU?.*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHJ series", + "FUJITSU MHJ2...ATU?.*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHK series", + "FUJITSU MHK2...ATU?.*", + "", + "", + "-v 9,seconds" + }, + { "", // Fujitsu MHL2300AT + "FUJITSU MHL2300AT", + "", + "This drive's firmware has a harmless Drive Identity Structure\n" + "checksum error bug.", + "-v 9,seconds" + }, + { "", // MHM2200AT, MHM2150AT, MHM2100AT, MHM2060AT + "FUJITSU MHM2(20|15|10|06)0AT", + "", + "This drive's firmware has a harmless Drive Identity Structure\n" + "checksum error bug.", + "-v 9,seconds" + }, + { "Fujitsu MHN series", + "FUJITSU MHN2...AT", + "", + "", + "-v 9,seconds" + }, + { "", // Fujitsu MHR2020AT + "FUJITSU MHR2020AT", + "", + "", + "-v 9,seconds" + }, + { "", // Fujitsu MHR2040AT + "FUJITSU MHR2040AT", + "", // Tested on 40BA + "", + "-v 9,seconds -v 192,emergencyretractcyclect " + "-v 198,offlinescanuncsectorct -v 200,writeerrorcount" + }, + { "Fujitsu MHSxxxxAT family", + "FUJITSU MHS20[6432]0AT( .)?", + "", + "", + "-v 9,seconds -v 192,emergencyretractcyclect " + "-v 198,offlinescanuncsectorct -v 200,writeerrorcount " + "-v 201,detectedtacount" + }, + { "Fujitsu MHT series", + "FUJITSU MHT2...(AH|AS|AT|BH)U?.*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHU series", + "FUJITSU MHU2...ATU?.*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHV series", + "FUJITSU MHV2...(AH|AS|AT|BH|BS|BT).*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MPA..MPG series", + "FUJITSU MP[A-G]3...A[HTEV]U?.*", + "", + "", + "-v 9,seconds" + }, + { "Fujitsu MHY2 BH series", + "FUJITSU MHY2(04|06|08|10|12|16|20|25)0BH.*", + "", "", + "-v 240,raw48,Transfer_Error_Rate" + }, + { "Fujitsu MHW2 BH series", + "FUJITSU MHW2(04|06|08|10|12|16)0BH.*", + "", "", "" + }, + { "Fujitsu MHW2 BJ series", + "FUJITSU MHW2(08|12|16)0BJ.*", + "", "", "" + }, + { "Fujitsu MHZ2 BH series", + "FUJITSU MHZ2(04|08|12|16|20|25|32)0BH.*", + "", "", "" + }, + { "Fujitsu MHZ2 BJ series", + "FUJITSU MHZ2(08|12|16|20|25|32)0BJ.*", + "", + "", + "-v 9,minutes" + }, + { "Fujitsu MHZ2 BS series", + "FUJITSU MHZ2(12|25)0BS.*", + "", "", "" + }, + { "", // Samsung SV4012H (known firmware) + "SAMSUNG SV4012H", + "RM100-08", + "", + "-v 9,halfminutes -F samsung" + }, + { "", // Samsung SV4012H (all other firmware) + "SAMSUNG SV4012H", + "", + "May need -F samsung disabled; see manual for details.", + "-v 9,halfminutes -F samsung" + }, + { "", // Samsung SV0412H (known firmware) + "SAMSUNG SV0412H", + "SK100-01", + "", + "-v 9,halfminutes -v 194,10xCelsius -F samsung" + }, + { "", // Samsung SV0412H (all other firmware) + "SAMSUNG SV0412H", + "", + "May need -F samsung disabled; see manual for details.", + "-v 9,halfminutes -v 194,10xCelsius -F samsung" + }, + { "", // Samsung SV1204H (known firmware) + "SAMSUNG SV1204H", + "RK100-1[3-5]", + "", + "-v 9,halfminutes -v 194,10xCelsius -F samsung" + }, + { "", // Samsung SV1204H (all other firmware) + "SAMSUNG SV1204H", + "", + "May need -F samsung disabled; see manual for details.", + "-v 9,halfminutes -v 194,10xCelsius -F samsung" + }, + { "", // SAMSUNG SV0322A tested with FW JK200-35 + "SAMSUNG SV0322A", + "", "", "" + }, + { "", // SAMSUNG SP40A2H with RR100-07 firmware + "SAMSUNG SP40A2H", + "RR100-07", + "", + "-v 9,halfminutes -F samsung" + }, + { "", // SAMSUNG SP80A4H with RT100-06 firmware + "SAMSUNG SP80A4H", + "RT100-06", + "", + "-v 9,halfminutes -F samsung" + }, + { "", // SAMSUNG SP8004H with QW100-61 firmware + "SAMSUNG SP8004H", + "QW100-61", + "", + "-v 9,halfminutes -F samsung" + }, + { "SAMSUNG SpinPoint F1 DT series", // tested with HD103UJ/1AA01113 + "SAMSUNG HD(083G|16[12]G|25[12]H|32[12]H|50[12]I|642J|75[23]L|10[23]U)J", + "", "", "" + }, + { "SAMSUNG SpinPoint F1 RE series", // tested with HE103UJ/1AA01113 + "SAMSUNG HE(252H|322H|502I|642J|753L|103U)J", + "", "", "" + }, + { "SAMSUNG SpinPoint F2 EG series", // tested with HD154UI/1AG01118 + "SAMSUNG HD(502H|10[23]S|15[34]U)I", + "", "", "" + }, + { "SAMSUNG SpinPoint S250 series", // tested with HD200HJ/KF100-06 + "SAMSUNG HD(162|200|250)HJ", + "", "", "" + }, + { "SAMSUNG SpinPoint T133 series", // tested with HD300LJ/ZT100-12, HD400LJ/ZZ100-14, HD401LJ/ZZ100-15 + "SAMSUNG HD(250KD|(30[01]|320|40[01])L[DJ])", + "", "", "" + }, + { "SAMSUNG SpinPoint T166 series", // tested with HD501LJ/CR100-10 + "SAMSUNG HD(080G|160H|32[01]K|403L|50[01]L)J", + "", "", "" + }, + { "SAMSUNG SpinPoint P120 series", // VF100-37 firmware, tested with SP2514N/VF100-37 + "SAMSUNG SP(16[01]3|2[05][01]4)[CN]", + "VF100-37", + "", + "-F samsung3" + }, + { "SAMSUNG SpinPoint P120 series", // other firmware, tested with SP2504C/VT100-33 + "SAMSUNG SP(16[01]3|2[05][01]4)[CN]", + "", + "May need -F samsung3 enabled; see manual for details.", + "" + }, + { "SAMSUNG SpinPoint P80 SD series", // tested with HD160JJ/ZM100-33 + "SAMSUNG HD(080H|120I|160J)J", + "", "", "" + }, + { "SAMSUNG SpinPoint P80 series", // BH100-35 firmware, tested with SP0842N/BH100-35 + "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", + "BH100-35", + "", + "-F samsung3" + }, + { "SAMSUNG SpinPoint P80 series", // firmware *-35 or later + "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", + ".*-3[5-9]", + "May need -F samsung3 enabled; see manual for details.", + "" + }, + { "SAMSUNG SpinPoint P80 series", // firmware *-25...34, tested with SP1614C/SW100-25 and -34 + "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", + ".*-(2[5-9]|3[0-4])", + "", + "-v 9,halfminutes -v 198,increasing" + }, + { "SAMSUNG SpinPoint P80 series", // firmware *-23...24, tested with + // SP0802N/TK100-23, + // SP1213N/TL100-23, + // SP1604N/TM100-23 and -24 + "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", + ".*-2[34]", + "", + "-v 9,halfminutes -F samsung2" + }, + { "SAMSUNG SpinPoint P80 series", // unknown firmware + "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", + "", + "May need -F samsung2 or -F samsung3 enabled; see manual for details.", + "" + }, + { "SAMSUNG SpinPoint M40/60/80 series", // tested with HM160JI/AD100-16 + "SAMSUNG HM(0[468]0H|1[026]0J)[CI]", + "", + "", + "-v 9,halfminutes" + }, +/* + // TODO: Make the entries below more specific. + // These entries produce misleading results, because newer + // Samsung disks reuse the version numbers *-NN. + { "", // All Samsung drives with '.*-25' firmware + "SAMSUNG.*", + ".*-25", + "May need -F samsung2 disabled; see manual for details.", + "-v 9,halfminutes -F samsung2" + }, + { "", // All Samsung drives with '.*-26 or later (currently to -39)' firmware + "SAMSUNG.*", + ".*-(2[6789]|3[0-9])", + "", + "-v 9,halfminutes" + }, + { "", // Samsung ALL OTHER DRIVES + "SAMSUNG.*", + "", + "May need -F samsung or -F samsung2 enabled; see manual for details.", + "" + }, +*/ + { "Maxtor Fireball 541DX family", + "Maxtor 2B0(0[468]|1[05]|20)H1", + "", + "", + "-v 9,minutes -v 194,unknown" + }, + { "Maxtor Fireball 3 family", + "Maxtor 2F0[234]0[JL]0", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 1280 ATA family", // no self-test log, ATA2-Fast + "Maxtor 8(1280A2|2160A4|2560A4|3840A6|4000A6|5120A8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 2160 Ultra ATA family", + "Maxtor 8(2160D2|3228D3|3240D3|4320D4|6480D6|8400D8|8455D8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 2880 Ultra ATA family", + "Maxtor 9(0510D4|0576D4|0648D5|0720D5|0840D6|0845D6|0864D6|1008D7|1080D8|1152D8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 3400 Ultra ATA family", + "Maxtor 9(1(360|350|202)D8|1190D7|10[12]0D6|0840D5|06[48]0D4|0510D3|1(350|202)E8|1010E6|0840E5|0640E4)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax D540X-4G family", + "Maxtor 4G(120J6|160J[68])", + "", + "", + "-v 9,minutes -v 194,unknown" + }, + { "Maxtor DiamondMax D540X-4K family", + "MAXTOR 4K(020H1|040H2|060H3|080H4)", + "", "", "" + }, + { "Maxtor DiamondMax Plus D740X family", + "MAXTOR 6L0(20[JL]1|40[JL]2|60[JL]3|80[JL]4)", + "", "", "" + }, + { "Maxtor DiamondMax Plus 5120 Ultra ATA 33 family", + "Maxtor 9(0512D2|0680D3|0750D3|0913D4|1024D4|1360D6|1536D6|1792D7|2048D8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax Plus 6800 Ultra ATA 66 family", + "Maxtor 9(2732U8|2390U7|204[09]U6|1707U5|1366U4|1024U3|0845U3|0683U2)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax D540X-4D", + "Maxtor 4D0(20H1|40H2|60H3|80H4)", + "", + "", + "-v 9,minutes -v 194,unknown" + }, + { "Maxtor DiamondMax 16 family", + "Maxtor 4(R0[68]0[JL]0|R1[26]0L0|A160J0|R120L4)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 4320 Ultra ATA family", + "Maxtor (91728D8|91512D7|91303D6|91080D5|90845D4|90645D3|90648D[34]|90432D2)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 17 VL family", + "Maxtor 9(0431U1|0641U2|0871U2|1301U3|1741U4)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 20 VL family", + "Maxtor (94091U8|93071U6|92561U5|92041U4|91731U4|91531U3|91361U3|91021U2|90841U2|90651U2)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax VL 30 family", // U: ATA66, H: ATA100 + "Maxtor (33073U4|32049U3|31536U2|30768U1|33073H4|32305H3|31536H2|30768H1)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 36 family", + "Maxtor (93652U8|92739U6|91826U4|91369U3|90913U2|90845U2|90435U1)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 40 ATA 66 series", + "Maxtor 9(0684U2|1024U2|1362U3|1536U3|2049U4|2562U5|3073U6|4098U8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax Plus 40 series (Ultra ATA 66 and Ultra ATA 100)", + "Maxtor (54098[UH]8|53073[UH]6|52732[UH]6|52049[UH]4|51536[UH]3|51369[UH]3|51024[UH]2)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 40 VL Ultra ATA 100 series", + "Maxtor 3(1024H1|1535H2|2049H2|3073H3|4098H4)( B)?", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax Plus 45 Ulta ATA 100 family", + "Maxtor 5(4610H6|4098H6|3073H4|2049H3|1536H2|1369H2|1023H2)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 60 ATA 66 family", + "Maxtor 9(1023U2|1536U2|2049U3|2305U3|3073U4|4610U6|6147U8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 60 ATA 100 family", + "Maxtor 9(1023H2|1536H2|2049H3|2305H3|3073H4|4098H6|4610H6|6147H8)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax Plus 60 family", + "Maxtor 5T0(60H6|40H4|30H3|20H2|10H1)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 80 family", + "Maxtor (98196H8|96147H6)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 536DX family", + "Maxtor 4W(100H6|080H6|060H4|040H3|030H2)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax Plus 8 family", + "Maxtor 6(E0[234]|K04)0L0", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 10 family (ATA/133 and SATA/150)", + "Maxtor 6(B(30|25|20|16|12|10|08)0[MPRS]|L(080[MLP]|(100|120)[MP]|160[MP]|200[MPRS]|250[RS]|300[RS]))0", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 10 family (SATA/300)", + "Maxtor 6V(080E|160E|200E|250F|300F|320F)0", + "", "", "" + }, + { "Maxtor DiamondMax Plus 9 family", + "Maxtor 6Y((060|080|120|160)L0|(060|080|120|160|200|250)P0|(060|080|120|160|200|250)M0)", + "", + "", + "-v 9,minutes" + }, + { "Maxtor DiamondMax 11 family", + "Maxtor 6H[45]00[FR]0", + "", "", "" + }, + { "Maxtor DiamondMax 17", + "Maxtor 6G(080L|160[PE])0", + "", "", "" + }, + { "Seagate Maxtor DiamondMax 20", + "MAXTOR STM3(40|80|160)[28]1[12]0?AS?", + "", "", "" + }, + { "Seagate Maxtor DiamondMax 21", + "MAXTOR STM3(160215|(250|320)820|320620|500630)AS?", + "", "", "" + }, + { "Seagate Maxtor DiamondMax 22", // fixed firmware + "(MAXTOR )?STM3(500320|750330|1000340)AS?", + "MX1A", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969 + "", "" + }, + { "Seagate Maxtor DiamondMax 22", // fixed firmware + "(MAXTOR )?STM3(160813|320614|640323|1000334)AS?", + "MX1B", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207975 + "", "" + }, + { "Seagate Maxtor DiamondMax 22", // buggy firmware + "(MAXTOR )?STM3(500320|750330|1000340)AS?", + "MX15", + "There are known problems with these drives,\n" + "AND THIS FIRMWARE VERSION IS AFFECTED,\n" + "see the following Seagate web pages:\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969", + "" + }, + { "Seagate Maxtor DiamondMax 22", // unknown firmware + "(MAXTOR )?STM3(160813|32061[34]|500320|640323|750330|10003(34|40))AS?", + "", + "There are known problems with these drives,\n" + "see the following Seagate web pages:\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207975", + "" + }, + { "Seagate Maxtor DiamondMax 23", + "STM3((160|250)31|(320|500)41|(750|1000)52)8AS?", + "", "", "" + }, + { "Maxtor MaXLine Plus II", + "Maxtor 7Y250[PM]0", + "", + "", + "-v 9,minutes" + }, + { "Maxtor MaXLine II family", + "Maxtor [45]A(25|30|32)0[JN]0", + "", + "", + "-v 9,minutes" + }, + { "Maxtor MaXLine III family (ATA/133 and SATA/150)", + "Maxtor 7L(25|30)0[SR]0", + "", + "", + "-v 9,minutes" + }, + { "Maxtor MaXLine III family (SATA/300)", + "Maxtor 7V(25|30)0F0", + "", "", "" + }, + { "Maxtor MaXLine Pro 500 family", // There is also a 7H500R0 model, but I + "Maxtor 7H500F0", // haven't added it because I suspect + "", // it might need vendoropts_9_minutes + "", "" // and nobody has submitted a report yet + }, + { "", // HITACHI_DK14FA-20B + "HITACHI_DK14FA-20B", + "", + "", + "-v 9,minutes -v 193,loadunload" + }, + { "HITACHI Travelstar DK23XX/DK23XXB series", + "HITACHI_DK23..-..B?", + "", + "", + "-v 9,minutes -v 193,loadunload" + }, + { "Hitachi Endurastar J4K20/N4K20 (formerly DK23FA-20J)", + "(HITACHI_DK23FA-20J|HTA422020F9AT[JN]0)", + "", + "", + "-v 9,minutes -v 193,loadunload" + }, + { "Hitachi Endurastar J4K30/N4K30", + "HE[JN]4230[23]0F9AT00", + "", + "", + "-v 9,minutes -v 193,loadunload" + }, + { "Hitachi Travelstar C4K60 family", // 1.8" slim drive + "HTC4260[23]0G5CE00|HTC4260[56]0G8CE00", + "", + "", + "-v 9,minutes -v 193,loadunload" + }, + { "IBM Travelstar 4GT family", + "IBM-DTCA-2(324|409)0", + "", "", "" + }, + { "IBM Travelstar 6GN family", + "IBM-DBCA-20(324|486|648)0", + "", "", "" + }, + { "IBM Travelstar 25GS, 18GT, and 12GN family", + "IBM-DARA-2(25|18|15|12|09|06)000", + "", "", "" + }, + { "IBM Travelstar 14GS", + "IBM-DCYA-214000", + "", "", "" + }, + { "IBM Travelstar 4LP", + "IBM-DTNA-2(180|216)0", + "", "", "" + }, + { "IBM Travelstar 48GH, 30GN, and 15GN family", + "(IBM-|Hitachi )?IC25(T048ATDA05|N0(30|20|15|12|10|07|06|05)ATDA04)-.", + "", "", "" + }, + { "IBM Travelstar 32GH, 30GT, and 20GN family", + "IBM-DJSA-2(32|30|20|10|05)", + "", "", "" + }, + { "IBM Travelstar 4GN family", + "IBM-DKLA-2(216|324|432)0", + "", "", "" + }, + { "IBM/Hitachi Travelstar 60GH and 40GN family", + "(IBM-|Hitachi )?IC25(T060ATC[SX]05|N0[4321]0ATC[SX]04)-.", + "", "", "" + }, + { "IBM/Hitachi Travelstar 40GNX family", + "(IBM-|Hitachi )?IC25N0[42]0ATC[SX]05-.", + "", "", "" + }, + { "Hitachi Travelstar 80GN family", + "(Hitachi )?IC25N0[23468]0ATMR04-.", + "", "", "" + }, + { "Hitachi Travelstar 4K40", + "(Hitachi )?HTS4240[234]0M9AT00", + "", "", "" + }, + { "Hitachi Travelstar 4K120", + "(Hitachi )?(HTS4212(60|80|10|12)H9AT00|HTS421260G9AT00)", + "", "", "" + }, + { "Hitachi Travelstar 5K80 family", + "(Hitachi )?HTS5480[8642]0M9AT00", + "", "", "" + }, + { "Hitachi Travelstar 5K100 series", + "(Hitachi )?HTS5410[1864]0G9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar E5K100 series", + "(Hitachi )?HTE541040G9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar 5K120", + "(Hitachi )?HTS5412(60|80|10|12)H9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar 5K160 series", + "(Hitachi |HITACHI )?HTS5416([468]0|1[26])J9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar E5K160 series", + "(Hitachi )?HTE5416(12|16|60|80)J9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar 5K250 series", + "(Hitachi |HITACHI )?HTS5425(80|12|16|20|25)K9(A3|SA)00", + "", "", "" + }, + { "Hitachi Travelstar 5K320 series", + "(Hitachi |HITACHI )?HT(S|E)5432(80|12|16|25|32)L9(A3(00)?|SA01)", + "", "", "" + }, + { "Hitachi Travelstar 7K60", + "(Hitachi )?HTS726060M9AT00", + "", "", "" + }, + { "Hitachi Travelstar E7K60", + "(Hitachi )?HTE7260[46]0M9AT00", + "", "", "" + }, + { "Hitachi Travelstar 7K100", + "(Hitachi )?HTS7210[168]0G9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar E7K100", + "(Hitachi )?HTE7210[168]0G9(AT|SA)00", + "", "", "" + }, + { "Hitachi Travelstar 7K200", + "(Hitachi )?HTS7220(80|10|12|16|20)K9(A3|SA)00", + "", "", "" + }, + { "Hitachi Travelstar 7K320", // tested with HTS723225L9A360/FCDOC30F + "(Hitachi )?HT[ES]7232(80|12|16|25|32)L9(A300|A360|SA61)", + "", "", "" + }, + { "Hitachi Travelstar 7K500", + "(Hitachi )?HT[ES]7250(12|16|25|32|50)A9A36[45]", + "", "", "" + }, + { "IBM Deskstar 14GXP and 16GP series", + "IBM-DTTA-3(7101|7129|7144|5032|5043|5064|5084|5101|5129|5168)0", + "", "", "" + }, + { "IBM Deskstar 25GP and 22GXP family", + "IBM-DJNA-3(5(101|152|203|250)|7(091|135|180|220))0", + "", "", "" + }, + { "IBM Deskstar 37GP and 34GXP family", + "IBM-DPTA-3(5(375|300|225|150)|7(342|273|205|136))0", + "", "", "" + }, + { "IBM/Hitachi Deskstar 120GXP family", + "(IBM-)?IC35L((020|040|060|080|120)AVVA|0[24]0AVVN)07-[01]", + "", "", "" + }, + { "IBM/Hitachi Deskstar GXP-180 family", + "(IBM-)?IC35L(030|060|090|120|180)AVV207-[01]", + "", "", "" + }, + { "Hitachi Deskstar 7K80 series", + "(Hitachi )?HDS7280([48]0PLAT20|(40)?PLA320|80PLA380).*", + "", "", "" + }, + { "Hitachi Deskstar 7K160", + "(Hitachi )?HDS7216(80|16)PLA[3T]80.*", + "", "", "" + }, + { "Hitachi Deskstar 7K250 series", + "(Hitachi )?HDS7225((40|80|12|16)VLAT20|(12|16|25)VLAT80|(80|12|16|25)VLSA80)", + "", "", "" + }, + { "Hitachi Deskstar 7K250 (SUN branded)", + "HITACHI HDS7225SBSUN250G.*", + "", "", "" + }, + { "Hitachi Deskstar T7K250 series", + "(Hitachi )?HDT7225((25|20|16)DLA(T80|380))", + "", "", "" + }, + { "Hitachi Deskstar 7K400 series", + "(Hitachi )?HDS724040KL(AT|SA)80", + "", "", "" + }, + { "Hitachi Deskstar 7K500 series", + "(Hitachi )?HDS725050KLA(360|T80)", + "", "", "" + }, + { "Hitachi Deskstar P7K500 series", + "(Hitachi )?HDP7250(16|25|32|40|50)GLA(36|38|T8)0", + "", "", "" + }, + { "Hitachi Deskstar T7K500", + "(Hitachi )?HDT7250(25|32|40|50)VLA(360|380|T80)", + "", "", "" + }, + { "Hitachi Deskstar 7K1000", + "(Hitachi )?HDS7210(50|75|10)KLA330", + "", "", "" + }, + { "Hitachi Deskstar 7K1000.B", + "(Hitachi )?HDT7210((16|25)SLA380|(32|50|64|75|10)SLA360)", + "", "", "" + }, + { "Hitachi Deskstar 7K2000", + "Hitachi HDS722020ALA330", + "", "", "" + }, + { "Hitachi Ultrastar 7K1000", + "(Hitachi )?HUA7210(50|75|10)KLA330", + "", "", "" + }, + { "Toshiba 2.5\" HDD series (10-20 GB)", + "TOSHIBA MK(101[67]GAP|15[67]GAP|20(1[678]GAP|(18|23)GAS))", + "", "", "" + }, + { "Toshiba 2.5\" HDD series (30-60 GB)", + "TOSHIBA MK((6034|4032)GSX|(6034|4032)GAX|(6026|4026|4019|3019)GAXB?|(6025|6021|4025|4021|4018|3025|3021|3018)GAS|(4036|3029)GACE?|(4018|3017)GAP)", + "", "", "" + }, + { "Toshiba 2.5\" HDD series (80 GB and above)", + "TOSHIBA MK(80(25GAS|26GAX|32GAX|32GSX)|10(31GAS|32GAX)|12(33GAS|34G[AS]X)|2035GSS)", + "", "", "" + }, + { "Toshiba 2.5\" HDD MK..52GSX series", + "TOSHIBA MK(80|12|16|25|32)52GSX", + "", "", "" + }, + { "Toshiba 1.8\" HDD series", + "TOSHIBA MK[23468]00[4-9]GA[HL]", + "", "", "" + }, + { "", // TOSHIBA MK6022GAX + "TOSHIBA MK6022GAX", + "", "", "" + }, + { "", // TOSHIBA MK6409MAV + "TOSHIBA MK6409MAV", + "", "", "" + }, + { "Toshiba MKx019GAXB (SUN branded)", + "TOS MK[34]019GAXB SUN[34]0G", + "", "", "" + }, + { "Seagate Momentus family", + "ST9(20|28|40|48)11A", + "", "", "" + }, + { "Seagate Momentus 42 family", + "ST9(2014|3015|4019)A", + "", "", "" + }, + { "Seagate Momentus 4200.2 series", + "ST9(100822|808210|60821|50212|402113|30219)A", + "", "", "" + }, + { "Seagate Momentus 5400.2 series", + "ST9(808211|60822|408114|308110|120821|10082[34]|8823|6812|4813|3811)AS?", + "", "", "" + }, + { "Seagate Momentus 5400.3 series", + "ST9(4081[45]|6081[35]|8081[15]|100828|120822|160821)AS?", + "", "", "" + }, + { "Seagate Momentus 5400.3 ED series", + "ST9(4081[45]|6081[35]|8081[15]|100828|120822|160821)AB", + "", "", "" + }, + { "Seagate Momentus 5400.4 series", + "ST9(120817|(160|200|250)827)AS", + "", "", "" + }, + { "Seagate Momentus 5400.5 series", + "ST9((80|120|160)310|(250|320)320)AS", + "", "", "" + }, + { "Seagate Momentus 5400.6 series", + "ST9((12|25)0315AS|500325)ASG?", + "", "", "" + }, + { "Seagate Momentus 5400 PSD series", // Hybrid drives + "ST9(808212|(120|160)8220)AS", + "", "", "" + }, + { "Seagate Momentus 7200.1 series", + "ST9(10021|80825|6023|4015)AS?", + "", "", "" + }, + { "Seagate Momentus 7200.2 series", + "ST9(80813|100821|120823|160823|200420)ASG?", + "", "", "" + }, + { "Seagate Momentus 7200.3 series", + "ST9((80|120|160)411|(250|320)421)ASG?", + "", "", "" + }, + { "Seagate Momentus 7200.4 series", + "ST9(160412|250410|320423|500420)ASG?", + "", "", "" + }, + { "Seagate Momentus 7200 FDE.2 series", + "ST9((160413|25041[12]|320426|50042[12])AS|(16041[89]|2504[16]4|32042[67]|500426)ASG)", + "", "", "" + }, + { "Seagate Medalist 1010, 1721, 2120, 3230 and 4340", // ATA2, with -t permissive + "ST3(1010|1721|2120|3230|4340)A", + "", "", "" + }, + { "Seagate Medalist 2110, 3221, 4321, 6531, and 8641", + "ST3(2110|3221|4321|6531|8641)A", + "", "", "" + }, + { "Seagate U Series X family", + "ST3(10014A(CE)?|20014A)", + "", "", "" + }, + { "Seagate U8 family", + "ST3(4313|6811|8410|13021|17221)A", + "", "", "" + }, + { "Seagate U7 family", + "ST3(30012|40012|60012|80022|120020)A", + "", "", "" + }, + { "Seagate U Series 6 family", + "ST3(8002|6002|4081|3061|2041)0A", + "", "", "" + }, + { "Seagate U Series 5 family", + "ST3(40823|30621|20413|15311|10211)A", + "", "", "" + }, + { "Seagate U4 family", + "ST3(2112|4311|6421|8421)A", + "", "", "" + }, + { "Seagate U8 family", + "ST3(8410|4313|17221|13021)A", + "", "", "" + }, + { "Seagate U10 family", + "ST3(20423|15323|10212)A", + "", "", "" + }, + { "Seagate Barracuda ATA family", + "ST3(2804|2724|2043|1362|1022|681)0A", + "", "", "" + }, + { "Seagate Barracuda ATA II family", + "ST3(3063|2042|1532|1021)0A", + "", "", "" + }, + { "Seagate Barracuda ATA III family", + "ST3(40824|30620|20414|15310|10215)A", + "", "", "" + }, + { "Seagate Barracuda ATA IV family", + "ST3(20011|30011|40016|60021|80021)A", + "", "", "" + }, + { "Seagate Barracuda ATA V family", + "ST3(12002(3A|4A|9A|3AS)|800(23A|15A|23AS)|60(015A|210A)|40017A)", + "", "", "" + }, + { "Seagate Barracuda 5400.1", + "ST340015A", + "", "", "" + }, + { "Seagate Barracuda 7200.7 and 7200.7 Plus family", + "ST3(200021A|200822AS?|16002[13]AS?|12002[26]AS?|1[26]082[78]AS|8001[13]AS?|8081[79]AS|60014A|40111AS|40014AS?)", + "", "", "" + }, + { "Seagate Barracuda 7200.8 family", + "ST3(400[68]32|300[68]31|250[68]23|200826)AS?", + "", "", "" + }, + { "Seagate Barracuda 7200.9 family", + "ST3(402111?|80[28]110?|120[28]1[0134]|160[28]1[012]|200827|250[68]24|300[68]22|(320|400)[68]33|500[68](32|41))AS?.*", + "", "", "" + }, + { "Seagate Barracuda 7200.10 family", + "ST3((80|160)[28]15|200820|250[34]10|(250|300|320|400)[68]20|500[68]30|750[68]40)AS?", + "", "", "" + }, + { "Seagate Barracuda 7200.11 family", // unaffected firmware + "ST3(160813|320[68]13|500[368]20|640[36]23|640[35]30|750[36]30|1000(333|[36]40)|1500341)AS?", + "CC.?.?", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957 + "", "" + }, + { "Seagate Barracuda 7200.11 family", // fixed firmware + "ST3(500[368]20|750[36]30|1000340)AS?", + "SD1A", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951 + "", "" + }, + { "Seagate Barracuda 7200.11 family", // fixed firmware + "ST3(160813|320[68]13|640[36]23|1000333|1500341)AS?", + "SD[12]B", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957 + "", "" + }, + { "Seagate Barracuda 7200.11 family", // buggy firmware + "ST3(500[368]20|640[35]30|750[36]30|1000340)AS?", + "(AD14|SD1[5-9])", + "There are known problems with these drives,\n" + "AND THIS FIRMWARE VERSION IS AFFECTED,\n" + "see the following Seagate web pages:\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951", + "" + }, + { "Seagate Barracuda 7200.11 family", // unknown firmware + "ST3(160813|320[68]13|500[368]20|640[36]23|640[35]30|750[36]30|1000(333|[36]40)|1500341)AS?", + "", + "There are known problems with these drives,\n" + "see the following Seagate web pages:\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957", + "" + }, + { "Seagate Barracuda 7200.12 family", + "ST3((160|250)318|(320|500)418|500410|(750|1000)528)AS", + "", "", "" + }, + { "Seagate Barracuda ES", + "ST3(250[68]2|32062|40062|50063|75064)0NS", + "", "", "" + }, + { "Seagate Barracuda ES.2", // fixed firmware + "ST3(25031|50032|75033|100034)0NS", + "SN[01]6", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207963 + "", "" + }, + { "Seagate Barracuda ES.2", // unknown firmware + "ST3(25031|50032|75033|100034)0NS", + "", + "There are known problems with these drives,\n" + "see the following Seagate web pages:\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" + "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207963", + "" + }, + { "Seagate Barracuda LP", + "ST3(500412|1000520|1500541|2000542)AS", + "", "", "" + }, + { "Seagate Medalist 17240, 13030, 10231, 8420, and 4310", + "ST3(17240|13030|10231|8420|4310)A", + "", "", "" + }, + { "Seagate Medalist 17242, 13032, 10232, 8422, and 4312", + "ST3(1724|1303|1023|842|431)2A", + "", "", "" + }, + { "Seagate NL35 family", + "ST3(250623|250823|400632|400832|250824|250624|400633|400833|500641|500841)NS", + "", "", "" + }, + { "Seagate SV35.2 Series", + "ST3(160815|250820|320620|500630|750640)(A|S)V", + "", "", "" + }, + { "Seagate DB35.3 Series", + "ST3(750640SCE|((80|160)215|(250|320|400)820|500830|750840)(A|S)CE)", + "", "", "" + }, + { "Western Digital Protege", + /* Western Digital drives with this comment all appear to use Attribute 9 in + * a non-standard manner. These entries may need to be updated when it + * is understood exactly how Attribute 9 should be interpreted. + * UPDATE: this is probably explained by the WD firmware bug described in the + * smartmontools FAQ */ + "WDC WD([2468]00E|1[26]00A)B-.*", + "", "", "" + }, + { "Western Digital Caviar family", + /* Western Digital drives with this comment all appear to use Attribute 9 in + * a non-standard manner. These entries may need to be updated when it + * is understood exactly how Attribute 9 should be interpreted. + * UPDATE: this is probably explained by the WD firmware bug described in the + * smartmontools FAQ */ + "WDC WD(2|3|4|6|8|10|12|16|18|20|25)00BB-.*", + "", "", "" + }, + { "Western Digital Caviar WDxxxAB series", + /* Western Digital drives with this comment all appear to use Attribute 9 in + * a non-standard manner. These entries may need to be updated when it + * is understood exactly how Attribute 9 should be interpreted. + * UPDATE: this is probably explained by the WD firmware bug described in the + * smartmontools FAQ */ + "WDC WD(3|4|6|8|25)00AB-.*", + "", "", "" + }, + { "Western Digital Caviar WDxxxAA series", + /* Western Digital drives with this comment all appear to use Attribute 9 in + * a non-standard manner. These entries may need to be updated when it + * is understood exactly how Attribute 9 should be interpreted. + * UPDATE: this is probably explained by the WD firmware bug described in the + * smartmontools FAQ */ + "WDC WD...?AA(-.*)?", + "", "", "" + }, + { "Western Digital Caviar WDxxxBA series", + /* Western Digital drives with this comment all appear to use Attribute 9 in + * a non-standard manner. These entries may need to be updated when it + * is understood exactly how Attribute 9 should be interpreted. + * UPDATE: this is probably explained by the WD firmware bug described in the + * smartmontools FAQ */ + "WDC WD...BA", + "", "", "" + }, + { "Western Digital Caviar AC series", // add only 5400rpm/7200rpm (ata33 and faster) + "WDC AC((116|121|125|225|132|232)|([1-4][4-9][0-9])|([1-4][0-9][0-9][0-9]))00[A-Z]?.*", + "", "", "" + }, + { "Western Digital Caviar SE family", + /* Western Digital drives with this comment all appear to use Attribute 9 in + * a non-standard manner. These entries may need to be updated when it + * is understood exactly how Attribute 9 should be interpreted. + * UPDATE: this is probably explained by the WD firmware bug described in the + * smartmontools FAQ + * UPDATE 2: this does not apply to more recent models, at least WD3200AAJB */ + "WDC WD(4|6|8|10|12|16|18|20|25|30|32|40|50)00(JB|PB)-.*", + "", "", "" + }, + { "Western Digital Caviar Blue EIDE family", // WD Caviar SE EIDE family + /* not completely accurate: at least also WD800JB, WD(4|8|20|25)00BB sold as Caviar Blue */ + "WDC WD(16|25|32|40|50)00AAJB-.*", + "", "", "" + }, + { "Western Digital Caviar Blue EIDE family", // WD Caviar SE16 EIDE family + "WDC WD(25|32|40|50)00AAKB-.*", + "", "", "" + }, + { "Western Digital RE EIDE family", + "WDC WD(12|16|25|32)00SB-.*", + "", "", "" + }, + { "Western Digital Caviar Serial ATA family", + "WDC WD(4|8|20|32)00BD-.*", + "", "", "" + }, + { "Western Digital Caviar SE Serial ATA family", + "WDC WD(4|8|12|16|20|25|32|40)00(JD|KD|PD)-.*", + "", "", "" + }, + { "Western Digital Caviar SE Serial ATA family", + "WDC WD(8|12|16|20|25|30|32|40|50)00JS-.*", + "", "", "" + }, + { "Western Digital Caviar SE16 Serial ATA family", + "WDC WD(16|20|25|32|40|50|75)00KS-.*", + "", "", "" + }, + { "Western Digital Caviar Blue Serial ATA family", // WD Caviar SE Serial ATA family + /* not completely accurate: at least also WD800BD, (4|8)00JD sold as Caviar Blue */ + "WDC WD((8|12|16|25|32)00AABS|(12|16|25|32|40|50)00AAJS)-.*", + "", "", "" + }, + { "Western Digital Caviar Blue Serial ATA family", // WD Caviar SE16 Serial ATA family + "WDC WD(16|20|25|32|40|50|64|75)00AAKS-.*", + "", "", "" + }, + { "Western Digital RE Serial ATA family", + "WDC WD(12|16|25|32)00(SD|YD|YS)-.*", + "", "", "" + }, + { "Western Digital RE2 Serial ATA family", + "WDC WD((40|50|75)00(YR|YS|AYYS)|(16|32|40|50)0[01]ABYS)-.*", + "", "", "" + }, + { "Western Digital RE2-GP family", + "WDC WD(5000AB|7500AY|1000FY)PS-.*", + "", "", "" + }, + { "Western Digital RE3 Serial ATA family", + "WDC WD((25|32|50)02A|(75|10)02F)BYS-.*", + "", "", "" + }, + { "Western Digital Caviar Green family", + "WDC WD((50|64|75)00AA(C|V)S|(50|75)00AADS|10EA(C|V)S|(10|15|20)EADS)-.*", + "", "", "" + }, + { "Western Digital Caviar Black family", + "WDC WD((500|640|750)1AA|1001FA)LS-.*", + "", "", "" + }, + { "Western Digital AV ATA family", + "WDC WD(8|16|50)00AV(B|J)B-.*", + "", "", "" + }, + { "Western Digital AV-GP family", + "WDC WD((16|25|32|50|64|75)00AVVS|(50|75)00AVCS|10EVVS|(10|20)EVCS|WD(10|15|20)EVDS)-.*", + "", "", "" + }, + { "Western Digital Raptor family", + "WDC WD((360|740|800)GD|(360|740|1500)ADF[DS])-.*", + "", "", "" + }, + { "Western Digital Raptor X", + "WDC WD1500AHFD-.*", + "", "", "" + }, + { "Western Digital VelociRaptor family", + "WDC WD((1500|3000)B|3000G)LFS-.*", + "", "", "" + }, + { "Western Digital Scorpio EIDE family", + "WDC WD(4|6|8|10|12|16)00(UE|VE)-.*", + "", "", "" + }, + { "Western Digital Scorpio Blue EIDE family", + "WDC WD(4|6|8|10|12|16|25)00BEVE-.*", + "", "", "" + }, + { "Western Digital Scorpio Serial ATA family", + "WDC WD(4|6|8|10|12|16|25)00BEAS-.*", + "", "", "" + }, + { "Western Digital Scorpio Blue Serial ATA family", + "WDC WD((4|6|8|10|12|16|25)00BEVS|(8|12|16|25|32|40|50|64)00BEVT|7500KEVT|10TEVT)-.*", + "", "", "" + }, + { "Western Digital Scorpio Black Serial ATA family", + "WDC WD(8|12|16|25|32)00B[EJ]KT-.*", + "", "", "" + }, + { "Western Digital My Passport Essential hard drive (USB interface)", + "WDC WD(25|32|40|50)00BMVU-.*", + "", "", "" + }, + { "Western Digital My Passport Essential SE hard drive (USB interface)", + "WDC WD7500KMVV-.*", + "", "", "" + }, + { "Western Digital My Passport hard drive (USB interface)", + "WDC WD3200BMVV-.*", + "", "", "" + }, + { "Quantum Bigfoot series", + "QUANTUM BIGFOOT TS10.0A", + "", "", "" + }, + { "Quantum Fireball lct15 series", + "QUANTUM FIREBALLlct15 ([123]0|22)", + "", "", "" + }, + { "Quantum Fireball lct20 series", + "QUANTUM FIREBALLlct20 [234]0", + "", "", "" + }, + { "Quantum Fireball CX series", + "QUANTUM FIREBALL CX10.2A", + "", "", "" + }, + { "Quantum Fireball CR series", + "QUANTUM FIREBALL CR(4.3|6.4|8.4|13.0)A", + "", "", "" + }, + { "Quantum Fireball EX series", + "QUANTUM FIREBALL EX(3.2|6.4)A", + "", "", "" + }, + { "Quantum Fireball ST series", + "QUANTUM FIREBALL ST(3.2|4.3|4300)A", + "", "", "" + }, + { "Quantum Fireball SE series", + "QUANTUM FIREBALL SE4.3A", + "", "", "" + }, + { "Quantum Fireball Plus LM series", + "QUANTUM FIREBALLP LM(10.2|15|20.[45]|30)", + "", "", "" + }, + { "Quantum Fireball Plus AS series", + "QUANTUM FIREBALLP AS(10.2|20.5|30.0|40.0)", + "", "", "" + }, + { "Quantum Fireball Plus KX series", + "QUANTUM FIREBALLP KX27.3", + "", "", "" + }, + { "Quantum Fireball Plus KA series", + "QUANTUM FIREBALLP KA(9|10).1", + "", "", "" + }, +/* +}; // builtin_knowndrives[] + */ diff --git a/examplescripts/Makefile.in b/examplescripts/Makefile.in deleted file mode 100644 index d576004..0000000 --- a/examplescripts/Makefile.in +++ /dev/null @@ -1,448 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# $Id: Makefile.am 2846 2009-07-18 14:18:51Z chrfranke $ -# - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = examplescripts -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -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__installdirs = "$(DESTDIR)$(examplesdir)" \ - "$(DESTDIR)$(examplesdir)" -SCRIPTS = $(examples_SCRIPTS) -SOURCES = -DIST_SOURCES = -DATA = $(examples_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -ASFLAGS = @ASFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -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__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -attributelog = @attributelog@ -attributelogdir = @attributelogdir@ -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@ -drivedbdir = @drivedbdir@ -dvidir = @dvidir@ -exampledir = @exampledir@ -exec_prefix = @exec_prefix@ -gcc_have_attr_packed = @gcc_have_attr_packed@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -initddir = @initddir@ -install_sh = @install_sh@ -libc_have_working_snprintf = @libc_have_working_snprintf@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -os_deps = @os_deps@ -os_libs = @os_libs@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -releaseversion = @releaseversion@ -savestates = @savestates@ -savestatesdir = @savestatesdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -smartd_suffix = @smartd_suffix@ -smartmontools_release_date = @smartmontools_release_date@ -smartmontools_release_time = @smartmontools_release_time@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -with_selinux = @with_selinux@ -examplesdir = $(exampledir) -examples_DATA = README -examples_SCRIPTS = Example1 \ - Example2 \ - Example3 \ - Example4 - -EXTRA_DIST = $(examples_SCRIPTS) -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examplescripts/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign examplescripts/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-examplesSCRIPTS: $(examples_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" - @list='$(examples_SCRIPTS)'; test -n "$(examplesdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | 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; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-examplesSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(examples_SCRIPTS)'; test -n "$(examplesdir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -install-examplesDATA: $(examples_DATA) - @$(NORMAL_INSTALL) - test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" - @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ - done - -uninstall-examplesDATA: - @$(NORMAL_UNINSTALL) - @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - 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" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(SCRIPTS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(examplesdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(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" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-examplesDATA install-examplesSCRIPTS - -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 - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-examplesDATA uninstall-examplesSCRIPTS - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-examplesDATA install-examplesSCRIPTS \ - 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 maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am uninstall-examplesDATA \ - uninstall-examplesSCRIPTS - - -# 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/install-sh b/install-sh deleted file mode 100755 index 6781b98..0000000 --- a/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # 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 (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/knowndrives.cpp b/knowndrives.cpp index 9e9e15f..4d6901d 100644 --- a/knowndrives.cpp +++ b/knowndrives.cpp @@ -35,1337 +35,22 @@ #include -const char *knowndrives_c_cvsid="$Id: knowndrives.cpp 2986 2009-11-16 22:43:50Z manfred99 $" -ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID UTILITY_H_CVSID; +const char * knowndrives_cpp_cvsid = "$Id: knowndrives.cpp 3004 2009-12-19 19:39:12Z chrfranke $" + KNOWNDRIVES_H_CVSID; #define MODEL_STRING_LENGTH 40 #define FIRMWARE_STRING_LENGTH 8 #define TABLEPRINTWIDTH 19 -/* Table of settings for known drives terminated by an element containing all - * zeros. The drivesettings structure is described in knowndrives.h. Note - * that lookupdrive() will search knowndrives[] from the start to end or - * until it finds the first match, so the order in knowndrives[] is important - * for distinct entries that could match the same drive. */ - -// Note that the table just below uses EXTENDED REGULAR EXPRESSIONS. -// A good on-line reference for these is: -// http://www.zeus.com/extra/docsystem/docroot/apps/web/docs/modules/access/regex.html - -// Starting with CVS version 1.179 of this file, the regular expressions -// for drive model and firmware must match the full string. The effect of -// "^FULLSTRING$" is identical to "FULLSTRING". The special characters '^' -// and '$' are no longer required, but still allowed. The form ".*SUBSTRING.*" -// can be used if substring match is desired. - -static const drive_settings builtin_knowndrives[] = { -// BEGIN drivedb.h (DO NOT DELETE - used by Makefile) - { "Apple SSD SM128", - "APPLE SSD SM128", - "", "", "" - }, - { "Asus-Phison SSD", - "ASUS-PHISON SSD", - "", "", "" - }, - { "OCZ Vertex SSD", - "OCZ[ -]VERTEX.*", - "", "", - " -v 9,raw64" - " -v 12,raw64" - " -v 184,raw64,Initial_Bad_Block_Count" - " -v 195,raw64,Program_Failure_Blk_Ct" - " -v 196,raw64,Erase_Failure_Blk_Ct" - " -v 197,raw64,Read_Failure_Blk_Ct" - " -v 198,raw64,Read_Sectors_Tot_Ct" - " -v 199,raw64,Write_Sectors_Tot_Ct" - " -v 200,raw64,Read_Commands_Tot_Ct" - " -v 201,raw64,Write_Commands_Tot_Ct" - " -v 202,raw64,Error_Bits_Flash_Tot_Ct" - " -v 203,raw64,Corr_Read_Errors_Tot_Ct" - " -v 204,raw64,Bad_Block_Full_Flag" - " -v 205,raw64,Max_PE_Count_Spec" - " -v 206,raw64,Min_Erase_Count" - " -v 207,raw64,Max_Erase_Count" - " -v 208,raw64,Average_Erase_Count" - " -v 209,raw64,Remaining_Lifetime_Perc" - }, - { "OCZ Agility SSD", - "OCZ[ -]AGILITY", - "", "", - " -v 9,raw64" - " -v 12,raw64" - " -v 184,raw64,Initial_Bad_Block_Count" - " -v 195,raw64,Program_Failure_Blk_Ct" - " -v 196,raw64,Erase_Failure_Blk_Ct" - " -v 197,raw64,Read_Failure_Blk_Ct" - " -v 198,raw64,Read_Sectors_Tot_Ct" - " -v 199,raw64,Write_Sectors_Tot_Ct" - " -v 200,raw64,Read_Commands_Tot_Ct" - " -v 201,raw64,Write_Commands_Tot_Ct" - " -v 202,raw64,Error_Bits_Flash_Tot_Ct" - " -v 203,raw64,Corr_Read_Errors_Tot_Ct" - " -v 204,raw64,Bad_Block_Full_Flag" - " -v 205,raw64,Max_PE_Count_Spec" - " -v 206,raw64,Min_Erase_Count" - " -v 207,raw64,Max_Erase_Count" - " -v 208,raw64,Average_Erase_Count" - " -v 209,raw64,Remaining_Lifetime_Perc" - }, - { "Intel X25-E SSD", - "SSDSA2SH(032|064)G1.* INTEL", - "", "", - "-v 225,raw48,Host_Writes_Count" - }, - { "Transcend Solid-State Drive", - "TS(8|16|32|64|128)GSSD25-(M|S)", - "", "", "" - }, - { "Transcend Solid-State Drive V series", - "TS(8|16|32|64|128|192)GSSD25S-(M|S)", - "", "", "" - }, - { "Marvell SSD SD88SA024BA0 (SUN branded)", - "MARVELL SD88SA024BA0 SUN24G 0902M0054V", - "", "", "" - }, - { "HP 1TB SATA disk GB1000EAFJL", - "GB1000EAFJL", - "", "", "" - }, - { "IBM Deskstar 60GXP series", // ER60A46A firmware - "(IBM-|Hitachi )?IC35L0[12346]0AVER07.*", - "ER60A46A", - "", "" - }, - { "IBM Deskstar 60GXP series", // All other firmware - "(IBM-|Hitachi )?IC35L0[12346]0AVER07.*", - "", - "IBM Deskstar 60GXP drives may need upgraded SMART firmware.\n" - "Please see http://www.geocities.com/dtla_update/index.html#rel and\n" - "http://www.ibm.com/pc/support/site.wss/MIGR-42215.html", - "" - }, - { "IBM Deskstar 40GV & 75GXP series (A5AA/A6AA firmware)", - "(IBM-)?DTLA-30[57]0[123467][05].*", - "T[WX][123468AG][OF]A[56]AA", - "", "" - }, - { "IBM Deskstar 40GV & 75GXP series (all other firmware)", - "(IBM-)?DTLA-30[57]0[123467][05].*", - "", - "IBM Deskstar 40GV and 75GXP drives may need upgraded SMART firmware.\n" - "Please see http://www.geocities.com/dtla_update/ and\n" - "http://www.ibm.com/pc/support/site.wss/MIGR-42215.html", - "" - }, - { "", // ExcelStor J240, J340, J360, J680, and J880 - "ExcelStor Technology J(24|34|36|68|88)0", - "", "", "" - }, - { "", // Fujitsu M1623TAU - "FUJITSU M1623TAU", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHG series", - "FUJITSU MHG2...ATU?.*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHH series", - "FUJITSU MHH2...ATU?.*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHJ series", - "FUJITSU MHJ2...ATU?.*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHK series", - "FUJITSU MHK2...ATU?.*", - "", - "", - "-v 9,seconds" - }, - { "", // Fujitsu MHL2300AT - "FUJITSU MHL2300AT", - "", - "This drive's firmware has a harmless Drive Identity Structure\n" - "checksum error bug.", - "-v 9,seconds" - }, - { "", // MHM2200AT, MHM2150AT, MHM2100AT, MHM2060AT - "FUJITSU MHM2(20|15|10|06)0AT", - "", - "This drive's firmware has a harmless Drive Identity Structure\n" - "checksum error bug.", - "-v 9,seconds" - }, - { "Fujitsu MHN series", - "FUJITSU MHN2...AT", - "", - "", - "-v 9,seconds" - }, - { "", // Fujitsu MHR2020AT - "FUJITSU MHR2020AT", - "", - "", - "-v 9,seconds" - }, - { "", // Fujitsu MHR2040AT - "FUJITSU MHR2040AT", - "", // Tested on 40BA - "", - "-v 9,seconds -v 192,emergencyretractcyclect " - "-v 198,offlinescanuncsectorct -v 200,writeerrorcount" - }, - { "Fujitsu MHSxxxxAT family", - "FUJITSU MHS20[6432]0AT( .)?", - "", - "", - "-v 9,seconds -v 192,emergencyretractcyclect " - "-v 198,offlinescanuncsectorct -v 200,writeerrorcount " - "-v 201,detectedtacount" - }, - { "Fujitsu MHT series", - "FUJITSU MHT2...(AH|AS|AT|BH)U?.*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHU series", - "FUJITSU MHU2...ATU?.*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHV series", - "FUJITSU MHV2...(AH|AS|AT|BH|BS|BT).*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MPA..MPG series", - "FUJITSU MP[A-G]3...A[HTEV]U?.*", - "", - "", - "-v 9,seconds" - }, - { "Fujitsu MHY2 BH series", - "FUJITSU MHY2(04|06|08|10|12|16|20|25)0BH.*", - "", "", - "-v 240,raw48,Transfer_Error_Rate" - }, - { "Fujitsu MHW2 BH series", - "FUJITSU MHW2(04|06|08|10|12|16)0BH.*", - "", "", "" - }, - { "Fujitsu MHW2 BJ series", - "FUJITSU MHW2(08|12|16)0BJ.*", - "", "", "" - }, - { "Fujitsu MHZ2 BH series", - "FUJITSU MHZ2(04|08|12|16|20|25|32)0BH.*", - "", "", "" - }, - { "Fujitsu MHZ2 BJ series", - "FUJITSU MHZ2(08|12|16|20|25|32)0BJ.*", - "", - "", - "-v 9,minutes" - }, - { "Fujitsu MHZ2 BS series", - "FUJITSU MHZ2(12|25)0BS.*", - "", "", "" - }, - { "", // Samsung SV4012H (known firmware) - "SAMSUNG SV4012H", - "RM100-08", - "", - "-v 9,halfminutes -F samsung" - }, - { "", // Samsung SV4012H (all other firmware) - "SAMSUNG SV4012H", - "", - "May need -F samsung disabled; see manual for details.", - "-v 9,halfminutes -F samsung" - }, - { "", // Samsung SV0412H (known firmware) - "SAMSUNG SV0412H", - "SK100-01", - "", - "-v 9,halfminutes -v 194,10xCelsius -F samsung" - }, - { "", // Samsung SV0412H (all other firmware) - "SAMSUNG SV0412H", - "", - "May need -F samsung disabled; see manual for details.", - "-v 9,halfminutes -v 194,10xCelsius -F samsung" - }, - { "", // Samsung SV1204H (known firmware) - "SAMSUNG SV1204H", - "RK100-1[3-5]", - "", - "-v 9,halfminutes -v 194,10xCelsius -F samsung" - }, - { "", // Samsung SV1204H (all other firmware) - "SAMSUNG SV1204H", - "", - "May need -F samsung disabled; see manual for details.", - "-v 9,halfminutes -v 194,10xCelsius -F samsung" - }, - { "", // SAMSUNG SV0322A tested with FW JK200-35 - "SAMSUNG SV0322A", - "", "", "" - }, - { "", // SAMSUNG SP40A2H with RR100-07 firmware - "SAMSUNG SP40A2H", - "RR100-07", - "", - "-v 9,halfminutes -F samsung" - }, - { "", // SAMSUNG SP80A4H with RT100-06 firmware - "SAMSUNG SP80A4H", - "RT100-06", - "", - "-v 9,halfminutes -F samsung" - }, - { "", // SAMSUNG SP8004H with QW100-61 firmware - "SAMSUNG SP8004H", - "QW100-61", - "", - "-v 9,halfminutes -F samsung" - }, - { "SAMSUNG SpinPoint F1 DT series", // tested with HD103UJ/1AA01113 - "SAMSUNG HD(083G|16[12]G|25[12]H|32[12]H|50[12]I|642J|75[23]L|10[23]U)J", - "", "", "" - }, - { "SAMSUNG SpinPoint F1 RE series", // tested with HE103UJ/1AA01113 - "SAMSUNG HE(252H|322H|502I|642J|753L|103U)J", - "", "", "" - }, - { "SAMSUNG SpinPoint S250 series", // tested with HD200HJ/KF100-06 - "SAMSUNG HD(162|200|250)HJ", - "", "", "" - }, - { "SAMSUNG SpinPoint T133 series", // tested with HD300LJ/ZT100-12, HD400LJ/ZZ100-14, HD401LJ/ZZ100-15 - "SAMSUNG HD(250KD|(30[01]|320|40[01])L[DJ])", - "", "", "" - }, - { "SAMSUNG SpinPoint T166 series", // tested with HD501LJ/CR100-10 - "SAMSUNG HD(080G|160H|32[01]K|403L|50[01]L)J", - "", "", "" - }, - { "SAMSUNG SpinPoint P120 series", // VF100-37 firmware, tested with SP2514N/VF100-37 - "SAMSUNG SP(16[01]3|2[05][01]4)[CN]", - "VF100-37", - "", - "-F samsung3" - }, - { "SAMSUNG SpinPoint P120 series", // other firmware, tested with SP2504C/VT100-33 - "SAMSUNG SP(16[01]3|2[05][01]4)[CN]", - "", - "May need -F samsung3 enabled; see manual for details.", - "" - }, - { "SAMSUNG SpinPoint P80 SD series", // tested with HD160JJ/ZM100-33 - "SAMSUNG HD(080H|120I|160J)J", - "", "", "" - }, - { "SAMSUNG SpinPoint P80 series", // BH100-35 firmware, tested with SP0842N/BH100-35 - "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", - "BH100-35", - "", - "-F samsung3" - }, - { "SAMSUNG SpinPoint P80 series", // firmware *-35 or later - "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", - ".*-3[5-9]", - "May need -F samsung3 enabled; see manual for details.", - "" - }, - { "SAMSUNG SpinPoint P80 series", // firmware *-25...34, tested with SP1614C/SW100-25 and -34 - "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", - ".*-(2[5-9]|3[0-4])", - "", - "-v 9,halfminutes -v 198,increasing" - }, - { "SAMSUNG SpinPoint P80 series", // firmware *-23...24, tested with - // SP0802N/TK100-23, - // SP1213N/TL100-23, - // SP1604N/TM100-23 and -24 - "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", - ".*-2[34]", - "", - "-v 9,halfminutes -F samsung2" - }, - { "SAMSUNG SpinPoint P80 series", // unknown firmware - "SAMSUNG SP(0451|08[0124]2|12[0145]3|16[0145]4)[CN]", - "", - "May need -F samsung2 or -F samsung3 enabled; see manual for details.", - "" - }, -/* - // TODO: Make the entries below more specific. - // These entries produce misleading results, because newer - // Samsung disks reuse the version numbers *-NN. - { "", // All Samsung drives with '.*-25' firmware - "SAMSUNG.*", - ".*-25", - "May need -F samsung2 disabled; see manual for details.", - "-v 9,halfminutes -F samsung2" - }, - { "", // All Samsung drives with '.*-26 or later (currently to -39)' firmware - "SAMSUNG.*", - ".*-(2[6789]|3[0-9])", - "", - "-v 9,halfminutes" - }, - { "", // Samsung ALL OTHER DRIVES - "SAMSUNG.*", - "", - "May need -F samsung or -F samsung2 enabled; see manual for details.", - "" - }, -*/ - { "Maxtor Fireball 541DX family", - "Maxtor 2B0(0[468]|1[05]|20)H1", - "", - "", - "-v 9,minutes -v 194,unknown" - }, - { "Maxtor Fireball 3 family", - "Maxtor 2F0[234]0[JL]0", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 1280 ATA family", // no self-test log, ATA2-Fast - "Maxtor 8(1280A2|2160A4|2560A4|3840A6|4000A6|5120A8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 2160 Ultra ATA family", - "Maxtor 8(2160D2|3228D3|3240D3|4320D4|6480D6|8400D8|8455D8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 2880 Ultra ATA family", - "Maxtor 9(0510D4|0576D4|0648D5|0720D5|0840D6|0845D6|0864D6|1008D7|1080D8|1152D8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 3400 Ultra ATA family", - "Maxtor 9(1(360|350|202)D8|1190D7|10[12]0D6|0840D5|06[48]0D4|0510D3|1(350|202)E8|1010E6|0840E5|0640E4)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax D540X-4G family", - "Maxtor 4G(120J6|160J[68])", - "", - "", - "-v 9,minutes -v 194,unknown" - }, - { "Maxtor DiamondMax D540X-4K family", - "MAXTOR 4K(020H1|040H2|060H3|080H4)", - "", "", "" - }, - { "Maxtor DiamondMax Plus D740X family", - "MAXTOR 6L0(20[JL]1|40[JL]2|60[JL]3|80[JL]4)", - "", "", "" - }, - { "Maxtor DiamondMax Plus 5120 Ultra ATA 33 family", - "Maxtor 9(0512D2|0680D3|0750D3|0913D4|1024D4|1360D6|1536D6|1792D7|2048D8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax Plus 6800 Ultra ATA 66 family", - "Maxtor 9(2732U8|2390U7|204[09]U6|1707U5|1366U4|1024U3|0845U3|0683U2)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax D540X-4D", - "Maxtor 4D0(20H1|40H2|60H3|80H4)", - "", - "", - "-v 9,minutes -v 194,unknown" - }, - { "Maxtor DiamondMax 16 family", - "Maxtor 4(R0[68]0[JL]0|R1[26]0L0|A160J0|R120L4)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 4320 Ultra ATA family", - "Maxtor (91728D8|91512D7|91303D6|91080D5|90845D4|90645D3|90648D[34]|90432D2)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 17 VL family", - "Maxtor 9(0431U1|0641U2|0871U2|1301U3|1741U4)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 20 VL family", - "Maxtor (94091U8|93071U6|92561U5|92041U4|91731U4|91531U3|91361U3|91021U2|90841U2|90651U2)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax VL 30 family", // U: ATA66, H: ATA100 - "Maxtor (33073U4|32049U3|31536U2|30768U1|33073H4|32305H3|31536H2|30768H1)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 36 family", - "Maxtor (93652U8|92739U6|91826U4|91369U3|90913U2|90845U2|90435U1)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 40 ATA 66 series", - "Maxtor 9(0684U2|1024U2|1362U3|1536U3|2049U4|2562U5|3073U6|4098U8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax Plus 40 series (Ultra ATA 66 and Ultra ATA 100)", - "Maxtor (54098[UH]8|53073[UH]6|52732[UH]6|52049[UH]4|51536[UH]3|51369[UH]3|51024[UH]2)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 40 VL Ultra ATA 100 series", - "Maxtor 3(1024H1|1535H2|2049H2|3073H3|4098H4)( B)?", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax Plus 45 Ulta ATA 100 family", - "Maxtor 5(4610H6|4098H6|3073H4|2049H3|1536H2|1369H2|1023H2)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 60 ATA 66 family", - "Maxtor 9(1023U2|1536U2|2049U3|2305U3|3073U4|4610U6|6147U8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 60 ATA 100 family", - "Maxtor 9(1023H2|1536H2|2049H3|2305H3|3073H4|4098H6|4610H6|6147H8)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax Plus 60 family", - "Maxtor 5T0(60H6|40H4|30H3|20H2|10H1)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 80 family", - "Maxtor (98196H8|96147H6)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 536DX family", - "Maxtor 4W(100H6|080H6|060H4|040H3|030H2)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax Plus 8 family", - "Maxtor 6(E0[234]|K04)0L0", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 10 family (ATA/133 and SATA/150)", - "Maxtor 6(B(30|25|20|16|12|10|08)0[MPRS]|L(080[MLP]|(100|120)[MP]|160[MP]|200[MPRS]|250[RS]|300[RS]))0", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 10 family (SATA/300)", - "Maxtor 6V(080E|160E|200E|250F|300F|320F)0", - "", "", "" - }, - { "Maxtor DiamondMax Plus 9 family", - "Maxtor 6Y((060|080|120|160)L0|(060|080|120|160|200|250)P0|(060|080|120|160|200|250)M0)", - "", - "", - "-v 9,minutes" - }, - { "Maxtor DiamondMax 11 family", - "Maxtor 6H[45]00[FR]0", - "", "", "" - }, - { "Maxtor DiamondMax 17", - "Maxtor 6G(080L|160[PE])0", - "", "", "" - }, - { "Seagate Maxtor DiamondMax 20", - "MAXTOR STM3(40|80|160)[28]1[12]0?AS?", - "", "", "" - }, - { "Seagate Maxtor DiamondMax 21", - "MAXTOR STM3(160215|(250|320)820|320620|500630)AS?", - "", "", "" - }, - { "Seagate Maxtor DiamondMax 22", // fixed firmware - "(MAXTOR )?STM3(500320|750330|1000340)AS?", - "MX1A", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969 - "", "" - }, - { "Seagate Maxtor DiamondMax 22", // fixed firmware - "(MAXTOR )?STM3(160813|320614|640323|1000334)AS?", - "MX1B", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207975 - "", "" - }, - { "Seagate Maxtor DiamondMax 22", // buggy firmware - "(MAXTOR )?STM3(500320|750330|1000340)AS?", - "MX15", - "There are known problems with these drives,\n" - "AND THIS FIRMWARE VERSION IS AFFECTED,\n" - "see the following Seagate web pages:\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969", - "" - }, - { "Seagate Maxtor DiamondMax 22", // unknown firmware - "(MAXTOR )?STM3(160813|32061[34]|500320|640323|750330|10003(34|40))AS?", - "", - "There are known problems with these drives,\n" - "see the following Seagate web pages:\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207969\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207975", - "" - }, - { "Seagate Maxtor DiamondMax 23", - "STM3((160|250)31|(320|500)41|(750|1000)52)8AS?", - "", "", "" - }, - { "Maxtor MaXLine Plus II", - "Maxtor 7Y250[PM]0", - "", - "", - "-v 9,minutes" - }, - { "Maxtor MaXLine II family", - "Maxtor [45]A(25|30|32)0[JN]0", - "", - "", - "-v 9,minutes" - }, - { "Maxtor MaXLine III family (ATA/133 and SATA/150)", - "Maxtor 7L(25|30)0[SR]0", - "", - "", - "-v 9,minutes" - }, - { "Maxtor MaXLine III family (SATA/300)", - "Maxtor 7V(25|30)0F0", - "", "", "" - }, - { "Maxtor MaXLine Pro 500 family", // There is also a 7H500R0 model, but I - "Maxtor 7H500F0", // haven't added it because I suspect - "", // it might need vendoropts_9_minutes - "", "" // and nobody has submitted a report yet - }, - { "", // HITACHI_DK14FA-20B - "HITACHI_DK14FA-20B", - "", - "", - "-v 9,minutes -v 193,loadunload" - }, - { "HITACHI Travelstar DK23XX/DK23XXB series", - "HITACHI_DK23..-..B?", - "", - "", - "-v 9,minutes -v 193,loadunload" - }, - { "Hitachi Endurastar J4K20/N4K20 (formerly DK23FA-20J)", - "(HITACHI_DK23FA-20J|HTA422020F9AT[JN]0)", - "", - "", - "-v 9,minutes -v 193,loadunload" - }, - { "Hitachi Endurastar J4K30/N4K30", - "HE[JN]4230[23]0F9AT00", - "", - "", - "-v 9,minutes -v 193,loadunload" - }, - { "Hitachi Travelstar C4K60 family", // 1.8" slim drive - "HTC4260[23]0G5CE00|HTC4260[56]0G8CE00", - "", - "", - "-v 9,minutes -v 193,loadunload" - }, - { "IBM Travelstar 4GT family", - "IBM-DTCA-2(324|409)0", - "", "", "" - }, - { "IBM Travelstar 6GN family", - "IBM-DBCA-20(324|486|648)0", - "", "", "" - }, - { "IBM Travelstar 25GS, 18GT, and 12GN family", - "IBM-DARA-2(25|18|15|12|09|06)000", - "", "", "" - }, - { "IBM Travelstar 14GS", - "IBM-DCYA-214000", - "", "", "" - }, - { "IBM Travelstar 4LP", - "IBM-DTNA-2(180|216)0", - "", "", "" - }, - { "IBM Travelstar 48GH, 30GN, and 15GN family", - "(IBM-|Hitachi )?IC25(T048ATDA05|N0(30|20|15|12|10|07|06|05)ATDA04)-.", - "", "", "" - }, - { "IBM Travelstar 32GH, 30GT, and 20GN family", - "IBM-DJSA-2(32|30|20|10|05)", - "", "", "" - }, - { "IBM Travelstar 4GN family", - "IBM-DKLA-2(216|324|432)0", - "", "", "" - }, - { "IBM/Hitachi Travelstar 60GH and 40GN family", - "(IBM-|Hitachi )?IC25(T060ATC[SX]05|N0[4321]0ATC[SX]04)-.", - "", "", "" - }, - { "IBM/Hitachi Travelstar 40GNX family", - "(IBM-|Hitachi )?IC25N0[42]0ATC[SX]05-.", - "", "", "" - }, - { "Hitachi Travelstar 80GN family", - "(Hitachi )?IC25N0[23468]0ATMR04-.", - "", "", "" - }, - { "Hitachi Travelstar 4K40", - "(Hitachi )?HTS4240[234]0M9AT00", - "", "", "" - }, - { "Hitachi Travelstar 4K120", - "(Hitachi )?(HTS4212(60|80|10|12)H9AT00|HTS421260G9AT00)", - "", "", "" - }, - { "Hitachi Travelstar 5K80 family", - "(Hitachi )?HTS5480[8642]0M9AT00", - "", "", "" - }, - { "Hitachi Travelstar 5K100 series", - "(Hitachi )?HTS5410[1864]0G9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar E5K100 series", - "(Hitachi )?HTE541040G9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar 5K120", - "(Hitachi )?HTS5412(60|80|10|12)H9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar 5K160 series", - "(Hitachi |HITACHI )?HTS5416([468]0|1[26])J9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar E5K160 series", - "(Hitachi )?HTE5416(12|16|60|80)J9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar 5K250 series", - "(Hitachi |HITACHI )?HTS5425(80|12|16|20|25)K9(A3|SA)00", - "", "", "" - }, - { "Hitachi Travelstar 5K320 series", - "(Hitachi |HITACHI )?HT(S|E)5432(80|12|16|25|32)L9(A300|SA01)", - "", "", "" - }, - { "Hitachi Travelstar 7K60", - "(Hitachi )?HTS726060M9AT00", - "", "", "" - }, - { "Hitachi Travelstar E7K60", - "(Hitachi )?HTE7260[46]0M9AT00", - "", "", "" - }, - { "Hitachi Travelstar 7K100", - "(Hitachi )?HTS7210[168]0G9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar E7K100", - "(Hitachi )?HTE7210[168]0G9(AT|SA)00", - "", "", "" - }, - { "Hitachi Travelstar 7K200", - "(Hitachi )?HTS7220(80|10|12|16|20)K9(A3|SA)00", - "", "", "" - }, - { "IBM Deskstar 14GXP and 16GP series", - "IBM-DTTA-3(7101|7129|7144|5032|5043|5064|5084|5101|5129|5168)0", - "", "", "" - }, - { "IBM Deskstar 25GP and 22GXP family", - "IBM-DJNA-3(5(101|152|203|250)|7(091|135|180|220))0", - "", "", "" - }, - { "IBM Deskstar 37GP and 34GXP family", - "IBM-DPTA-3(5(375|300|225|150)|7(342|273|205|136))0", - "", "", "" - }, - { "IBM/Hitachi Deskstar 120GXP family", - "(IBM-)?IC35L((020|040|060|080|120)AVVA|0[24]0AVVN)07-[01]", - "", "", "" - }, - { "IBM/Hitachi Deskstar GXP-180 family", - "(IBM-)?IC35L(030|060|090|120|180)AVV207-[01]", - "", "", "" - }, - { "Hitachi Deskstar 7K80 series", - "(Hitachi )?HDS7280([48]0PLAT20|(40)?PLA320|80PLA380).*", - "", "", "" - }, - { "Hitachi Deskstar 7K160", - "(Hitachi )?HDS7216(80|16)PLA[3T]80.*", - "", "", "" - }, - { "Hitachi Deskstar 7K250 series", - "(Hitachi )?HDS7225((40|80|12|16)VLAT20|(12|16|25)VLAT80|(80|12|16|25)VLSA80)", - "", "", "" - }, - { "Hitachi Deskstar 7K250 (SUN branded)", - "HITACHI HDS7225SBSUN250G.*", - "", "", "" - }, - { "Hitachi Deskstar T7K250 series", - "(Hitachi )?HDT7225((25|20|16)DLA(T80|380))", - "", "", "" - }, - { "Hitachi Deskstar 7K400 series", - "(Hitachi )?HDS724040KL(AT|SA)80", - "", "", "" - }, - { "Hitachi Deskstar 7K500 series", - "(Hitachi )?HDS725050KLA(360|T80)", - "", "", "" - }, - { "Hitachi Deskstar P7K500 series", - "(Hitachi )?HDP7250(16|25|32|40|50)GLA(36|38|T8)0", - "", "", "" - }, - { "Hitachi Deskstar T7K500", - "(Hitachi )?HDT7250(25|32|40|50)VLA(360|380|T80)", - "", "", "" - }, - { "Hitachi Deskstar 7K1000", - "(Hitachi )?HDS7210(50|75|10)KLA330", - "", "", "" - }, - { "Hitachi Deskstar 7K1000.B", - "(Hitachi )?HDT7210((16|25)SLA380|(32|50|64|75|10)SLA360)", - "", "", "" - }, - { "Hitachi Deskstar 7K2000", - "Hitachi HDS722020ALA330", - "", "", "" - }, - { "Hitachi Ultrastar 7K1000", - "(Hitachi )?HUA7210(50|75|10)KLA330", - "", "", "" - }, - { "Toshiba 2.5\" HDD series (10-20 GB)", - "TOSHIBA MK(101[67]GAP|15[67]GAP|20(1[678]GAP|(18|23)GAS))", - "", "", "" - }, - { "Toshiba 2.5\" HDD series (30-60 GB)", - "TOSHIBA MK((6034|4032)GSX|(6034|4032)GAX|(6026|4026|4019|3019)GAXB?|(6025|6021|4025|4021|4018|3025|3021|3018)GAS|(4036|3029)GACE?|(4018|3017)GAP)", - "", "", "" - }, - { "Toshiba 2.5\" HDD series (80 GB and above)", - "TOSHIBA MK(80(25GAS|26GAX|32GAX|32GSX)|10(31GAS|32GAX)|12(33GAS|34G[AS]X)|2035GSS)", - "", "", "" - }, - { "Toshiba 2.5\" HDD MK..52GSX series", - "TOSHIBA MK(80|12|16|25|32)52GSX", - "", "", "" - }, - { "Toshiba 1.8\" HDD series", - "TOSHIBA MK[23468]00[4-9]GA[HL]", - "", "", "" - }, - { "", // TOSHIBA MK6022GAX - "TOSHIBA MK6022GAX", - "", "", "" - }, - { "", // TOSHIBA MK6409MAV - "TOSHIBA MK6409MAV", - "", "", "" - }, - { "Toshiba MKx019GAXB (SUN branded)", - "TOS MK[34]019GAXB SUN[34]0G", - "", "", "" - }, - { "Seagate Momentus family", - "ST9(20|28|40|48)11A", - "", "", "" - }, - { "Seagate Momentus 42 family", - "ST9(2014|3015|4019)A", - "", "", "" - }, - { "Seagate Momentus 4200.2 series", - "ST9(100822|808210|60821|50212|402113|30219)A", - "", "", "" - }, - { "Seagate Momentus 5400.2 series", - "ST9(808211|60822|408114|308110|120821|10082[34]|8823|6812|4813|3811)AS?", - "", "", "" - }, - { "Seagate Momentus 5400.3 series", - "ST9(4081[45]|6081[35]|8081[15]|100828|120822|160821)AS?", - "", "", "" - }, - { "Seagate Momentus 5400.3 ED series", - "ST9(4081[45]|6081[35]|8081[15]|100828|120822|160821)AB", - "", "", "" - }, - { "Seagate Momentus 5400.4 series", - "ST9(120817|(160|200|250)827)AS", - "", "", "" - }, - { "Seagate Momentus 5400.5 series", - "ST9((80|120|160)310|(250|320)320)AS", - "", "", "" - }, - { "Seagate Momentus 5400.6 series", - "ST9((12|25)0315AS|500325)ASG?", - "", "", "" - }, - { "Seagate Momentus 5400 PSD series", // Hybrid drives - "ST9(808212|(120|160)8220)AS", - "", "", "" - }, - { "Seagate Momentus 7200.1 series", - "ST9(10021|80825|6023|4015)AS?", - "", "", "" - }, - { "Seagate Momentus 7200.2 series", - "ST9(80813|100821|120823|160823|200420)ASG?", - "", "", "" - }, - { "Seagate Momentus 7200.3 series", - "ST9((80|120|160)411|(250|320)421)ASG?", - "", "", "" - }, - { "Seagate Momentus 7200.4 series", - "ST9(160412|250410|320423|500420)ASG?", - "", "", "" - }, - { "Seagate Momentus 7200 FDE.2 series", - "ST9((160413|25041[12]|320426|50042[12])AS|(16041[89]|2504[16]4|32042[67]|500426)ASG)", - "", "", "" - }, - { "Seagate Medalist 1010, 1721, 2120, 3230 and 4340", // ATA2, with -t permissive - "ST3(1010|1721|2120|3230|4340)A", - "", "", "" - }, - { "Seagate Medalist 2110, 3221, 4321, 6531, and 8641", - "ST3(2110|3221|4321|6531|8641)A", - "", "", "" - }, - { "Seagate U Series X family", - "ST3(10014A(CE)?|20014A)", - "", "", "" - }, - { "Seagate U8 family", - "ST3(4313|6811|8410|13021|17221)A", - "", "", "" - }, - { "Seagate U7 family", - "ST3(30012|40012|60012|80022|120020)A", - "", "", "" - }, - { "Seagate U Series 6 family", - "ST3(8002|6002|4081|3061|2041)0A", - "", "", "" - }, - { "Seagate U Series 5 family", - "ST3(40823|30621|20413|15311|10211)A", - "", "", "" - }, - { "Seagate U4 family", - "ST3(2112|4311|6421|8421)A", - "", "", "" - }, - { "Seagate U8 family", - "ST3(8410|4313|17221|13021)A", - "", "", "" - }, - { "Seagate U10 family", - "ST3(20423|15323|10212)A", - "", "", "" - }, - { "Seagate Barracuda ATA family", - "ST3(2804|2724|2043|1362|1022|681)0A", - "", "", "" - }, - { "Seagate Barracuda ATA II family", - "ST3(3063|2042|1532|1021)0A", - "", "", "" - }, - { "Seagate Barracuda ATA III family", - "ST3(40824|30620|20414|15310|10215)A", - "", "", "" - }, - { "Seagate Barracuda ATA IV family", - "ST3(20011|30011|40016|60021|80021)A", - "", "", "" - }, - { "Seagate Barracuda ATA V family", - "ST3(12002(3A|4A|9A|3AS)|800(23A|15A|23AS)|60(015A|210A)|40017A)", - "", "", "" - }, - { "Seagate Barracuda 5400.1", - "ST340015A", - "", "", "" - }, - { "Seagate Barracuda 7200.7 and 7200.7 Plus family", - "ST3(200021A|200822AS?|16002[13]AS?|12002[26]AS?|1[26]082[78]AS|8001[13]AS?|8081[79]AS|60014A|40111AS|40014AS?)", - "", "", "" - }, - { "Seagate Barracuda 7200.8 family", - "ST3(400[68]32|300[68]31|250[68]23|200826)AS?", - "", "", "" - }, - { "Seagate Barracuda 7200.9 family", - "ST3(402111?|80[28]110?|120[28]1[0134]|160[28]1[012]|200827|250[68]24|300[68]22|(320|400)[68]33|500[68](32|41))AS?.*", - "", "", "" - }, - { "Seagate Barracuda 7200.10 family", - "ST3((80|160)[28]15|200820|250[34]10|(250|300|320|400)[68]20|500[68]30|750[68]40)AS?", - "", "", "" - }, - { "Seagate Barracuda 7200.11 family", // unaffected firmware - "ST3(160813|320[68]13|500[368]20|640[36]23|640[35]30|750[36]30|1000(333|[36]40)|1500341)AS?", - "CC.?.?", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957 - "", "" - }, - { "Seagate Barracuda 7200.11 family", // fixed firmware - "ST3(500[368]20|750[36]30|1000340)AS?", - "SD1A", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951 - "", "" - }, - { "Seagate Barracuda 7200.11 family", // fixed firmware - "ST3(160813|320[68]13|640[36]23|1000333|1500341)AS?", - "SD[12]B", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957 - "", "" - }, - { "Seagate Barracuda 7200.11 family", // buggy firmware - "ST3(500[368]20|640[35]30|750[36]30|1000340)AS?", - "(AD14|SD1[5-9])", - "There are known problems with these drives,\n" - "AND THIS FIRMWARE VERSION IS AFFECTED,\n" - "see the following Seagate web pages:\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951", - "" - }, - { "Seagate Barracuda 7200.11 family", // unknown firmware - "ST3(160813|320[68]13|500[368]20|640[36]23|640[35]30|750[36]30|1000(333|[36]40)|1500341)AS?", - "", - "There are known problems with these drives,\n" - "see the following Seagate web pages:\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207951\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207957", - "" - }, - { "Seagate Barracuda 7200.12 family", - "ST3((160|250)318|(320|500)418|500410|(750|1000)528)AS", - "", "", "" - }, - { "Seagate Barracuda ES", - "ST3(250[68]2|32062|40062|50063|75064)0NS", - "", "", "" - }, - { "Seagate Barracuda ES.2", // fixed firmware - "ST3(25031|50032|75033|100034)0NS", - "SN[01]6", // http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207963 - "", "" - }, - { "Seagate Barracuda ES.2", // unknown firmware - "ST3(25031|50032|75033|100034)0NS", - "", - "There are known problems with these drives,\n" - "see the following Seagate web pages:\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207931\n" - "http://seagate.custkb.com/seagate/crm/selfservice/search.jsp?DocId=207963", - "" - }, - { "Seagate Medalist 17240, 13030, 10231, 8420, and 4310", - "ST3(17240|13030|10231|8420|4310)A", - "", "", "" - }, - { "Seagate Medalist 17242, 13032, 10232, 8422, and 4312", - "ST3(1724|1303|1023|842|431)2A", - "", "", "" - }, - { "Seagate NL35 family", - "ST3(250623|250823|400632|400832|250824|250624|400633|400833|500641|500841)NS", - "", "", "" - }, - { "Seagate SV35.2 Series", - "ST3(160815|250820|320620|500630|750640)(A|S)V", - "", "", "" - }, - { "Seagate DB35.3 Series", - "ST3(750640SCE|((80|160)215|(250|320|400)820|500830|750840)(A|S)CE)", - "", "", "" - }, - { "Western Digital Protege", - /* Western Digital drives with this comment all appear to use Attribute 9 in - * a non-standard manner. These entries may need to be updated when it - * is understood exactly how Attribute 9 should be interpreted. - * UPDATE: this is probably explained by the WD firmware bug described in the - * smartmontools FAQ */ - "WDC WD([2468]00E|1[26]00A)B-.*", - "", "", "" - }, - { "Western Digital Caviar family", - /* Western Digital drives with this comment all appear to use Attribute 9 in - * a non-standard manner. These entries may need to be updated when it - * is understood exactly how Attribute 9 should be interpreted. - * UPDATE: this is probably explained by the WD firmware bug described in the - * smartmontools FAQ */ - "WDC WD(2|3|4|6|8|10|12|16|18|20|25)00BB-.*", - "", "", "" - }, - { "Western Digital Caviar WDxxxAB series", - /* Western Digital drives with this comment all appear to use Attribute 9 in - * a non-standard manner. These entries may need to be updated when it - * is understood exactly how Attribute 9 should be interpreted. - * UPDATE: this is probably explained by the WD firmware bug described in the - * smartmontools FAQ */ - "WDC WD(3|4|6|8|25)00AB-.*", - "", "", "" - }, - { "Western Digital Caviar WDxxxAA series", - /* Western Digital drives with this comment all appear to use Attribute 9 in - * a non-standard manner. These entries may need to be updated when it - * is understood exactly how Attribute 9 should be interpreted. - * UPDATE: this is probably explained by the WD firmware bug described in the - * smartmontools FAQ */ - "WDC WD...?AA(-.*)?", - "", "", "" - }, - { "Western Digital Caviar WDxxxBA series", - /* Western Digital drives with this comment all appear to use Attribute 9 in - * a non-standard manner. These entries may need to be updated when it - * is understood exactly how Attribute 9 should be interpreted. - * UPDATE: this is probably explained by the WD firmware bug described in the - * smartmontools FAQ */ - "WDC WD...BA", - "", "", "" - }, - { "Western Digital Caviar AC series", // add only 5400rpm/7200rpm (ata33 and faster) - "WDC AC((116|121|125|225|132|232)|([1-4][4-9][0-9])|([1-4][0-9][0-9][0-9]))00[A-Z]?.*", - "", "", "" - }, - { "Western Digital Caviar SE family", - /* Western Digital drives with this comment all appear to use Attribute 9 in - * a non-standard manner. These entries may need to be updated when it - * is understood exactly how Attribute 9 should be interpreted. - * UPDATE: this is probably explained by the WD firmware bug described in the - * smartmontools FAQ - * UPDATE 2: this does not apply to more recent models, at least WD3200AAJB */ - "WDC WD(4|6|8|10|12|16|18|20|25|30|32|40|50)00(JB|PB)-.*", - "", "", "" - }, - { "Western Digital Caviar Blue EIDE family", // WD Caviar SE EIDE family - /* not completely accurate: at least also WD800JB, WD(4|8|20|25)00BB sold as Caviar Blue */ - "WDC WD(16|25|32|40|50)00AAJB-.*", - "", "", "" - }, - { "Western Digital Caviar Blue EIDE family", // WD Caviar SE16 EIDE family - "WDC WD(25|32|40|50)00AAKB-.*", - "", "", "" - }, - { "Western Digital RE EIDE family", - "WDC WD(12|16|25|32)00SB-.*", - "", "", "" - }, - { "Western Digital Caviar Serial ATA family", - "WDC WD(4|8|20|32)00BD-.*", - "", "", "" - }, - { "Western Digital Caviar SE Serial ATA family", - "WDC WD(4|8|12|16|20|25|32|40)00(JD|KD|PD)-.*", - "", "", "" - }, - { "Western Digital Caviar SE Serial ATA family", - "WDC WD(8|12|16|20|25|30|32|40|50)00JS-.*", - "", "", "" - }, - { "Western Digital Caviar SE16 Serial ATA family", - "WDC WD(16|20|25|32|40|50|75)00KS-.*", - "", "", "" - }, - { "Western Digital Caviar Blue Serial ATA family", // WD Caviar SE Serial ATA family - /* not completely accurate: at least also WD800BD, (4|8)00JD sold as Caviar Blue */ - "WDC WD((8|12|16|25|32)00AABS|(12|16|25|32|40|50)00AAJS)-.*", - "", "", "" - }, - { "Western Digital Caviar Blue Serial ATA family", // WD Caviar SE16 Serial ATA family - "WDC WD(16|20|25|32|40|50|64|75)00AAKS-.*", - "", "", "" - }, - { "Western Digital RE Serial ATA family", - "WDC WD(12|16|25|32)00(SD|YD|YS)-.*", - "", "", "" - }, - { "Western Digital RE2 Serial ATA family", - "WDC WD((40|50|75)00(YR|YS|AYYS)|(16|32|40|50)0[01]ABYS)-.*", - "", "", "" - }, - { "Western Digital RE2-GP family", - "WDC WD(5000AB|7500AY|1000FY)PS-.*", - "", "", "" - }, - { "Western Digital RE3 Serial ATA family", - "WDC WD((25|32|50)02A|(75|10)02F)BYS-.*", - "", "", "" - }, - { "Western Digital Caviar Green family", - "WDC WD((50|64|75)00AA(C|V)S|(50|75)00AADS|10EA(C|V)S|(10|15|20)EADS)-.*", - "", "", "" - }, - { "Western Digital Caviar Black family", - "WDC WD((500|640|750)1AA|1001FA)LS-.*", - "", "", "" - }, - { "Western Digital AV ATA family", - "WDC WD(8|16|50)00AV(B|J)B-.*", - "", "", "" - }, - { "Western Digital AV-GP family", - "WDC WD((16|25|32|50|64|75)00AVVS|(50|75)00AVCS|10EVVS|(10|20)EVCS|WD(10|15|20)EVDS)-.*", - "", "", "" - }, - { "Western Digital Raptor family", - "WDC WD((360|740|800)GD|(360|740|1500)ADF[DS])-.*", - "", "", "" - }, - { "Western Digital Raptor X", - "WDC WD1500AHFD-.*", - "", "", "" - }, - { "Western Digital VelociRaptor family", - "WDC WD((1500|3000)B|3000G)LFS-.*", - "", "", "" - }, - { "Western Digital Scorpio EIDE family", - "WDC WD(4|6|8|10|12|16)00(UE|VE)-.*", - "", "", "" - }, - { "Western Digital Scorpio Blue EIDE family", - "WDC WD(4|6|8|10|12|16|25)00BEVE-.*", - "", "", "" - }, - { "Western Digital Scorpio Serial ATA family", - "WDC WD(4|6|8|10|12|16|25)00BEAS-.*", - "", "", "" - }, - { "Western Digital Scorpio Blue Serial ATA family", - "WDC WD((4|6|8|10|12|16|25)00BEVS|(8|12|16|25|32|40|50)00BEVT)-.*", - "", "", "" - }, - { "Western Digital Scorpio Black Serial ATA family", - "WDC WD(8|12|16|25|32)00B[EJ]KT-.*", - "", "", "" - }, - { "Western Digital My Passport Essential hard drive (USB interface)", - "WDC WD3200BMVU-.*", - "", "", "" - }, - { "Western Digital My Passport hard drive (USB interface)", - "WDC WD3200BMVV-.*", - "", "", "" - }, - { "Quantum Bigfoot series", - "QUANTUM BIGFOOT TS10.0A", - "", "", "" - }, - { "Quantum Fireball lct15 series", - "QUANTUM FIREBALLlct15 ([123]0|22)", - "", "", "" - }, - { "Quantum Fireball lct20 series", - "QUANTUM FIREBALLlct20 [234]0", - "", "", "" - }, - { "Quantum Fireball CX series", - "QUANTUM FIREBALL CX10.2A", - "", "", "" - }, - { "Quantum Fireball CR series", - "QUANTUM FIREBALL CR(4.3|6.4|8.4|13.0)A", - "", "", "" - }, - { "Quantum Fireball EX series", - "QUANTUM FIREBALL EX(3.2|6.4)A", - "", "", "" - }, - { "Quantum Fireball ST series", - "QUANTUM FIREBALL ST(3.2|4.3|4300)A", - "", "", "" - }, - { "Quantum Fireball SE series", - "QUANTUM FIREBALL SE4.3A", - "", "", "" - }, - { "Quantum Fireball Plus LM series", - "QUANTUM FIREBALLP LM(10.2|15|20.[45]|30)", - "", "", "" - }, - { "Quantum Fireball Plus AS series", - "QUANTUM FIREBALLP AS(10.2|20.5|30.0|40.0)", - "", "", "" - }, - { "Quantum Fireball Plus KX series", - "QUANTUM FIREBALLP KX27.3", - "", "", "" - }, - { "Quantum Fireball Plus KA series", - "QUANTUM FIREBALLP KA(9|10).1", - "", "", "" - }, -// END drivedb.h (DO NOT DELETE - used by Makefile) +// Builtin table of known drives. +// Used as a default if not read from +// "/usr/{,/local}share/smartmontools/drivedb.h" +// or any other file specified by '-B' option, +// see read_default_drive_databases() below. +// The drive_settings structure is described in drivedb.h. +const drive_settings builtin_knowndrives[] = { +#include "drivedb.h" }; @@ -1989,7 +674,11 @@ static bool parse_drive_database(parse_ptr src, drive_database & db, const char // Read drive database from file. bool read_drive_database(const char * path) { - stdio_file f(path, "r"); + stdio_file f(path, "r" +#ifdef __CYGWIN__ // Allow files with '\r\n'. + "t" +#endif + ); if (!f) { pout("%s: cannot open drive database file\n", path); return false; diff --git a/knowndrives.h b/knowndrives.h index 9b3c611..ccdbcaf 100644 --- a/knowndrives.h +++ b/knowndrives.h @@ -4,8 +4,8 @@ * Home page of code is: http://smartmontools.sourceforge.net * Address of support mailing list: smartmontools-support@lists.sourceforge.net * - * Copyright (C) 2003-8 Philip Williams, Bruce Allen - * Copyright (C) 2008 Christian Franke + * Copyright (C) 2003-9 Philip Williams, Bruce Allen + * Copyright (C) 2008-9 Christian Franke * * 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 @@ -21,27 +21,9 @@ #ifndef KNOWNDRIVES_H_ #define KNOWNDRIVES_H_ -#define KNOWNDRIVES_H_CVSID "$Id: knowndrives.h 2975 2009-10-29 22:52:38Z chrfranke $\n" +#define KNOWNDRIVES_H_CVSID "$Id: knowndrives.h 2998 2009-12-11 22:51:04Z chrfranke $\n" -/* Structure used to store settings for specific drives in knowndrives[]. The - * elements are used in the following ways: - * - * modelfamily Informal string about the model family/series of a - * device. Set to "" if no info (apart from device id) - * known. - * modelregexp POSIX regular expression to match the model of a device. - * This should never be "". - * firmwareregexp POSIX regular expression to match a devices's firmware - * version. This is optional and should be "" if it is not - * to be used. If it is nonempty then it will be used to - * narrow the set of devices matched by modelregexp. - * warningmsg A message that may be displayed for matching drives. For - * example, to inform the user that they may need to apply a - * firmware patch. - * presets String with vendor-specific attribute ('-v') and firmware - * bug fix ('-F') options. Same syntax as in smartctl command - * line. The user's own settings override these. - */ +// Structure to store drive database entries, see drivedb.h for a description. struct drive_settings { const char * modelfamily; const char * modelregexp; diff --git a/missing b/missing deleted file mode 100755 index 28055d2..0000000 --- a/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -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 $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/os_freebsd.cpp b/os_freebsd.cpp index 0627af5..df58b92 100644 --- a/os_freebsd.cpp +++ b/os_freebsd.cpp @@ -3,7 +3,7 @@ * * Home page of code is: http://smartmontools.sourceforge.net * - * Copyright (C) 2003-8 Eduard Martinescu + * Copyright (C) 2003-10 Eduard Martinescu * * 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 @@ -71,9 +71,9 @@ #define PATHINQ_SETTINGS_SIZE 128 #endif -static __unused const char *filenameandversion="$Id: os_freebsd.cpp 3046 2010-01-22 21:30:02Z chrfranke $"; +static __unused const char *filenameandversion="$Id: os_freebsd.cpp 3037 2010-01-16 20:07:13Z chrfranke $"; -const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp 3046 2010-01-22 21:30:02Z chrfranke $" \ +const char *os_XXXX_c_cvsid="$Id: os_freebsd.cpp 3037 2010-01-16 20:07:13Z chrfranke $" \ ATACMDS_H_CVSID CCISS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_FREEBSD_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID; extern smartmonctrl * con; @@ -121,7 +121,7 @@ void printwarning(int msgNo, const char* extra) { // global variable holding byte count of allocated memory long long bytes; -const char * dev_freebsd_cpp_cvsid = "$Id: os_freebsd.cpp 3046 2010-01-22 21:30:02Z chrfranke $" +const char * dev_freebsd_cpp_cvsid = "$Id: os_freebsd.cpp 3037 2010-01-16 20:07:13Z chrfranke $" DEV_INTERFACE_H_CVSID; extern smartmonctrl * con; // con->reportscsiioctl @@ -231,17 +231,17 @@ bool freebsd_smart_device::close() } ///////////////////////////////////////////////////////////////////////////// -/// Implement standard ATA support with old functions +/// Implement standard ATA support class freebsd_ata_device -: public /*implements*/ ata_device_with_command_set, +: public /*implements*/ ata_device, public /*extends*/ freebsd_smart_device { public: freebsd_ata_device(smart_interface * intf, const char * dev_name, const char * req_type); + virtual bool ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out); protected: - virtual int ata_command_interface(smart_command_set command, int select, char * data); virtual int do_cmd(struct ata_ioc_request* request); }; @@ -257,6 +257,90 @@ int freebsd_ata_device::do_cmd( struct ata_ioc_request* request) return ioctl(fd, IOCATAREQUEST, request); } + + +bool freebsd_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) +{ + if (!ata_cmd_is_ok(in, true, true, true)) // data_out_support + return false; + + struct ata_ioc_request request; + bzero(&request,sizeof(struct ata_ioc_request)); + + request.timeout=SCSI_TIMEOUT_DEFAULT; + request.u.ata.command=in.in_regs.command; + request.u.ata.feature=in.in_regs.features; + + request.u.ata.count = in.in_regs.sector_count_16; + request.u.ata.lba = in.in_regs.lba_48; + + switch (in.direction) { + case ata_cmd_in::no_data: + request.flags=ATA_CMD_CONTROL; + break; + case ata_cmd_in::data_in: + request.flags=ATA_CMD_READ; + request.data=(char *)in.buffer; + request.count=in.size; + break; + case ata_cmd_in::data_out: + request.flags=ATA_CMD_WRITE; + request.data=(char *)in.buffer; + request.count=in.size; + break; + default: + return set_err(ENOSYS); + } + + clear_err(); + errno = 0; + if (do_cmd(&request)) + return set_err(errno); + if (request.error) + return set_err(EIO, "request failed, error code 0x%02x", request.error); + + out.out_regs.error = request.error; + out.out_regs.sector_count_16 = request.u.ata.count; + out.out_regs.lba_48 = request.u.ata.lba; + + + // Command specific processing + if (in.in_regs.command == ATA_SMART_CMD + && in.in_regs.features == ATA_SMART_STATUS + && in.out_needed.lba_high) + { + unsigned const char normal_lo=0x4f, normal_hi=0xc2; + unsigned const char failed_lo=0xf4, failed_hi=0x2c; + +#if (FREEBSDVER < 502000) + printwarning(NO_RETURN,NULL); +#endif + + // Cyl low and Cyl high unchanged means "Good SMART status" + if (!(out.out_regs.lba_mid==normal_lo && out.out_regs.lba_high==normal_hi) + // These values mean "Bad SMART status" + && !(out.out_regs.lba_mid==failed_lo && out.out_regs.lba_high==failed_hi)) + + { + // We haven't gotten output that makes sense; print out some debugging info + char buf[512]; + sprintf(buf,"CMD=0x%02x\nFR =0x%02x\nNS =0x%02x\nSC =0x%02x\nCL =0x%02x\nCH =0x%02x\nRETURN =0x%04x\n", + (int)request.u.ata.command, + (int)request.u.ata.feature, + (int)request.u.ata.count, + (int)((request.u.ata.lba) & 0xff), + (int)((request.u.ata.lba>>8) & 0xff), + (int)((request.u.ata.lba>>16) & 0xff), + (int)request.error); + printwarning(BAD_SMART,buf); + out.out_regs.lba_high = failed_hi; + out.out_regs.lba_mid = failed_lo; + } + } + + return true; +} + #if FREEBSDVER > 800100 class freebsd_atacam_device : public freebsd_ata_device { @@ -341,168 +425,6 @@ int freebsd_atacam_device::do_cmd( struct ata_ioc_request* request) #endif -int freebsd_ata_device::ata_command_interface(smart_command_set command, int select, char * data) -{ - int retval, copydata=0; - struct ata_ioc_request request; - unsigned char buff[512]; - - bzero(buff,512); - bzero(&request,sizeof(struct ata_ioc_request)); - bzero(buff,512); - - request.u.ata.command=ATA_SMART_CMD; - request.timeout=SCSI_TIMEOUT_DEFAULT; - switch (command){ - case READ_VALUES: - request.u.ata.feature=ATA_SMART_READ_VALUES; - request.u.ata.lba=0xc24f<<8; - request.flags=ATA_CMD_READ; - request.data=(char *)buff; - request.count=512; - copydata=1; - break; - case READ_THRESHOLDS: - request.u.ata.feature=ATA_SMART_READ_THRESHOLDS; - request.u.ata.count=1; - request.u.ata.lba=1|(0xc24f<<8); - request.flags=ATA_CMD_READ; - request.data=(char *)buff; - request.count=512; - copydata=1; - break; - case READ_LOG: - request.u.ata.feature=ATA_SMART_READ_LOG_SECTOR; - request.u.ata.lba=select|(0xc24f<<8); - request.u.ata.count=1; - request.flags=ATA_CMD_READ; - request.data=(char *)buff; - request.count=512; - copydata=1; - break; - case IDENTIFY: - request.u.ata.command=ATA_IDENTIFY_DEVICE; - request.flags=ATA_CMD_READ; - request.data=(char *)buff; - request.count=512; - copydata=1; - break; - case PIDENTIFY: - request.u.ata.command=ATA_IDENTIFY_PACKET_DEVICE; - request.flags=ATA_CMD_READ; - request.data=(char *)buff; - request.count=512; - copydata=1; - break; - case ENABLE: - request.u.ata.feature=ATA_SMART_ENABLE; - request.u.ata.lba=0xc24f<<8; - request.flags=ATA_CMD_CONTROL; - break; - case DISABLE: - request.u.ata.feature=ATA_SMART_DISABLE; - request.u.ata.lba=0xc24f<<8; - request.flags=ATA_CMD_CONTROL; - break; - case AUTO_OFFLINE: - // NOTE: According to ATAPI 4 and UP, this command is obsolete - request.u.ata.feature=ATA_SMART_AUTO_OFFLINE; - request.u.ata.lba=0xc24f<<8; - request.u.ata.count=select; - request.flags=ATA_CMD_CONTROL; - break; - case AUTOSAVE: - request.u.ata.feature=ATA_SMART_AUTOSAVE; - request.u.ata.lba=0xc24f<<8; - request.u.ata.count=select; - request.flags=ATA_CMD_CONTROL; - break; - case IMMEDIATE_OFFLINE: - request.u.ata.feature=ATA_SMART_IMMEDIATE_OFFLINE; - request.u.ata.lba = select|(0xc24f<<8); // put test in sector - request.flags=ATA_CMD_CONTROL; - break; - case STATUS_CHECK: // same command, no HDIO in FreeBSD - case STATUS: - // this command only says if SMART is working. It could be - // replaced with STATUS_CHECK below. - request.u.ata.feature=ATA_SMART_STATUS; - request.u.ata.lba=0xc24f<<8; - request.flags=ATA_CMD_CONTROL; - break; - case CHECK_POWER_MODE: - request.u.ata.command=ATA_CHECK_POWER_MODE; - request.u.ata.feature=0; - request.flags=ATA_CMD_CONTROL; - break; - case WRITE_LOG: - memcpy(buff, data, 512); - request.u.ata.feature=ATA_SMART_WRITE_LOG_SECTOR; - request.u.ata.lba=select|(0xc24f<<8); - request.u.ata.count=1; - request.flags=ATA_CMD_WRITE; - request.data=(char *)buff; - request.count=512; - break; - default: - pout("Unrecognized command %d in ata_command_interface()\n" - "Please contact " PACKAGE_BUGREPORT "\n", command); - errno=ENOSYS; - return -1; - } - - if (command==STATUS_CHECK){ - unsigned const char normal_lo=0x4f, normal_hi=0xc2; - unsigned const char failed_lo=0xf4, failed_hi=0x2c; - unsigned char low,high; - - if ((retval=do_cmd(&request)) || request.error) - return -1; - -#if (FREEBSDVER < 502000) - printwarning(NO_RETURN,NULL); -#endif - - high = (request.u.ata.lba >> 16) & 0xff; - low = (request.u.ata.lba >> 8) & 0xff; - - // Cyl low and Cyl high unchanged means "Good SMART status" - if (low==normal_lo && high==normal_hi) - return 0; - - // These values mean "Bad SMART status" - if (low==failed_lo && high==failed_hi) - return 1; - - // We haven't gotten output that makes sense; print out some debugging info - char buf[512]; - sprintf(buf,"CMD=0x%02x\nFR =0x%02x\nNS =0x%02x\nSC =0x%02x\nCL =0x%02x\nCH =0x%02x\nRETURN =0x%04x\n", - (int)request.u.ata.command, - (int)request.u.ata.feature, - (int)request.u.ata.count, - (int)((request.u.ata.lba) & 0xff), - (int)((request.u.ata.lba>>8) & 0xff), - (int)((request.u.ata.lba>>16) & 0xff), - (int)request.error); - printwarning(BAD_SMART,buf); - return 0; - } - - if ((retval=do_cmd(&request)) || request.error) - { - return -1; - } - // - if (command == CHECK_POWER_MODE) { - data[0] = request.u.ata.count & 0xff; - return 0; - } - if (copydata) - memcpy(data, buff, 512); - - return 0; -} - ///////////////////////////////////////////////////////////////////////////// /// Implement AMCC/3ware RAID support with old functions @@ -780,7 +702,7 @@ int freebsd_escalade_device::ata_command_interface(smart_command_set command, in *data=*(char *)&(ata->sector_count); // look for nonexistent devices/ports - if (command==IDENTIFY && !nonempty((unsigned char *)data, 512)) { + if (command==IDENTIFY && !nonempty(data, 512)) { errno=ENODEV; return -1; } diff --git a/os_linux.cpp b/os_linux.cpp index cf6a728..20f66b9 100644 --- a/os_linux.cpp +++ b/os_linux.cpp @@ -3,12 +3,12 @@ * * Home page of code is: http://smartmontools.sourceforge.net * - * Copyright (C) 2003-8 Bruce Allen - * Copyright (C) 2003-8 Doug Gilbert - * Copyright (C) 2008 Hank Wu - * Copyright (C) 2008 Oliver Bock - * Copyright (C) 2008-9 Christian Franke - * Copyright (C) 2008 Jordan Hargrave + * Copyright (C) 2003-10 Bruce Allen + * Copyright (C) 2003-10 Doug Gilbert + * Copyright (C) 2008 Hank Wu + * Copyright (C) 2008 Oliver Bock + * Copyright (C) 2008-10 Christian Franke + * Copyright (C) 2008 Jordan Hargrave * * Parts of this file are derived from code that was * @@ -90,7 +90,7 @@ #define ARGUSED(x) ((void)(x)) -const char *os_XXXX_c_cvsid="$Id: os_linux.cpp 3053 2010-01-28 20:05:33Z chrfranke $" \ +const char *os_XXXX_c_cvsid="$Id: os_linux.cpp 3052 2010-01-28 19:51:24Z chrfranke $" \ ATACMDS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_LINUX_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID; /* for passing global control variables */ @@ -1629,7 +1629,7 @@ bool linux_escalade_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out // look for nonexistent devices/ports if ( in.in_regs.command == ATA_IDENTIFY_DEVICE - && !nonempty((unsigned char *)in.buffer, in.size)) { + && !nonempty(in.buffer, in.size)) { return set_err(ENODEV, "No drive on port %d", m_disknum); } diff --git a/os_os2.cpp b/os_os2.cpp new file mode 100644 index 0000000..a174170 --- /dev/null +++ b/os_os2.cpp @@ -0,0 +1,555 @@ +/* + * os_os2.c + * + * Home page of code is: http://smartmontools.sourceforge.net + * + * Copyright (C) 2004-8 Yuri Dario + * + * 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. + * + * You should have received a copy of the GNU General Public License + * (for example COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * + * Thanks to Daniela Engert for providing sample code for SMART ioctl access. + * + */ + +// These are needed to define prototypes for the functions defined below +#include +#include "atacmds.h" +#include "scsicmds.h" +#include "utility.h" + +// This is to include whatever prototypes you define in os_generic.h +#include "os_os2.h" + +// Needed by '-V' option (CVS versioning) of smartd/smartctl +const char *os_XXXX_c_cvsid="$Id: os_os2.cpp,v 1.9 2008/06/12 21:46:31 ballen4705 Exp $" \ +ATACMDS_H_CVSID OS_XXXX_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID; + +// global handle to device driver +static HFILE hDevice; + +// Please eliminate the following block: both the two #includes and +// the 'unsupported()' function. They are only here to warn +// unsuspecting users that their Operating System is not supported! If +// you wish, you can use a similar warning mechanism for any of the +// functions in this file that you can not (or choose not to) +// implement. + +#include "config.h" + +typedef struct _IDEREGS { + UCHAR bFeaturesReg; + UCHAR bSectorCountReg; + UCHAR bSectorNumberReg; + UCHAR bCylLowReg; + UCHAR bCylHighReg; + UCHAR bDriveHeadReg; + UCHAR bCommandReg; + UCHAR bReserved; +} IDEREGS, *PIDEREGS, *LPIDEREGS; + +static void unsupported(int which){ + static int warninggiven[4]; + + if (which<0 || which>3) + return; + + if (!warninggiven[which]) { + char msg; + debugmode=1; + warninggiven[which]=1; + + switch (which) { + case 0: + msg="generate a list of devices"; + break; + case 1: + msg="interface to Marvell-based SATA controllers"; + break; + case 2: + msg="interface to 3ware-based RAID controllers"; + break; + case 3: + msg="interface to SCSI devices"; + break; + } + pout("Under OS/2, smartmontools can not %s\n"); + } + return; +} + +// print examples for smartctl. You should modify this function so +// that the device paths are sensible for your OS, and to eliminate +// unsupported commands (eg, 3ware controllers). +void print_smartctl_examples(){ + printf("=================================================== SMARTCTL EXAMPLES =====\n\n"); +#ifdef HAVE_GETOPT_LONG + printf( + " smartctl -a /dev/hda (Prints all SMART information)\n\n" + " smartctl --smart=on --offlineauto=on --saveauto=on /dev/hda\n" + " (Enables SMART on first disk)\n\n" + " smartctl -t long /dev/hda (Executes extended disk self-test)\n\n" + " smartctl --attributes --log=selftest --quietmode=errorsonly /dev/hda\n" + " (Prints Self-Test & Attribute errors)\n" + " smartctl -a --device=3ware,2 /dev/sda\n" + " (Prints all SMART info for 3rd ATA disk on 3ware RAID controller)\n" + ); +#else + printf( + " smartctl -a /dev/hda (Prints all SMART information)\n" + " smartctl -s on -o on -S on /dev/hda (Enables SMART on first disk)\n" + " smartctl -t long /dev/hda (Executes extended disk self-test)\n" + " smartctl -A -l selftest -q errorsonly /dev/hda\n" + " (Prints Self-Test & Attribute errors)\n" + " smartctl -a -d 3ware,2 /dev/sda\n" + " (Prints all SMART info for 3rd ATA disk on 3ware RAID controller)\n" + ); +#endif + return; +} + +static const char * skipdev(const char * s) +{ + return (!strncmp(s, "/dev/", 5) ? s + 5 : s); +} + +// tries to guess device type given the name (a path). See utility.h +// for return values. +int guess_device_type (const char* dev_name) { + + //printf( "dev_name %s\n", dev_name); + dev_name = skipdev(dev_name); + if (!strncmp(dev_name, "hd", 2)) + return CONTROLLER_ATA; + if (!strncmp(dev_name, "scsi", 4)) + return CONTROLLER_SCSI; + return CONTROLLER_UNKNOWN; +} + +// makes a list of ATA or SCSI devices for the DEVICESCAN directive of +// smartd. Returns number N of devices, or -1 if out of +// memory. Allocates N+1 arrays: one of N pointers (devlist); the +// other N arrays each contain null-terminated character strings. In +// the case N==0, no arrays are allocated because the array of 0 +// pointers has zero length, equivalent to calling malloc(0). +int make_device_names (char*** devlist, const char* name) { + unsupported(0); + return 0; +} + +// Like open(). Return non-negative integer handle, only used by the +// functions below. type=="ATA" or "SCSI". If you need to store +// extra information about your devices, create a private internal +// array within this file (see os_freebsd.cpp for an example). If you +// can not open the device (permission denied, does not exist, etc) +// set errno as open() does and return <0. +int deviceopen(const char *pathname, char *type){ + + int fd; + APIRET rc; + ULONG ActionTaken; + + //printf( "deviceopen pathname %s\n", pathname); + rc = DosOpen ("\\DEV\\IBMS506$", &hDevice, &ActionTaken, 0, FILE_SYSTEM, + OPEN_ACTION_OPEN_IF_EXISTS, OPEN_SHARE_DENYNONE | + OPEN_FLAGS_NOINHERIT | OPEN_ACCESS_READONLY, NULL); + if (rc) { + char errmsg[256]; + snprintf(errmsg,256,"Smartctl open driver IBMS506$ failed (%d)", rc); + errmsg[255]='\0'; + syserror(errmsg); + return -1; + } + + pathname = skipdev(pathname); + fd = tolower(pathname[2]) - 'a'; + + return fd; +} + +// Like close(). Acts only on integer handles returned by +// deviceopen() above. +int deviceclose(int fd){ + + DosClose( hDevice); + hDevice = NULL; + + return 0; +} + +static void print_ide_regs(const IDEREGS * r, int out) +{ + pout("%s=0x%02x,%s=0x%02x, SC=0x%02x, NS=0x%02x, CL=0x%02x, CH=0x%02x, SEL=0x%02x\n", + (out?"STS":"CMD"), r->bCommandReg, (out?"ERR":" FR"), r->bFeaturesReg, + r->bSectorCountReg, r->bSectorNumberReg, r->bCylLowReg, r->bCylHighReg, r->bDriveHeadReg); +} + +// +// OS/2 direct ioctl interface to IBMS506$ +// +int dani_ioctl( int device, int request, void* arg) +{ + unsigned char* buff = (unsigned char*) arg; + APIRET rc; + DSKSP_CommandParameters Parms; + ULONG PLen = 1; + ULONG DLen = 512; //sizeof (*buf); + UCHAR temp; + ULONG value = 0; + IDEREGS regs; + + //printf( "device %d, request 0x%x, arg[0] 0x%x, arg[2] 0x%x\n", device, request, buff[0], buff[2]); + + Parms.byPhysicalUnit = device; + switch( buff[0]) { + case WIN_IDENTIFY: + rc = DosDevIOCtl (hDevice, DSKSP_CAT_GENERIC, DSKSP_GET_INQUIRY_DATA, + (PVOID)&Parms, PLen, &PLen, (PVOID)arg+4, DLen, &DLen); + if (rc != 0) + { + printf ("DANIS506 ATA GET HD Failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + case WIN_SMART: + switch( buff[2]) { + case SMART_STATUS: + DLen = sizeof(value); + // OS/2 already checks CL/CH in IBM1S506 code!! see s506rte.c (ddk) + // value: -1=not supported, 0=ok, 1=failing + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_GETSTATUS, + (PVOID)&Parms, PLen, &PLen, (PVOID)&value, DLen, &DLen); + if (rc) + { + printf ("DANIS506 ATA GET SMART_STATUS failed (%d,0x%x)\n", rc, rc); + return -1; + } + buff[4] = (unsigned char)value; + break; + case SMART_READ_VALUES: + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_GET_ATTRIBUTES, + (PVOID)&Parms, PLen, &PLen, (PVOID)arg+4, DLen, &DLen); + if (rc) + { + printf ("DANIS506 ATA GET DSKSP_SMART_GET_ATTRIBUTES failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + case SMART_READ_THRESHOLDS: + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_GET_THRESHOLDS, + (PVOID)&Parms, PLen, &PLen, (PVOID)arg+4, DLen, &DLen); + if (rc) + { + printf ("DANIS506 ATA GET DSKSP_SMART_GET_THRESHOLDS failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + case SMART_READ_LOG_SECTOR: + buff[4] = buff[1]; // copy select field + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_READ_LOG, + (PVOID)&Parms, PLen, &PLen, (PVOID)arg+4, DLen, &DLen); + if (rc) + { + printf ("DANIS506 ATA GET DSKSP_SMART_READ_LOG failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + case SMART_ENABLE: + buff[0] = 1; // enable + DLen = 1; + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_ONOFF, + (PVOID)&Parms, PLen, &PLen, (PVOID)buff, DLen, &DLen); + if (rc) { + printf ("DANIS506 ATA GET DSKSP_SMART_ONOFF failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + case SMART_DISABLE: + buff[0] = 0; // disable + DLen = 1; + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_ONOFF, + (PVOID)&Parms, PLen, &PLen, (PVOID)buff, DLen, &DLen); + if (rc) { + printf ("DANIS506 ATA GET DSKSP_SMART_ONOFF failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; +#if 0 + case SMART_AUTO_OFFLINE: + buff[0] = buff[3]; // select field + DLen = 1; + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_AUTO_OFFLINE, + (PVOID)&Parms, PLen, &PLen, (PVOID)buff, DLen, &DLen); + if (rc) { + printf ("DANIS506 ATA GET DSKSP_SMART_ONOFF failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; +#endif + case SMART_AUTOSAVE: + buff[0] = buff[3]; // select field + DLen = 1; + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_AUTOSAVE_ONOFF, + (PVOID)&Parms, PLen, &PLen, (PVOID)buff, DLen, &DLen); + if (rc) { + printf ("DANIS506 ATA DSKSP_SMART_AUTOSAVE_ONOFF failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + case SMART_IMMEDIATE_OFFLINE: + buff[0] = buff[1]; // select field + DLen = 1; + rc = DosDevIOCtl (hDevice, DSKSP_CAT_SMART, DSKSP_SMART_EOLI, + (PVOID)&Parms, PLen, &PLen, (PVOID)buff, DLen, &DLen); + if (rc) { + printf ("DANIS506 ATA GET DSKSP_SMART_EXEC_OFFLINE failed (%d,0x%x)\n", rc, rc); + return -1; + } + break; + + default: + fprintf( stderr, "device %d, request 0x%x, arg[0] 0x%x, arg[2] 0x%x\n", device, request, buff[0], buff[2]); + fprintf( stderr, "unknown ioctl\n"); + return -1; + break; + } + break; + //case WIN_PIDENTIFY: + // break; + default: + fprintf( stderr, "unknown ioctl\n"); + return -1; + break; + } + + // ok + return 0; +} + +// Interface to ATA devices. See os_linux.cpp for the cannonical example. +// DETAILED DESCRIPTION OF ARGUMENTS +// device: is the integer handle provided by deviceopen() +// command: defines the different operations, see atacmds.h +// select: additional input data IF NEEDED (which log, which type of +// self-test). +// data: location to write output data, IF NEEDED (1 or 512 bytes). +// Note: not all commands use all arguments. +// RETURN VALUES (for all commands BUT command==STATUS_CHECK) +// -1 if the command failed +// 0 if the command succeeded, +// RETURN VALUES if command==STATUS_CHECK +// -1 if the command failed OR the disk SMART status can't be determined +// 0 if the command succeeded and disk SMART status is "OK" +// 1 if the command succeeded and disk SMART status is "FAILING" + +// huge value of buffer size needed because HDIO_DRIVE_CMD assumes +// that buff[3] is the data size. Since the ATA_SMART_AUTOSAVE and +// ATA_SMART_AUTO_OFFLINE use values of 0xf1 and 0xf8 we need the space. +// Otherwise a 4+512 byte buffer would be enough. +#define STRANGE_BUFFER_LENGTH (4+512*0xf8) + +int ata_command_interface(int device, smart_command_set command, int select, char *data){ + unsigned char buff[STRANGE_BUFFER_LENGTH]; + // positive: bytes to write to caller. negative: bytes to READ from + // caller. zero: non-data command + int copydata=0; + + const int HDIO_DRIVE_CMD_OFFSET = 4; + + // See struct hd_drive_cmd_hdr in hdreg.h. Before calling ioctl() + // buff[0]: ATA COMMAND CODE REGISTER + // buff[1]: ATA SECTOR NUMBER REGISTER == LBA LOW REGISTER + // buff[2]: ATA FEATURES REGISTER + // buff[3]: ATA SECTOR COUNT REGISTER + + // Note that on return: + // buff[2] contains the ATA SECTOR COUNT REGISTER + + // clear out buff. Large enough for HDIO_DRIVE_CMD (4+512 bytes) + memset(buff, 0, STRANGE_BUFFER_LENGTH); + + //printf( "command, select %d,%d\n", command, select); + buff[0]=ATA_SMART_CMD; + switch (command){ + case CHECK_POWER_MODE: + buff[0]=ATA_CHECK_POWER_MODE; + copydata=1; + break; + case READ_VALUES: + buff[2]=ATA_SMART_READ_VALUES; + buff[3]=1; + copydata=512; + break; + case READ_THRESHOLDS: + buff[2]=ATA_SMART_READ_THRESHOLDS; + buff[1]=buff[3]=1; + copydata=512; + break; + case READ_LOG: + buff[2]=ATA_SMART_READ_LOG_SECTOR; + buff[1]=select; + buff[3]=1; + copydata=512; + break; + case WRITE_LOG: + break; + case IDENTIFY: + buff[0]=ATA_IDENTIFY_DEVICE; + buff[3]=1; + copydata=512; + break; + case PIDENTIFY: + buff[0]=ATA_IDENTIFY_PACKET_DEVICE; + buff[3]=1; + copydata=512; + break; + case ENABLE: + buff[2]=ATA_SMART_ENABLE; + buff[1]=1; + break; + case DISABLE: + buff[2]=ATA_SMART_DISABLE; + buff[1]=1; + break; + case STATUS: + case STATUS_CHECK: + // this command only says if SMART is working. It could be + // replaced with STATUS_CHECK below. + buff[2]=ATA_SMART_STATUS; + buff[4]=0; + break; + case AUTO_OFFLINE: + buff[2]=ATA_SMART_AUTO_OFFLINE; + buff[3]=select; // YET NOTE - THIS IS A NON-DATA COMMAND!! + break; + case AUTOSAVE: + buff[2]=ATA_SMART_AUTOSAVE; + buff[3]=select; // YET NOTE - THIS IS A NON-DATA COMMAND!! + break; + case IMMEDIATE_OFFLINE: + buff[2]=ATA_SMART_IMMEDIATE_OFFLINE; + buff[1]=select; + break; + //case STATUS_CHECK: + // // This command uses HDIO_DRIVE_TASK and has different syntax than + // // the other commands. + // buff[1]=ATA_SMART_STATUS; + // break; + default: + pout("Unrecognized command %d in linux_ata_command_interface()\n" + "Please contact " PACKAGE_BUGREPORT "\n", command); + errno=ENOSYS; + return -1; + } + +#if 0 + // This command uses the HDIO_DRIVE_TASKFILE ioctl(). This is the + // only ioctl() that can be used to WRITE data to the disk. + if (command==WRITE_LOG) { + unsigned char task[sizeof(ide_task_request_t)+512]; + ide_task_request_t *reqtask=(ide_task_request_t *) task; + task_struct_t *taskfile=(task_struct_t *) reqtask->io_ports; + int retval; + + memset(task, 0, sizeof(task)); + + taskfile->data = 0; + taskfile->feature = ATA_SMART_WRITE_LOG_SECTOR; + taskfile->sector_count = 1; + taskfile->sector_number = select; + taskfile->low_cylinder = 0x4f; + taskfile->high_cylinder = 0xc2; + taskfile->device_head = 0; + taskfile->command = ATA_SMART_CMD; + + reqtask->data_phase = TASKFILE_OUT; + reqtask->req_cmd = IDE_DRIVE_TASK_OUT; + reqtask->out_size = 512; + reqtask->in_size = 0; + + // copy user data into the task request structure + memcpy(task+sizeof(ide_task_request_t), data, 512); + + if ((retval=dani_ioctl(device, HDIO_DRIVE_TASKFILE, task))) { + if (retval==-EINVAL) + pout("Kernel lacks HDIO_DRIVE_TASKFILE support; compile kernel with CONFIG_IDE_TASKFILE_IO set\n"); + return -1; + } + return 0; + } +#endif // 0 + + // We are now doing the HDIO_DRIVE_CMD type ioctl. + if ((dani_ioctl(device, HDIO_DRIVE_CMD, buff))) + return -1; + + // There are two different types of ioctls(). The HDIO_DRIVE_TASK + // one is this: + if (command==STATUS_CHECK){ + int retval; + + // Cyl low and Cyl high unchanged means "Good SMART status" + if (buff[4]==0) + return 0; + + // These values mean "Bad SMART status" + if (buff[4]==1) + return 1; + + // We haven't gotten output that makes sense; print out some debugging info + syserror("Error SMART Status command failed"); + pout("Please get assistance from " PACKAGE_HOMEPAGE "\n"); + return -1; + } + + // CHECK POWER MODE command returns information in the Sector Count + // register (buff[3]). Copy to return data buffer. + if (command==CHECK_POWER_MODE) + buff[HDIO_DRIVE_CMD_OFFSET]=buff[2]; + + // if the command returns data then copy it back + if (copydata) + memcpy(data, buff+HDIO_DRIVE_CMD_OFFSET, copydata); + + return 0; +} + +int marvell_command_interface(int fd, smart_command_set command, int select, char *data){ + unsupported(1); + return -1; +} + +int highpoint_command_interface(int fd, smart_command_set command, int select, char *data) +{ + unsupported(1); + return -1; +} + +// Interface to ATA devices behind 3ware escalade RAID controller +// cards. Same description as ata_command_interface() above except +// that 0 <= disknum <= 15 specifies the ATA disk attached to the +// controller. +int escalade_command_interface(int fd, int disknum, int escalade_type, smart_command_set command, int select, char *data){ + unsupported(2); + return -1; +} + +int areca_command_interface(int fd, int disknum, smart_command_set command, int select, char *data){ + unsupported(2); + return -1; +} + +// Interface to SCSI devices. See os_linux.c +int do_scsi_cmnd_io(int fd, struct scsi_cmnd_io * iop, int report) { + unsupported(3); + return -ENOSYS; +} diff --git a/os_os2.h b/os_os2.h new file mode 100644 index 0000000..57d3ad3 --- /dev/null +++ b/os_os2.h @@ -0,0 +1,70 @@ +/* + * os_os2.c + * + * Home page of code is: http://smartmontools.sourceforge.net + * + * Copyright (C) 2004-8 Yuri Dario + * + * 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. + * + * You should have received a copy of the GNU General Public License + * (for example COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef OS_OS2_H_ +#define OS_OS2_H_ + +#define OS_XXXX_H_CVSID "$Id: os_os2.h,v 1.5 2008/03/04 22:09:47 ballen4705 Exp $\n" + +// Additional material should start here. Note: to keep the '-V' CVS +// reporting option working as intended, you should only #include +// system include files . Local #include files +// <"something.h"> should be #included in os_generic.c + +#define INCL_DOS +#include + +#include "os_os2\hdreg.h" +#include "os_linux.h" + +#pragma pack(1) + +#define DSKSP_CAT_SMART 0x80 /* SMART IOCTL category */ +#define DSKSP_SMART_ONOFF 0x20 /* turn SMART on or off */ +#define DSKSP_SMART_AUTOSAVE_ONOFF 0x21 /* turn SMART autosave on or off */ +#define DSKSP_SMART_SAVE 0x22 /* force save of SMART data */ +#define DSKSP_SMART_GETSTATUS 0x23 /* get SMART status (pass/fail) */ +#define DSKSP_SMART_GET_ATTRIBUTES 0x24 /* get SMART attributes table */ +#define DSKSP_SMART_GET_THRESHOLDS 0x25 /* get SMART thresholds table */ +#define DSKSP_SMART_READ_LOG 0x26 +#define DSKSP_SMART_WRITE_LOG 0x27 +#define DSKSP_SMART_READ_LOG_EXT 0x28 +#define DSKSP_SMART_WRITE_LOG_EXT 0x29 +#define DSKSP_SMART_EOLI 0x30 /* EXECUTE OFF-LINE IMMEDIATE */ + +#define SMART_CMD_ON 1 /* on value for related SMART functions */ +#define SMART_CMD_OFF 0 /* off value for related SMART functions */ + +#define DSKSP_CAT_GENERIC 0x90 /* generic IOCTL category */ +#define DSKSP_GET_INQUIRY_DATA 0x42 /* get ATA/ATAPI inquiry data */ + +typedef struct _DSKSP_CommandParameters { + BYTE byPhysicalUnit; /* physical unit number 0-n */ + /* 0 = 1st disk, 1 = 2nd disk, ...*/ + /* 0x80 = Pri/Mas, 0x81=Pri/Sla, 0x82=Sec/Mas,*/ +} DSKSP_CommandParameters, *PDSKSP_CommandParameters; + +struct SMART_ParamExt { + UCHAR byPhysicalUnit; // 0=Pri/Mas, 1=Pri/Sla, 2=Sec/Mas, etc. + ULONG LogAddress; // valid values 0-255. See ATA/ATPI standard + // for details + ULONG SectorCount; // valid values 0-255 See ATA/ATPI standard + // for details + ULONG reserved; // reserved. must be set to 0 +}; + +#endif /* OS_GENERIC_H_ */ diff --git a/os_os2/configure.os2 b/os_os2/configure.os2 new file mode 100644 index 0000000..121b22c --- /dev/null +++ b/os_os2/configure.os2 @@ -0,0 +1,9 @@ +#! /bin/sh +CFLAGS="-s -Zomf -O3 -march=pentium -mcpu=pentium3" \ +CXXFLAGS="-s -Zomf -O3 -march=pentium -mcpu=pentium3" \ +LDFLAGS="-s -Zmap -Zhigh-mem -Zomf -Zexe -Zstack 0x100" \ +LIBS=" -lsyslog -lsocket" \ +LN_CP_F="cp.exe" \ +RANLIB="echo" \ +AR="emxomfar" \ +./configure --prefix=/usr/local/smartmontools diff --git a/os_os2/hdreg.h b/os_os2/hdreg.h new file mode 100644 index 0000000..65c4ed1 --- /dev/null +++ b/os_os2/hdreg.h @@ -0,0 +1,333 @@ +#ifndef _LINUX_HDREG_H +#define _LINUX_HDREG_H + +/* + * This file contains some defines for the AT-hd-controller. + * Various sources. + */ + +#define HD_IRQ 14 /* the standard disk interrupt */ + +/* ide.c has its own port definitions in "ide.h" */ + +/* Hd controller regs. Ref: IBM AT Bios-listing */ +#define HD_DATA 0x1f0 /* _CTL when writing */ +#define HD_ERROR 0x1f1 /* see err-bits */ +#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */ +#define HD_SECTOR 0x1f3 /* starting sector */ +#define HD_LCYL 0x1f4 /* starting cylinder */ +#define HD_HCYL 0x1f5 /* high byte of starting cyl */ +#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */ +#define HD_STATUS 0x1f7 /* see status-bits */ +#define HD_FEATURE HD_ERROR /* same io address, read=error, write=feature */ +#define HD_PRECOMP HD_FEATURE /* obsolete use of this port - predates IDE */ +#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */ + +#define HD_CMD 0x3f6 /* used for resets */ +#define HD_ALTSTATUS 0x3f6 /* same as HD_STATUS but doesn't clear irq */ + +/* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */ + +/* Bits of HD_STATUS */ +#define ERR_STAT 0x01 +#define INDEX_STAT 0x02 +#define ECC_STAT 0x04 /* Corrected error */ +#define DRQ_STAT 0x08 +#define SEEK_STAT 0x10 +#define WRERR_STAT 0x20 +#define READY_STAT 0x40 +#define BUSY_STAT 0x80 + +/* Values for HD_COMMAND */ +#define WIN_RESTORE 0x10 +#define WIN_READ 0x20 +#define WIN_WRITE 0x30 +#define WIN_WRITE_VERIFY 0x3C +#define WIN_VERIFY 0x40 +#define WIN_FORMAT 0x50 +#define WIN_INIT 0x60 +#define WIN_SEEK 0x70 +#define WIN_DIAGNOSE 0x90 +#define WIN_SPECIFY 0x91 /* set drive geometry translation */ +#define WIN_IDLEIMMEDIATE 0xE1 /* force drive to become "ready" */ +#define WIN_SETIDLE1 0xE3 +#define WIN_SETIDLE2 0x97 + +#define WIN_STANDBYNOW1 0xE0 +#define WIN_STANDBYNOW2 0x94 +#define WIN_SLEEPNOW1 0xE6 +#define WIN_SLEEPNOW2 0x99 +#define WIN_CHECKPOWERMODE1 0xE5 +#define WIN_CHECKPOWERMODE2 0x98 + +#define WIN_DOORLOCK 0xDE /* lock door on removable drives */ +#define WIN_DOORUNLOCK 0xDF /* unlock door on removable drives */ + +#define WIN_MULTREAD 0xC4 /* read sectors using multiple mode */ +#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */ +#define WIN_SETMULT 0xC6 /* enable/disable multiple mode */ +#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */ +#define WIN_IDENTIFY_DMA 0xEE /* same as WIN_IDENTIFY, but DMA */ +#define WIN_SETFEATURES 0xEF /* set special drive features */ +#define WIN_READDMA 0xC8 /* read sectors using DMA transfers */ +#define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */ + +#define WIN_QUEUED_SERVICE 0xA2 /* */ +#define WIN_READDMA_QUEUED 0xC7 /* read sectors using Queued DMA transfers */ +#define WIN_WRITEDMA_QUEUED 0xCC /* write sectors using Queued DMA transfers */ + +#define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */ +#define WIN_WRITE_BUFFER 0xE8 /* force write only 1 sector */ + +#define WIN_SMART 0xB0 /* self-monitoring and reporting */ + +/* Additional drive command codes used by ATAPI devices. */ +#define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */ +#define WIN_SRST 0x08 /* ATAPI soft reset command */ +#define WIN_PACKETCMD 0xA0 /* Send a packet command. */ + +#define DISABLE_SEAGATE 0xFB +#define EXABYTE_ENABLE_NEST 0xF0 + +/* WIN_SMART sub-commands */ + +#define SMART_READ_VALUES 0xd0 +#define SMART_READ_THRESHOLDS 0xd1 +#define SMART_AUTOSAVE 0xd2 +#define SMART_SAVE 0xd3 +#define SMART_IMMEDIATE_OFFLINE 0xd4 +#define SMART_READ_LOG_SECTOR 0xd5 +#define SMART_WRITE_LOG_SECTOR 0xd6 +#define SMART_ENABLE 0xd8 +#define SMART_DISABLE 0xd9 +#define SMART_STATUS 0xda +#define SMART_AUTO_OFFLINE 0xdb + +/* WIN_SETFEATURES sub-commands */ + +#define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */ +#define SETFEATURES_XFER 0x03 /* Set transfer mode */ +# define XFER_UDMA_7 0x47 /* 0100|0111 */ +# define XFER_UDMA_6 0x46 /* 0100|0110 */ +# define XFER_UDMA_5 0x45 /* 0100|0101 */ +# define XFER_UDMA_4 0x44 /* 0100|0100 */ +# define XFER_UDMA_3 0x43 /* 0100|0011 */ +# define XFER_UDMA_2 0x42 /* 0100|0010 */ +# define XFER_UDMA_1 0x41 /* 0100|0001 */ +# define XFER_UDMA_0 0x40 /* 0100|0000 */ +# define XFER_MW_DMA_2 0x22 /* 0010|0010 */ +# define XFER_MW_DMA_1 0x21 /* 0010|0001 */ +# define XFER_MW_DMA_0 0x20 /* 0010|0000 */ +# define XFER_SW_DMA_2 0x12 /* 0001|0010 */ +# define XFER_SW_DMA_1 0x11 /* 0001|0001 */ +# define XFER_SW_DMA_0 0x10 /* 0001|0000 */ +# define XFER_PIO_4 0x0C /* 0000|1100 */ +# define XFER_PIO_3 0x0B /* 0000|1011 */ +# define XFER_PIO_2 0x0A /* 0000|1010 */ +# define XFER_PIO_1 0x09 /* 0000|1001 */ +# define XFER_PIO_0 0x08 /* 0000|1000 */ +# define XFER_PIO_SLOW 0x00 /* 0000|0000 */ +#define SETFEATURES_DIS_DEFECT 0x04 /* Disable Defect Management */ +#define SETFEATURES_EN_APM 0x05 /* Enable advanced power management */ +#define SETFEATURES_DIS_MSN 0x31 /* Disable Media Status Notification */ +#define SETFEATURES_DIS_RLA 0x55 /* Disable read look-ahead feature */ +#define SETFEATURES_EN_RI 0x5D /* Enable release interrupt */ +#define SETFEATURES_EN_SI 0x5E /* Enable SERVICE interrupt */ +#define SETFEATURES_DIS_RPOD 0x66 /* Disable reverting to power on defaults */ +#define SETFEATURES_DIS_WCACHE 0x82 /* Disable write cache */ +#define SETFEATURES_EN_DEFECT 0x84 /* Enable Defect Management */ +#define SETFEATURES_DIS_APM 0x85 /* Disable advanced power management */ +#define SETFEATURES_EN_MSN 0x95 /* Enable Media Status Notification */ +#define SETFEATURES_EN_RLA 0xAA /* Enable read look-ahead feature */ +#define SETFEATURES_PREFETCH 0xAB /* Sets drive prefetch value */ +#define SETFEATURES_EN_RPOD 0xCC /* Enable reverting to power on defaults */ +#define SETFEATURES_DIS_RI 0xDD /* Disable release interrupt */ +#define SETFEATURES_DIS_SI 0xDE /* Disable SERVICE interrupt */ + +/* WIN_SECURITY sub-commands */ + +#define SECURITY_SET_PASSWORD 0xBA /* 0xF1 */ +#define SECURITY_UNLOCK 0xBB /* 0xF2 */ +#define SECURITY_ERASE_PREPARE 0xBC /* 0xF3 */ +#define SECURITY_ERASE_UNIT 0xBD /* 0xF4 */ +#define SECURITY_FREEZE_LOCK 0xBE /* 0xF5 */ +#define SECURITY_DISABLE_PASSWORD 0xBF /* 0xF6 */ + +/* Bits for HD_ERROR */ +#define MARK_ERR 0x01 /* Bad address mark */ +#define TRK0_ERR 0x02 /* couldn't find track 0 */ +#define ABRT_ERR 0x04 /* Command aborted */ +#define MCR_ERR 0x08 /* media change request */ +#define ID_ERR 0x10 /* ID field not found */ +#define ECC_ERR 0x40 /* Uncorrectable ECC error */ +#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */ +#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */ + +struct hd_geometry { + unsigned char heads; + unsigned char sectors; + unsigned short cylinders; + unsigned long start; +}; + +/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */ +#define HDIO_GETGEO 0x0301 /* get device geometry */ +#define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ +#define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ +#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */ +#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ +#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ +#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ +#define HDIO_GET_DMA 0x030b /* get use-dma flag */ +#define HDIO_GET_NICE 0x030c /* get nice flags */ +#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ + +#define HDIO_DRIVE_RESET 0x031c /* execute a device reset */ +#define HDIO_TRISTATE_HWIF 0x031d /* execute a channel tristate */ +#ifndef __EMX__ +#define HDIO_DRIVE_TASK 0x031e /* execute task and special drive command */ +#endif +#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ + +#define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK + +/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */ +#define HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */ +#define HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */ +#define HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */ +#define HDIO_SET_32BIT 0x0324 /* change io_32bit flags */ +#define HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */ +#define HDIO_SET_DMA 0x0326 /* change use-dma flag */ +#define HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ +#define HDIO_SCAN_HWIF 0x0328 /* register and (re)scan interface */ +#define HDIO_SET_NICE 0x0329 /* set nice flags */ +#define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */ + +/* BIG GEOMETRY */ +struct hd_big_geometry { + unsigned char heads; + unsigned char sectors; + unsigned int cylinders; + unsigned long start; +}; + +/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */ +#define HDIO_GETGEO_BIG 0x0330 /* */ +#define HDIO_GETGEO_BIG_RAW 0x0331 /* */ + +#define __NEW_HD_DRIVE_ID +/* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */ +struct hd_driveid { + unsigned short config; /* lots of obsolete bit flags */ + unsigned short cyls; /* "physical" cyls */ + unsigned short reserved2; /* reserved (word 2) */ + unsigned short heads; /* "physical" heads */ + unsigned short track_bytes; /* unformatted bytes per track */ + unsigned short sector_bytes; /* unformatted bytes per sector */ + unsigned short sectors; /* "physical" sectors per track */ + unsigned short vendor0; /* vendor unique */ + unsigned short vendor1; /* vendor unique */ + unsigned short vendor2; /* vendor unique */ + unsigned char serial_no[20]; /* 0 = not_specified */ + unsigned short buf_type; + unsigned short buf_size; /* 512 byte increments; 0 = not_specified */ + unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ + unsigned char fw_rev[8]; /* 0 = not_specified */ + unsigned char model[40]; /* 0 = not_specified */ + unsigned char max_multsect; /* 0=not_implemented */ + unsigned char vendor3; /* vendor unique */ + unsigned short dword_io; /* 0=not_implemented; 1=implemented */ + unsigned char vendor4; /* vendor unique */ + unsigned char capability; /* bits 0:DMA 1:LBA 2:IORDYsw 3:IORDYsup*/ + unsigned short reserved50; /* reserved (word 50) */ + unsigned char vendor5; /* vendor unique */ + unsigned char tPIO; /* 0=slow, 1=medium, 2=fast */ + unsigned char vendor6; /* vendor unique */ + unsigned char tDMA; /* 0=slow, 1=medium, 2=fast */ + unsigned short field_valid; /* bits 0:cur_ok 1:eide_ok */ + unsigned short cur_cyls; /* logical cylinders */ + unsigned short cur_heads; /* logical heads */ + unsigned short cur_sectors; /* logical sectors per track */ + unsigned short cur_capacity0; /* logical total sectors on drive */ + unsigned short cur_capacity1; /* (2 words, misaligned int) */ + unsigned char multsect; /* current multiple sector count */ + unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ + unsigned int lba_capacity; /* total number of sectors */ + unsigned short dma_1word; /* single-word dma info */ + unsigned short dma_mword; /* multiple-word dma info */ + unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ + unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ + unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */ + unsigned short eide_pio; /* min cycle time (ns), no IORDY */ + unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ + unsigned short words69_70[2]; /* reserved words 69-70 */ + /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ + unsigned short words71_74[4]; /* reserved words 71-74 */ + unsigned short queue_depth; /* */ + unsigned short words76_79[4]; /* reserved words 76-79 */ + unsigned short major_rev_num; /* */ + unsigned short minor_rev_num; /* */ + unsigned short command_set_1; /* bits 0:Smart 1:Security 2:Removable 3:PM */ + unsigned short command_set_2; /* bits 14:Smart Enabled 13:0 zero */ + unsigned short cfsse; /* command set-feature supported extensions */ + unsigned short cfs_enable_1; /* command set-feature enabled */ + unsigned short cfs_enable_2; /* command set-feature enabled */ + unsigned short csf_default; /* command set-feature default */ + unsigned short dma_ultra; /* */ + unsigned short word89; /* reserved (word 89) */ + unsigned short word90; /* reserved (word 90) */ + unsigned short CurAPMvalues; /* current APM values */ + unsigned short word92; /* reserved (word 92) */ + unsigned short hw_config; /* hardware config */ + unsigned short words94_125[32];/* reserved words 94-125 */ + unsigned short last_lun; /* reserved (word 126) */ + unsigned short word127; /* reserved (word 127) */ + unsigned short dlf; /* device lock function + * 15:9 reserved + * 8 security level 1:max 0:high + * 7:6 reserved + * 5 enhanced erase + * 4 expire + * 3 frozen + * 2 locked + * 1 en/disabled + * 0 capability + */ + unsigned short csfo; /* current set features options + * 15:4 reserved + * 3 auto reassign + * 2 reverting + * 1 read-look-ahead + * 0 write cache + */ + unsigned short words130_155[26];/* reserved vendor words 130-155 */ + unsigned short word156; + unsigned short words157_159[3];/* reserved vendor words 157-159 */ + unsigned short words160_255[95];/* reserved words 160-255 */ +}; + +/* + * IDE "nice" flags. These are used on a per drive basis to determine + * when to be nice and give more bandwidth to the other devices which + * share the same IDE bus. + */ +#define IDE_NICE_DSC_OVERLAP (0) /* per the DSC overlap protocol */ +#define IDE_NICE_ATAPI_OVERLAP (1) /* not supported yet */ +#define IDE_NICE_0 (2) /* when sure that it won't affect us */ +#define IDE_NICE_1 (3) /* when probably won't affect us much */ +#define IDE_NICE_2 (4) /* when we know it's on our expense */ + +#ifdef __KERNEL__ +/* + * These routines are used for kernel command line parameters from main.c: + */ +#include + +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +int ide_register(int io_port, int ctl_port, int irq); +void ide_unregister(unsigned int); +#endif /* CONFIG_BLK_DEV_IDE || CONFIG_BLK_DEV_IDE_MODULE */ + +#endif /* __KERNEL__ */ + +#endif /* _LINUX_HDREG_H */ diff --git a/os_qnxnto.cpp b/os_qnxnto.cpp new file mode 100644 index 0000000..7f4526d --- /dev/null +++ b/os_qnxnto.cpp @@ -0,0 +1,643 @@ + + +// This is needed for the various HAVE_* macros and PROJECT_* macros. +#include "config.h" + +// These are needed to define prototypes and structures for the +// functions defined below +#include "int64.h" +#include "atacmds.h" +#include "scsicmds.h" +#include "utility.h" + +// This is to include whatever structures and prototypes you define in +// os_generic.h +#include "os_qnxnto.h" + +// Needed by '-V' option (CVS versioning) of smartd/smartctl. You +// should have one *_H_CVSID macro appearing below for each file +// appearing with #include "*.h" above. Please list these (below) in +// alphabetic/dictionary order. +const char *os_XXXX_c_cvsid="$Id: os_qnxnto.cpp,v 1.3 2008/06/12 21:46:31 ballen4705 Exp $" \ +ATACMDS_H_CVSID CONFIG_H_CVSID INT64_H_CVSID OS_QNXNTO_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID; + + +// This is here to prevent compiler warnings for unused arguments of +// functions. +#define ARGUSED(x) ((void)(x)) + +// Please eliminate the following block: both the #include and +// the 'unsupported()' function. They are only here to warn +// unsuspecting users that their Operating System is not supported! If +// you wish, you can use a similar warning mechanism for any of the +// functions in this file that you can not (or choose not to) +// implement. + + +#ifdef HAVE_UNAME +#include +#endif +//---------------------------------------------------------------------------------------------- +// private Functions +static int ata_sense_data(void *sdata,int *error,int *key,int *asc,int *ascq); +static int ata_interpret_sense(struct cam_pass_thru *cpt,void *sense,int *status,int rcount); +static int ata_pass_thru(int fd,struct cam_pass_thru *pcpt); +//---------------------------------------------------------------------------------------------- +static void unsupported(){ + static int warninggiven; + + if (!warninggiven) { + char *osname; + extern unsigned char debugmode; + unsigned char savedebugmode=debugmode; + +#ifdef HAVE_UNAME + struct utsname ostype; + uname(&ostype); + osname=ostype.sysname; +#else + osname="host's"; +#endif + + debugmode=1; + pout("\n" + "############################################################################\n" + "WARNING: smartmontools has not been ported to the %s Operating System.\n" + "Please see the files os_generic.cpp and os_generic.h for porting instructions.\n" + "############################################################################\n\n", + osname); + debugmode=savedebugmode; + warninggiven=1; + } + + return; +} +// End of the 'unsupported()' block that you should eliminate. + + +// print examples for smartctl. You should modify this function so +// that the device paths are sensible for your OS, and to eliminate +// unsupported commands (eg, 3ware controllers). +void print_smartctl_examples(){ + printf("=================================================== SMARTCTL EXAMPLES =====\n\n"); +#ifdef HAVE_GETOPT_LONG + printf( + " smartctl -a /dev/hd0 (Prints all SMART information)\n\n" + " smartctl --smart=on --offlineauto=on --saveauto=on /dev/hd0\n" + " (Enables SMART on first disk)\n\n" + " smartctl -t long /dev/hd0 (Executes extended disk self-test)\n\n" + " smartctl --attributes --log=selftest --quietmode=errorsonly /dev/hd0\n" + " (Prints Self-Test & Attribute errors)\n" + " smartctl -a --device=3ware,2 /dev/sda\n" + " (Prints all SMART info for 3rd ATA disk on 3ware RAID controller)\n" + ); +#else + printf( + " smartctl -a /dev/hd0 (Prints all SMART information)\n" + " smartctl -s on -o on -S on /dev/hd0 (Enables SMART on first disk)\n" + " smartctl -t long /dev/hd0 (Executes extended disk self-test)\n" + " smartctl -A -l selftest -q errorsonly /dev/hd0\n" + " (Prints Self-Test & Attribute errors)\n" + " smartctl -a -d 3ware,2 /dev/sda\n" + " (Prints all SMART info for 3rd ATA disk on 3ware RAID controller)\n" + ); +#endif + return; +} + +// tries to guess device type given the name (a path). See utility.h +// for return values. +static const char *net_dev_prefix = "/dev/"; +static const char *net_dev_ata_disk = "hd"; + +int guess_device_type (const char* dev_name) +{ +int len,dev_prefix_len; + dev_prefix_len=strlen(net_dev_prefix); + if(!dev_name||!(len=strlen(dev_name))) + return(CONTROLLER_UNKNOWN); + if (!strncmp(net_dev_prefix,dev_name,dev_prefix_len)) + { + if(len<=dev_prefix_len) + return(CONTROLLER_UNKNOWN); + else + dev_name += dev_prefix_len; + } + if(!strncmp(net_dev_ata_disk,dev_name,strlen(net_dev_ata_disk))) + return(CONTROLLER_ATA); + return(CONTROLLER_UNKNOWN); +} + +// makes a list of ATA or SCSI devices for the DEVICESCAN directive of +// smartd. Returns number N of devices, or -1 if out of +// memory. Allocates N+1 arrays: one of N pointers (devlist); the +// other N arrays each contain null-terminated character strings. In +// the case N==0, no arrays are allocated because the array of 0 +// pointers has zero length, equivalent to calling malloc(0). +int make_device_names (char*** devlist, const char* name) { + ARGUSED(devlist); + ARGUSED(name); + unsupported(); + return 0; +} + +// Like open(). Return non-negative integer handle, only used by the +// functions below. type=="ATA" or "SCSI". If you need to store +// extra information about your devices, create a private internal +// array within this file (see os_freebsd.cpp for an example). If you +// can not open the device (permission denied, does not exist, etc) +// set errno as open() does and return <0. +int deviceopen(const char *pathname, char *type) +{ + if(!strcmp(type, "ATA")) + return(open(pathname,O_RDWR|O_NONBLOCK)); + else + return(-1); +} + +// Like close(). Acts only on integer handles returned by +// deviceopen() above. +int deviceclose(int fd) +{ + return(close(fd)); +} +//---------------------------------------------------------------------------------------------- +// Interface to ATA devices. See os_linux.cpp for the cannonical example. +// DETAILED DESCRIPTION OF ARGUMENTS +// device: is the integer handle provided by deviceopen() +// command: defines the different operations, see atacmds.h +// select: additional input data IF NEEDED (which log, which type of +// self-test). +// data: location to write output data, IF NEEDED (1 or 512 bytes). +// Note: not all commands use all arguments. +// RETURN VALUES (for all commands BUT command==STATUS_CHECK) +// -1 if the command failed +// 0 if the command succeeded, +// RETURN VALUES if command==STATUS_CHECK +// -1 if the command failed OR the disk SMART status can't be determined +// 0 if the command succeeded and disk SMART status is "OK" +// 1 if the command succeeded and disk SMART status is "FAILING" +int ata_command_interface(int fd,smart_command_set command,int select,char *data) +{ +struct cam_pass_thru cpt; +ATA_SENSE sense; +CDB *cdb; +int status,rc; + memset(&cpt,0x00,sizeof(struct cam_pass_thru)); + cdb=(CDB *)cpt.cam_cdb; + rc=-1; + switch(command) + { + case READ_VALUES: + cpt.cam_flags = CAM_DIR_IN; + cpt.cam_cdb_len = 16; + cpt.cam_dxfer_len = 512; + cpt.cam_data_ptr = (uint32_t)data; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_PIO_DATA_IN; + cdb->ata_pass_thru.flags = ATA_FLG_T_DIR|ATA_FLG_TLEN_STPSIU; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_READ_VALUES; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case READ_THRESHOLDS: + cpt.cam_flags = CAM_DIR_IN; + cpt.cam_cdb_len = 16; + cpt.cam_dxfer_len = 512; + cpt.cam_data_ptr = (uint32_t)data; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_PIO_DATA_IN; + cdb->ata_pass_thru.flags = ATA_FLG_T_DIR|ATA_FLG_TLEN_STPSIU; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_READ_THRESHOLDS; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case READ_LOG: + cpt.cam_flags = CAM_DIR_IN; + cpt.cam_cdb_len = 16; + cpt.cam_dxfer_len = 512; + cpt.cam_data_ptr = (uint32_t)data; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_PIO_DATA_IN; + cdb->ata_pass_thru.flags = ATA_FLG_T_DIR|ATA_FLG_TLEN_STPSIU; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_READ_LOG_SECTOR; + cdb->ata_pass_thru.sector_count= 1; + cdb->ata_pass_thru.lba_low = select; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case WRITE_LOG: + return(-1); + break; + case IDENTIFY: + cpt.cam_flags = CAM_DIR_IN; + cpt.cam_cdb_len = 16; + cpt.cam_dxfer_len = 512; + cpt.cam_data_ptr = (uint32_t)data; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_PIO_DATA_IN; + cdb->ata_pass_thru.flags = ATA_FLG_T_DIR|ATA_FLG_TLEN_STPSIU; + cdb->ata_pass_thru.command = ATA_IDENTIFY_DEVICE; + break; + case PIDENTIFY: + cpt.cam_flags = CAM_DIR_IN; + cpt.cam_cdb_len = 16; + cpt.cam_dxfer_len = 512; + cpt.cam_data_ptr = (uint32_t)data; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_PIO_DATA_IN; + cdb->ata_pass_thru.flags = ATA_FLG_T_DIR|ATA_FLG_TLEN_STPSIU; + cdb->ata_pass_thru.command = ATA_IDENTIFY_PACKET_DEVICE; + break; + case ENABLE: + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_ENABLE; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case DISABLE: + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_DISABLE; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case AUTO_OFFLINE: + // NOTE: According to ATAPI 4 and UP, this command is obsolete + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_AUTO_OFFLINE; + cdb->ata_pass_thru.lba_low = select; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case AUTOSAVE: + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_AUTOSAVE; + cdb->ata_pass_thru.sector_count= select; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case IMMEDIATE_OFFLINE: + // NOTE: According to ATAPI 4 and UP, this command is obsolete + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_IMMEDIATE_OFFLINE; + cdb->ata_pass_thru.lba_low = select; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case STATUS_CHECK: + // same command, no HDIO in NetBSD + case STATUS: + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.flags = ATA_FLG_CK_COND; + cdb->ata_pass_thru.command = ATA_SMART_CMD; + cdb->ata_pass_thru.features = ATA_SMART_STATUS; + cdb->ata_pass_thru.lba_mid = ATA_SMART_LBA_MID_SIG; + cdb->ata_pass_thru.lba_high = ATA_SMART_LBA_HI_SIG; + break; + case CHECK_POWER_MODE: + cpt.cam_flags = CAM_DIR_NONE; + cpt.cam_cdb_len = 16; + cpt.cam_sense_len = sizeof(sense); + cpt.cam_sense_ptr = (uint32_t)&sense; + cdb->ata_pass_thru.opcode = SC_ATA_PT16; + cdb->ata_pass_thru.protocol = ATA_PROTO_DATA_NONE; + cdb->ata_pass_thru.flags = ATA_FLG_CK_COND; + cdb->ata_pass_thru.command = ATA_CHECK_POWER_MODE; + break; + default: + pout("Unrecognized command %d in ata_command_interface()\n", command); + errno=ENOSYS; + return(-1); + } +// execute now + if((status=ata_pass_thru(fd,&cpt))==EOK) + { + rc=status==EOK?0:-1; + if(cpt.cam_status!=CAM_REQ_CMP) + { + ata_interpret_sense(&cpt,&sense,&status,0); + if(command==STATUS||command==STATUS_CHECK) + rc=((sense.desc.lba_high<<8)|sense.desc.lba_mid)==ATA_SMART_SIG?0:1; + } + } + if(command==CHECK_POWER_MODE) + data[0]=cdb->ata_pass_thru.sector_count; +// finish + return(rc); +} +//---------------------------------------------------------------------------------------------- +int marvell_command_interface(int fd, smart_command_set command, int select, char *data) +{ + ARGUSED(fd); + ARGUSED(command); + ARGUSED(select); + ARGUSED(data); + unsupported(); + return -1; +} +//---------------------------------------------------------------------------------------------- +int highpoint_command_interface(int fd, smart_command_set command, int select, char *data) +{ + ARGUSED(fd); + ARGUSED(command); + ARGUSED(select); + ARGUSED(data); + unsupported(); + return -1; +} +//---------------------------------------------------------------------------------------------- +// Interface to ATA devices behind 3ware escalade/apache RAID +// controller cards. Same description as ata_command_interface() +// above except that 0 <= disknum <= 15 specifies the ATA disk +// attached to the controller, and controller_type specifies the +// precise type of 3ware controller. See os_linux.c +int escalade_command_interface(int fd,int disknum,int controller_type,smart_command_set command,int select,char *data) +{ + ARGUSED(fd); + ARGUSED(disknum); + ARGUSED(controller_type); + ARGUSED(command); + ARGUSED(select); + ARGUSED(data); + + unsupported(); + return -1; +} + +int areca_command_interface(int fd,int disknum,smart_command_set command,int select,char *data) +{ + ARGUSED(fd); + ARGUSED(disknum); + ARGUSED(command); + ARGUSED(select); + ARGUSED(data); + + unsupported(); + return -1; +} +//---------------------------------------------------------------------------------------------- +#include +// Interface to SCSI devices. See os_linux.c +int do_scsi_cmnd_io(int fd,struct scsi_cmnd_io * iop,int report) +{ + ARGUSED(fd); + ARGUSED(iop); + ARGUSED(report); + unsupported(); + return -ENOSYS; +} +//---------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------- +static int ata_sense_data(void *sdata,int *error,int *key,int *asc,int *ascq) +{ +SCSI_SENSE *sf; +SCSI_SENSE_DESCRIPTOR *sd; + sf=(SCSI_SENSE *)sdata; + sd=(SCSI_SENSE_DESCRIPTOR *)sdata; + *error=sf->error; + if(*error & SENSE_DATA_FMT_DESCRIPTOR) + { + *key=sd->sense & SK_MSK; + *asc=sd->asc; + *ascq=sd->ascq; + } + else + { + *key=sf->sense & SK_MSK; + *asc=sf->asc; + *ascq=sf->ascq; + } + return(CAM_SUCCESS); +} +//---------------------------------------------------------------------------------------------- +static int ata_interpret_sense(struct cam_pass_thru *cpt,void *sense,int *status,int rcount) +{ +int retry; +int key; +int asc; +int ascq; +int error; + *status=EIO; + retry=CAM_TRUE; + if(cpt->cam_status&CAM_AUTOSNS_VALID) + { + ata_sense_data(sense,&error,&key,&asc,&ascq); + switch(key) + { + case SK_NO_SENSE: // No sense data (no error) + retry=CAM_FALSE; + *status=EOK; + break; + case SK_RECOVERED: // Recovered error + switch(asc) + { + case ASC_ATA_PASS_THRU: + switch(ascq) + { + case ASCQ_ATA_PASS_THRU_INFO_AVAIL: + break; + default: + break; + } + break; + default: + break; + } + retry=CAM_FALSE; + *status=EOK; + break; + case SK_NOT_RDY: // Device not ready + *status=EAGAIN; + switch(asc) + { + case ASC_NOT_READY: + switch(ascq) + { + case ASCQ_BECOMING_READY: + case ASCQ_CAUSE_NOT_REPORTABLE: + default: + retry=CAM_FALSE; + break; + } + break; + case ASC_MEDIA_NOT_PRESENT: + *status=ENXIO; + retry=CAM_FALSE; + break; + } + break; + case SK_MEDIUM: // Medium error + case SK_HARDWARE: // Hardware error + retry=CAM_FALSE; + *status=EIO; + break; + case SK_ILLEGAL: // Illegal Request (bad command) + retry=CAM_FALSE; + *status=EINVAL; + break; + case SK_UNIT_ATN: // Unit Attention + switch(asc) + { + case ASC_MEDIUM_CHANGED: + *status=ESTALE; + retry=CAM_FALSE; + break; + case ASC_BUS_RESET: + break; + } + break; + case SK_DATA_PROT: // Data Protect + retry=CAM_FALSE; + *status=EROFS; + break; + case SK_VENDOR: // Vendor Specific + case SK_CPY_ABORT: // Copy Aborted + retry=CAM_FALSE; + *status=EIO; + break; + case SK_CMD_ABORT: // Aborted Command + retry=CAM_FALSE; + *status=ECANCELED; + break; + case SK_EQUAL: // Equal + case SK_VOL_OFL: // Volume Overflow + case SK_MISCMP: // Miscompare + case SK_RESERVED: // Reserved + break; + } + if(*status==EOK) + { + switch(cpt->cam_status&CAM_STATUS_MASK) + { + case CAM_REQ_CMP_ERR: // CCB request completed with an err + retry=CAM_FALSE; + *status=EIO; + break; + case CAM_BUSY: // CAM subsystem is busy + *status=EAGAIN; + break; + case CAM_REQ_INVALID: // CCB request is invalid + case CAM_PATH_INVALID: // Path ID supplied is invalid + case CAM_DEV_NOT_THERE: // SCSI device not installed/there + case CAM_SEL_TIMEOUT: // Target selection timeout + case CAM_LUN_INVALID: // LUN supplied is invalid + case CAM_TID_INVALID: // Target ID supplied is invalid + retry=CAM_FALSE; + *status=ENXIO; + break; + case CAM_CMD_TIMEOUT: // Command timeout + *status=rcount?EAGAIN:EIO; + break; + case CAM_MSG_REJECT_REC: // Message reject received + case CAM_SCSI_BUS_RESET: // SCSI bus reset sent/received + case CAM_UNCOR_PARITY: // Uncorrectable parity err occurred + case CAM_AUTOSENSE_FAIL: // Autosense: Request sense cmd fail + case CAM_NO_HBA: // No HBA detected Error + case CAM_DATA_RUN_ERR: // Data overrun/underrun error + retry=CAM_FALSE; + *status=EIO; + break; + case CAM_UNEXP_BUSFREE: // Unexpected BUS free + case CAM_SEQUENCE_FAIL: // Target bus phase sequence failure + *status=EIO; + break; + case CAM_PROVIDE_FAIL: // Unable to provide requ. capability + retry=CAM_FALSE; + *status=ENOTTY; + break; + case CAM_CCB_LEN_ERR: // CCB length supplied is inadequate + case CAM_BDR_SENT: // A SCSI BDR msg was sent to target + case CAM_REQ_TERMIO: // CCB request terminated by the host + case CAM_FUNC_NOTAVAIL: // The requ. func is not available + case CAM_NO_NEXUS: // Nexus is not established + case CAM_IID_INVALID: // The initiator ID is invalid + case CAM_CDB_RECVD: // The SCSI CDB has been received + retry=CAM_FALSE; + *status=EIO; + break; + case CAM_SCSI_BUSY: // SCSI bus busy + *status=EAGAIN; + break; + } + } + } + return(retry); +} +//---------------------------------------------------------------------------------------------- +static int ata_pass_thru(int fd,struct cam_pass_thru *pcpt) +{ +int icnt; +int status; +iov_t iov[3]; +struct cam_pass_thru cpt; + cpt=*pcpt; + icnt=1; + SETIOV(&iov[0],&cpt,sizeof(cpt)); + cpt.cam_timeout=cpt.cam_timeout?cpt.cam_timeout:CAM_TIME_DEFAULT; + if(cpt.cam_sense_len) + { + SETIOV(&iov[1],cpt.cam_sense_ptr,cpt.cam_sense_len); + cpt.cam_sense_ptr=sizeof(cpt); + icnt++; + } + if(cpt.cam_dxfer_len) + { + SETIOV(&iov[2],(void *)cpt.cam_data_ptr,cpt.cam_dxfer_len); + cpt.cam_data_ptr=(paddr_t)sizeof(cpt)+cpt.cam_sense_len; + icnt++; + } + if((status=devctlv(fd,DCMD_CAM_PASS_THRU,icnt,icnt,iov,iov,NULL))) + pout("ata_pass_thru devctl: %s\n",strerror(status)); + pcpt->cam_status=cpt.cam_status; + pcpt->cam_scsi_status=cpt.cam_scsi_status; + return(status); +} +//---------------------------------------------------------------------------------------------- diff --git a/os_qnxnto.h b/os_qnxnto.h new file mode 100644 index 0000000..2feb235 --- /dev/null +++ b/os_qnxnto.h @@ -0,0 +1,896 @@ +/* + * os_generic.h + * + * Home page of code is: http://smartmontools.sourceforge.net + * + * Copyright (C) Joerg Hering + * Copyright (C) 2003-8 Bruce Allen + * + * 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. + * + * You should have received a copy of the GNU General Public License + * (for example COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * This code was originally developed as a Senior Thesis by Michael Cornwell + * at the Concurrent Systems Laboratory (now part of the Storage Systems + * Research Center), Jack Baskin School of Engineering, University of + * California, Santa Cruz. http://ssrc.soe.ucsc.edu/ + * + */ +#ifndef OS_QNXNTO_H_ +#define OS_QNXNTO_H_ +#define OS_QNXNTO_H_CVSID "$Id: os_qnxnto.h,v 1.2 2008/03/04 22:09:47 ballen4705 Exp $\n" + +// Additional material should start here. Note: to keep the '-V' CVS +// reporting option working as intended, you should only #include +// system include files . Local #include files +// <"something.h"> should be #included in os_generic.c +#include + +#ifndef __TYPES_H_INCLUDED +#include +#endif + +#include +#include +#include +#include +#include +#include +#include "atacmds.h" + +//---------------------------------------------------------------------------------------------------------- +typedef struct _ata_pass_thru ATA_PASS_THRU; +typedef struct _eide_identify EIDE_IDENTIFY; +typedef struct _ata_sense ATA_SENSE; + +typedef void CCB; +struct _sim_hba; +struct _resmgr_context; + + +typedef struct _drive_attribute + { + int id; + int threshold; + char *name; + }DRIVE_ATTRIBUTE; + +//---------------------------------------------------------------------------------------------------------- +/* UNIVOS OSD defines and data structures. */ + +#define INQLEN 36 /* Inquiry string length to store. */ + +#define CAM_SUCCESS 0 /* For signaling general success */ +#define CAM_FAILURE 1 /* For signaling general failure */ + +#define CAM_FALSE 0 /* General purpose flag value */ +#define CAM_TRUE 1 /* General purpose flag value */ + +//---------------------------------------------------------------------------------------------------------- +// Group 3 and 4, command codes 60H-9FH are reserved +#define SC_ATA_PT16 0x85 // ATA Pass-through +//---------------------------------------------------------------------------------------------------------- +#define ATA_SMART_LBA_MID_SIG 0x4f +#define ATA_SMART_LBA_HI_SIG 0xc2 +#define ATA_SMART_SIG 0xc24f +//---------------------------------------------------------------------------------------------------------- + struct _ata_pass_thru { + uchar_t opcode; +#define ATA_PROTO_MSK 0x1e +#define ATA_PROTO_RESPONSE (15 << 1) +#define ATA_PROTO_FPDMA (12 << 1) +#define ATA_PROTO_UDMA_DATA_OUT (11 << 1) +#define ATA_PROTO_UDMA_DATA_IN (10 << 1) +#define ATA_PROTO_DEVICE_RESET (9 << 1) +#define ATA_PROTO_DEVICE_DIAGNOSTIC (8 << 1) +#define ATA_PROTO_DMA_QUEUED (7 << 1) +#define ATA_PROTO_DMA (6 << 1) +#define ATA_PROTO_PIO_DATA_OUT (5 << 1) +#define ATA_PROTO_PIO_DATA_IN (4 << 1) +#define ATA_PROTO_DATA_NONE (3 << 1) +#define ATA_PROTO_SRST (1 << 1) +#define ATA_PROTO_HRST (0 << 1) +#define ATA_PROTO_EXTEND 0x01 + uchar_t protocol; // multiple count, protocol +#define ATA_MCOUNT_MSK 0xe0 + +#define ATA_FLG_CK_COND 0x20 +#define ATA_FLG_T_DIR 0x08 // data from device +#define ATA_FLG_BYT_BLOK 0x04 +#define ATA_FLG_TLEN_STPSIU 0x03 +#define ATA_FLG_TLEN_SECTOR_COUNT 0x02 +#define ATA_FLG_TLEN_FEATURE 0x01 + uchar_t flags; + + uchar_t efeatures; + uchar_t features; + uchar_t esector_count; + uchar_t sector_count; + uchar_t elba_low; + uchar_t lba_low; + uchar_t elba_mid; + uchar_t lba_mid; + uchar_t elba_high; + uchar_t lba_high; + uchar_t device; + uchar_t command; + uchar_t control; + } ata_pass_thru_; +//---------------------------------------------------------------------------------------------------------- +#define SENSE_DATA_FMT_DESCRIPTOR 0x02 + +// Fixed Format Sense Data Structure +// Note: The field "error" has the following format: +// bit 7 - Address valid bit +// bits 6-4 - Error class +// bits 3-0 - Error code +// +// Error classes 0-6 are vendor unique and also indicate that the +// sense data is in _nonextended_ format. (i.e. not usually used) +// struct _scsi_nonextended_sense { +// uchar_t sd_err; +// ulong_t sd_block_address; +// }; +// +// An error class of 7 and an error code of 0 (70H) indicate SCSI-1 +// extended sense data format (or SCSI-2 sense data format). +// +// An error class of 7 and an error code of 1 (71H) indicate SCSI-2 +// deferred errors. +// +// Error codes 74H to 7EH are reserved and error code 7FH indicates +// a vendor-specific sense data format. +typedef struct _scsi_sense { + uchar_t error; // Error Code + uchar_t segment; // Segment number + uchar_t sense; // Sense key/flags + uchar_t info[4]; // Information (32bit big-endian value) + uchar_t asl; // Additional Sense Length + uchar_t csinfo[4]; // Command-Specific Information + uchar_t asc; // Additional Sense Code + uchar_t ascq; // Additional Sense Code Qualifier + uchar_t fruc; // Field Replaceable Unit Code + uchar_t sks; // Sense Key Specific + ushort_t sks_data; // Sense Key Specific Data (16bit big-endian) + ushort_t asb; // Additional Sense uchar_ts (Max 256-18) +} SCSI_SENSE; + +// Descriptor Format Sense Data Structure +// error code of 72 current, 73 deferred +// extended sense data format (or SCSI-2 sense data format). +typedef struct _scsi_sense_descriptor { + uchar_t error; // Error Code + uchar_t sense; // Sense key/flags + uchar_t asc; // Additional Sense Code + uchar_t ascq; // Additional Sense Code Qualifier + uchar_t rsvd[3]; + uchar_t asl; // Additional Sense Length +} SCSI_SENSE_DESCRIPTOR; + +typedef struct _scsi_sense_desriptor_header { + uchar_t descriptor_type; + uchar_t descriptor_len; +} SCSI_SENSE_DESCRIPTOR_HEADER; + +#define SENSE_DTYPE_INFORMATION 0x00 +#define SENSE_DTYPE_CSI 0x01 // Command Specific Information +#define SENSE_DTYPE_SKS 0x02 // Sense Key Specific +#define SENSE_DTYPE_FRU 0x03 // Field Replaceable Unit +#define SENSE_DTYPE_STREAM 0x04 +#define SENSE_DTYPE_BLOCK 0x05 +#define SENSE_DTYPE_OSD_OBJ_IDENT 0x06 // OSD Object Identification +#define SENSE_DTYPE_OSD_INTEGRITY 0x07 // OSD Response Integrity Check Value +#define SENSE_DTYPE_OSD_ATR_IDENT 0x08 // OSD Attribute Identification +#define SENSE_DTYPE_ATA 0x09 + +typedef struct _ata_status_descriptor { + uchar_t descriptor_type; +#define ATA_SD_DLEN 0x0c + uchar_t descriptor_len; /* 0xc */ +#define ATA_SD_FLG_EXTEND 0x01 + uchar_t flags; + uchar_t error; + uchar_t esector_count; /* (15:8) */ + uchar_t sector_count; /* (7:0) */ + uchar_t elba_low; /* (15:8) */ + uchar_t lba_low; /* (7:0) */ + uchar_t elba_mid; /* (15:8) */ + uchar_t lba_mid; /* (7:0) */ + uchar_t elba_high; /* (15:8) */ + uchar_t lba_high; /* (7:0) */ + uchar_t device; + uchar_t status; +} ATA_STATUS_DESCRIPTOR; + +//---------------------------------------------------------------------------------------------------------- +// Sense Keys +#define SK_MSK 0x0F // mask to sd_sense field for key + +#define SK_NO_SENSE 0 // No sense data (no error) + #define ASCQ_FILEMARK_DETECTED 0x01 + #define ASCQ_EOPM_DETECTED 0x02 // End of Partition/Medium Detected + #define ASCQ_SETMARK_DETECTED 0x03 + #define ASCQ_BOPM_DETECTED 0x04 // Beginning of Partition/Medium Detected + +#define SK_RECOVERED 1 // Recovered error + #define ASC_ATA_PASS_THRU 0x00 + #define ASCQ_ATA_PASS_THRU_INFO_AVAIL 0x1d + +#define SK_NOT_RDY 2 // Device not ready + #define ASC_NO_SEEK_COMPLETE 0x02 + #define ASC_NOT_READY 0x04 + #define ASCQ_CAUSE_NOT_REPORTABLE 0x00 + #define ASCQ_BECOMING_READY 0x01 + #define ASCQ_INIT_COMMAND_REQUIRED 0x02 + #define ASCQ_MANUAL_INTERVENTION_REQUIRED 0x03 + #define ASCQ_FORMAT_IN_PROGRESS 0x04 + #define ASCQ_UNKNOWN_CHANGED 0xff // NTO extension for fdc's + #define ASC_MEDIA_FORMAT 0x30 // bad format + #define ASC_MEDIA_NOT_PRESENT 0x3a + #define ASC_NOT_CONFIGURED 0x3e + +#define SK_MEDIUM 3 // Medium error + #define ASC_UNRECOVERABLE_READ_ERROR 0x11 + #define ASC_RECORD_NOT_FOUND 0x14 + #define ASCQ_RECORD_NOT_FOUND 0x01 + #define ASC_UNABLE_TO_RECOVER_TOC 0x57 + #define ASC_INCOMPATIBLE_MEDIUM 0x64 + +#define SK_HARDWARE 4 // Hardware error + #define ASC_INTERNAL_TARGET_FAILURE 0x44 + #define ASC_MEDIA_LOAD_EJECT_FAILURE 0x53 + #define ASCQ_UNRECOVERABLE_CIRC 0x06 + +#define SK_ILLEGAL 5 // Illegal Request (bad command) + #define ASC_INVALID_COMMAND 0x20 + #define ASC_INVALID_FIELD 0x24 + #define ASC_INVALID_FIELD_PARAMETER 0x26 + #define ASC_COMMAND_SEQUENCE_ERROR 0x2c + #define ASCQ_READ_SCRAMBLED 0x03 + #define ASC_ILLEGAL_MODE 0x64 + #define ASC_COPY_PROTECTION 0x6f + +#define SK_UNIT_ATN 6 // Unit Attention + #define ASC_MEDIUM_CHANGED 0x28 + #define ASC_BUS_RESET 0x29 + #define ASC_INSUFFICIENT_TIME_FOR_OPERATION 0x2e + #define ASC_OPERATOR_REQUEST 0x5a + #define ASCQ_OPERATOR_MEDIUM_REMOVAL 0x01 + +#define SK_DATA_PROT 7 // Data Protect + #define ASC_WRITE_PROTECTED 0x27 + +#define SK_BLNK_CHK 8 // Blank Check +#define SK_VENDOR 9 // Vendor Specific +#define SK_CPY_ABORT 10 // Copy Aborted +#define SK_CMD_ABORT 11 // Aborted Command +#define SK_EQUAL 12 // Equal +#define SK_VOL_OFL 13 // Volume Overflow +#define SK_MISCMP 14 // Miscompare +#define SK_RESERVED 15 // Reserved +//---------------------------------------------------------------------------------------------------------- +// Command Descriptor Block structure definitions + +// CDB Flags +#define CF_LINK 0x01 // Linked-command indication +#define CF_FLAG 0x02 // Linked-command with flag bit +#define CF_VENDOR0 0x40 // Vendor unique bits +#define CF_VENDOR1 0x80 + +#define CF_FUA 0x08 +#define CF_DPO 0x10 + +typedef union _cdb { + // generic 6 byte command descriptor block + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t lba_byte1; + uchar_t lba_byte0; // LSB + uchar_t transfer_len; + uchar_t control; + } gen6; + + // generic 10 byte command descriptor block + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t lba_byte3; + uchar_t lba_byte4; + uchar_t lba_byte1; + uchar_t lba_byte0; + uchar_t rsvd; + uchar_t transfer_len[2]; + uchar_t control; + } gen10; + + // generic 12 byte command descriptor block + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t lba_byte3; + uchar_t lba_byte4; + uchar_t lba_byte1; + uchar_t lba_byte0; + uchar_t transfer_len[4]; + uchar_t rsvd10; + uchar_t control; + } gen12; + + struct _format_unit { + uchar_t op_code; +#define FU_RSVD0 0xc0 // reserved bits +#define FU_FMTDAT 0x10 +#define FU_CMPLIST 0x08 + uchar_t defect_list_fmt; + uchar_t track_num; + ushort_t interleave; + uchar_t rsvd1[7]; + } format_unit; + + struct _format_unit_old { + uchar_t op_code; + uchar_t rsvd0; + uchar_t medium_type_code; + uchar_t rsvd1; + uchar_t interleave; + uchar_t rsvd2; +#define FMT_RSVD3 0x80 +#define FMT_SECT_SIZE_CD 0x70 +#define FMT_IMMED 0x08 +#define FMT_HEAD 0x04 +#define FMT_ST 0x02 +#define FMT_CERT 0x01 + uchar_t cert; + uchar_t track_addr; + uchar_t rsvd4[4]; + } format_unit_old; + +#define RW_OPT_RELADR 0x01 +#define RW_OPT_CORRCT 0x02 // Disable Corrections +#define RW_OPT_FUA 0x08 // Force Unit Access +#define RW_OPT_DPO 0x10 // Disable Page Out + struct { + uchar_t opcode; + uchar_t lun_lba; + uchar_t lba[2]; + uchar_t transfer_len; + uchar_t control; + } read_write6; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t lba[4]; + uchar_t rsvd2; + uchar_t transfer_len[2]; + uchar_t control; + } read_write10; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t lba[4]; + uchar_t transfer_len[4]; + uchar_t rsvd2; + uchar_t control; + } read_write12; + +#define MSEL_OPT_PF 0x10 // Page Format +#define MSEL_OPT_SP 0x01 // Save Page + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t param_length; + uchar_t control; + } mode_select; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t param_length[2]; + uchar_t control; + } mode_select10; + + struct { + uchar_t opcode; +#define LS_OPT_SP 0x01 // Save Parameters +#define LS_OPT_PCR 0x02 // Parameter Code Reset + uchar_t lun_opt; +#define LS_PC_CUR_THRESHOLD 0x00 +#define LS_PC_CUR_CUMULATIVE 0x01 +#define LS_PC_DFLT_THRESHOLD 0x02 +#define LS_PC_DFLT_CUMULATIVE 0x03 + uchar_t pc; // Page Control + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t param_length[2]; + uchar_t control; + } log_select; + + struct { + uchar_t opcode; +#define MSNS_OPT_DBD 0x08 // Disable Block Descriptors + uchar_t lun_opt; +#define PC_CURRENT 0x00 +#define PC_CHANGEABLE 0x40 +#define PC_DEFAULT 0x80 +#define PC_SAVED 0xC0 +#define PC_MSK 0xC0 + uchar_t pc_page; + uchar_t subpage; + uchar_t allocation_length; + uchar_t control; + } mode_sense; + + struct _mode_sense10 { + uchar_t opcode; + uchar_t lun_opt; + uchar_t pc_page; + uchar_t subpage; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t allocation_length[2]; + uchar_t control; + } mode_sense10; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t pc_page; + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t parameter_pointer[2]; + uchar_t allocation_length[2]; + uchar_t control; + } log_sense; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t prevent; + uchar_t control; + } removal; + + struct { + uchar_t opcode; +#define LD_OPT_IMMED 0x01 + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; +#define LD_CMD_START 0x01 +#define LD_CMD_LOEJ 0x02 +#define LD_CMD_STOP 0x00 +#define LD_CMD_EJECT 0x02 +#define LD_CMD_LOAD 0x03 + +// Sequential-Access +#define LD_CMD_SA_HOLD 0x08 +#define LD_CMD_SA_EOT 0x04 +#define LD_CMD_SA_RT 0x02 // re-tension +#define LD_CMD_SA_LOEJ 0x01 + +// Block +#define LD_CMD_PC_MSK 0xf0 +#define LD_CMD_PC_NC 0 +#define LD_CMD_PC_ACTIVE 1 +#define LD_CMD_PC_IDLE 2 +#define LD_CMD_PC_STANDBY 3 +#define LD_CMD_PC_SLEEP 5 + + uchar_t cmd; + uchar_t control; + } load; + + struct { + uchar_t opcode; + uchar_t lun_opt; +#define SC_OPT_RELADR 0x01 +#define SC_OPT_IMMED 0x02 + uchar_t lba[4]; + uchar_t num_blocks[2]; + uchar_t control; + } synchronize_cache; + +// cdrom commands + struct { + uchar_t opcode; + uchar_t rsvd1; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t allocation_length[2]; + uchar_t control; + } read_disc_information; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t rsvd7; + uchar_t resume; + uchar_t control; + } pause_resume; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t start_minute; + uchar_t start_second; + uchar_t start_frame; + uchar_t end_minute; + uchar_t end_second; + uchar_t end_frame; + uchar_t control; + } play_audio_msf; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t start_track; + uchar_t start_index; + uchar_t rsvd6; + uchar_t end_track; + uchar_t end_index; + uchar_t control; + } play_audio_ti; + + struct { + uchar_t opcode; +#define CD_SCAN_DIR_FORWARD 0x00 +#define CD_SCAN_DIR_REVERSE 0x10 + uchar_t opt; + uchar_t start_address[4]; +#define CD_SCAN_TYPE_LBA 0x00 +#define CD_SCAN_TYPE_MSF 0x40 +#define CD_SCAN_TYPE_TRK 0x80 +#define CD_SCAN_TYPE_MSK 0xc0 + uchar_t rsvd6; + uchar_t rsvd7; + uchar_t rsvd8; + uchar_t type; + uchar_t rsvd10; + uchar_t rsvd11; + } cd_scan; + + struct { + uchar_t opcode; +#define RTOC_OPT_MSF 0x02 + uchar_t lun_opt; +#define RTOC_FMT_TOC 0x0 +#define RTOC_FMT_SESSION 0x1 +#define RTOC_FMT_QSUBCODE 0x2 +#define RTOC_FMT_QSUBCHNL 0x3 +#define RTOC_FMT_ATIP 0x4 +#define RTOC_FMT_CDTEXT 0x5 + uchar_t format; + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t start_track; + uchar_t allocation_length[2]; +#define RTOC_CNTL_FMT_SESSION 0x40 + uchar_t control_format; + } read_toc; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2[6]; + uchar_t allocation_length[2]; + uchar_t rsvd3[2]; + } mechanism_status; + + struct { + uchar_t opcode; +#define EXCHANGE_OPT_IMMED 0x01 + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; +#define EXCHANGE_CMD_START 0x01 +#define EXCHANGE_CMD_LOEJ 0x02 + uchar_t cmd; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t rsvd7; + uchar_t slot; + uchar_t rsvd9; + uchar_t rsvd10; + uchar_t rsvd11; + } exchange; + + struct { + uchar_t opcode; + uchar_t rt; + uchar_t feature_number[2]; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t allocation_length[2]; + uchar_t control; + } get_configuration; + + struct { + uchar_t opcode; +#define GE_OPT_POLLED 0x01 + uchar_t opt; + uchar_t rsvd2; + uchar_t rsvd3; +#define NCR_OPERATIONAL_CHANGE 0x02 +#define NCR_POWER_MANAGEMENT 0x04 +#define NCR_EXTERNAL_REQUEST 0x08 +#define NCR_MEDIA 0x10 +#define NCR_MULTI_INITIATOR 0x20 +#define NCR_DEVICE_BUSY 0x40 + uchar_t ncr; // notification class request + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t allocation_length[2]; + uchar_t control; + } get_event; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2; + uchar_t rsvd3; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t rsvd6; + uchar_t allocation_length[2]; + uchar_t control; + } read_formated_capacities; + + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t read_speed[2]; + uchar_t write_speed[2]; + uchar_t rsvd2[6]; + } cd_speed; + + struct { + uchar_t opcode; +#define RSCHNL_OPT_MSF 0x02 + uchar_t lun_opt; +#define RSCHNL_DATA_SUBQ 0x40 + uchar_t data; + uchar_t data_format; + uchar_t rsvd4; + uchar_t rsvd5; + uchar_t track; + uchar_t allocation_length[2]; + uchar_t control; + } read_subchannel; + +#define CD_FRAME_SYNC_SIZE 12 +#define CD_FRAME_HDR_SIZE 4 +#define CD_FRAME_SUB_HDR_SIZE 8 +#define CD_FRAME_EDC_SIZE 4 +#define CD_FRAME_ECC_SIZE 276 +#define CD_FRAME_AUX_SIZE 8 +#define CD_FRAME_ZERO_SIZE 8 +#define CD_FRAME_SPARE_SIZE 4 +#define CD_FRAME_C2_ERR_SIZE 294 +#define CD_FRAME_BLOCK_ERR_SIZE 2 + + struct { + uchar_t opcode; + uchar_t lun_stype; +// expected sector type +#define RDCD_EST_ANY_SECTOR (0 << 2) +#define RDCD_EST_CDDA_SECTOR (1 << 2) +#define RDCD_EST_YELLOW_MODE1_SECTOR (2 << 2) +#define RDCD_EST_YELLOW_MODE2_SECTOR (3 << 2) +#define RDCD_EST_XA_SECTOR (4 << 2) +#define RDCD_EST_XA_FORM2_SECTOR (5 << 2) +#define RDCD_EST_MSK (7 << 2) + uchar_t lba[4]; + uchar_t transfer_len[3]; + uchar_t flags; +#define RDCD_FLG_SYNC 0x80 +#define RDCD_FLG_UDATA 0x10 +#define RDCD_FLG_ECC 0x08 +#define RDCD_FLG_CD_ERR 0x02 +#define RDCD_FLG_CD_BLOCK_ERR 0x04 +#define RDCD_FLG_HC_NONE ( 0x00 << 5 ) +#define RDCD_FLG_HC_HDR ( 0x01 << 5 ) +#define RDCD_FLG_HC_SUBHEADER ( 0x02 << 5 ) +#define RDCD_FLG_HC_ALL_HEADERS ( 0x03 << 5 ) + uchar_t subch_selection; + uchar_t rsvd3; + } read_cd; + + struct { + uchar_t opcode; + uchar_t lun_stype; + uchar_t rsvd2; + uchar_t start_minute; + uchar_t start_second; + uchar_t start_frame; + uchar_t end_minute; + uchar_t end_second; + uchar_t end_frame; + uchar_t flags; + uchar_t subch_selection; + uchar_t rsvd11; + } read_cd_msf; + + struct _ata_pass_thru { + uchar_t opcode; +#define ATA_PROTO_MSK 0x1e +#define ATA_PROTO_RESPONSE (15 << 1) +#define ATA_PROTO_FPDMA (12 << 1) +#define ATA_PROTO_UDMA_DATA_OUT (11 << 1) +#define ATA_PROTO_UDMA_DATA_IN (10 << 1) +#define ATA_PROTO_DEVICE_RESET (9 << 1) +#define ATA_PROTO_DEVICE_DIAGNOSTIC (8 << 1) +#define ATA_PROTO_DMA_QUEUED (7 << 1) +#define ATA_PROTO_DMA (6 << 1) +#define ATA_PROTO_PIO_DATA_OUT (5 << 1) +#define ATA_PROTO_PIO_DATA_IN (4 << 1) +#define ATA_PROTO_DATA_NONE (3 << 1) +#define ATA_PROTO_SRST (1 << 1) +#define ATA_PROTO_HRST (0 << 1) +#define ATA_PROTO_EXTEND 0x01 + uchar_t protocol; // multiple count, protocol +#define ATA_MCOUNT_MSK 0xe0 + +#define ATA_FLG_CK_COND 0x20 +#define ATA_FLG_T_DIR 0x08 // data from device +#define ATA_FLG_BYT_BLOK 0x04 +#define ATA_FLG_TLEN_STPSIU 0x03 +#define ATA_FLG_TLEN_SECTOR_COUNT 0x02 +#define ATA_FLG_TLEN_FEATURE 0x01 + uchar_t flags; + + uchar_t efeatures; + uchar_t features; + uchar_t esector_count; + uchar_t sector_count; + uchar_t elba_low; + uchar_t lba_low; + uchar_t elba_mid; + uchar_t lba_mid; + uchar_t elba_high; + uchar_t lba_high; + uchar_t device; + uchar_t command; + uchar_t control; + } ata_pass_thru; + +// sequential access commands + struct { + uchar_t opcode; +#define ERASE_OPT_LONG 0x01 + uchar_t opt; + uchar_t rsvd[3]; + uchar_t control; + } erase; + + struct { + uchar_t opcode; +#define LOCATE_OPT_CP 0x2 +#define LOCATE_OPT_BT 0x4 + uchar_t opt; + uchar_t rsvd2; + uchar_t ba[4]; // block address + uchar_t rsvd7; + uchar_t partition; + uchar_t control; + } locate; + + struct { + uchar_t opcode; + uchar_t opt; + uchar_t rsvd2[3]; + uchar_t control; + } read_block_limits; + +#define RP_OPT_BT 0x01 // block address type +#define RP_OPT_LNG 0x02 // long format +#define RP_OPT_TCLP 0x04 // total current logical position + struct { + uchar_t opcode; + uchar_t lun_opt; + uchar_t rsvd2[7]; + uchar_t control; + } read_position; + +#define SRW_OPT_FIXED 0x01 +#define SRW_OPT_SILI 0x02 + struct { + uchar_t opcode; + uchar_t opt; + uchar_t transfer_len[3]; + uchar_t control; + } sa_read_write; + + struct { + uchar_t opcode; + uchar_t opt; + uchar_t rsvd[3]; + uchar_t control; + } rewind; + + struct { + uchar_t opcode; +#define SPACE_CODE_BLOCKS 0x00 +#define SPACE_CODE_FMRKS 0x01 +#define SPACE_CODE_SEQ_FMRKS 0x02 +#define SPACE_CODE_EOD 0x03 +#define SPACE_CODE_SMRKS 0x04 +#define SPACE_CODE_SEQ_SMRKS 0x05 + uchar_t lun_code; + uchar_t count[3]; + uchar_t control; + } space; + + struct { + uchar_t opcode; +#define WF_OPT_IMMED 0x01 +#define WF_OPT_WSMK 0x02 + uchar_t opt; + uchar_t transfer_length[3]; + uchar_t control; + } write_filemarks; + + struct { + uchar_t opcode; +#define RD_OPT_MEDIA 0x01 + uchar_t opt; + uchar_t rsvd[5]; + uchar_t allocation_length[2]; + uchar_t control; + } report_density; + + struct { + uchar_t opcode; +#define FM_OPT_IMMED 0x01 +#define FM_OPT_VERIFY 0x02 + uchar_t opt; +#define FM_FMT_DFLT 0x00 +#define FM_FMT_PARTITION 0x01 +#define FM_FMT_FORMAT_PARTITION 0x02 + uchar_t format; + uchar_t transfer_length[2]; + uchar_t control; + } format_media; +} CDB; +//---------------------------------------------------------------------------------------------------------- + +struct _ata_sense + { + SCSI_SENSE_DESCRIPTOR sense; + ATA_STATUS_DESCRIPTOR desc; + }; +//---------------------------------------------------------------------------------------------------------- + + +#endif /* OS_QNXNTO_H_ */ diff --git a/os_win32.cpp b/os_win32.cpp index ba9364c..2bf2b5a 100644 --- a/os_win32.cpp +++ b/os_win32.cpp @@ -3,7 +3,7 @@ * * Home page of code is: http://smartmontools.sourceforge.net * - * Copyright (C) 2004-9 Christian Franke + * Copyright (C) 2004-10 Christian Franke * * 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 @@ -32,7 +32,7 @@ extern smartmonctrl * con; // con->permissive,reportataioctl #include #else #undef assert -#define assert(x) /**/ +#define assert(x) /* */ #endif #define WIN32_LEAN_AND_MEAN @@ -40,17 +40,28 @@ extern smartmonctrl * con; // con->permissive,reportataioctl #include // offsetof() #include // access() +#ifdef __CYGWIN__ +#include // CYGWIN_VERSION_DLL_MAJOR +#endif + // Macro to check constants at compile time using a dummy typedef #define ASSERT_CONST(c, n) \ typedef char assert_const_##c[((c) == (n)) ? 1 : -1] #define ASSERT_SIZEOF(t, n) \ typedef char assert_sizeof_##t[(sizeof(t) == (n)) ? 1 : -1] +const char * os_win32_cpp_cvsid = "$Id: os_win32.cpp 3049 2010-01-27 19:47:09Z chrfranke $"; -// Needed by '-V' option (CVS versioning) of smartd/smartctl -const char *os_XXXX_c_cvsid="$Id: os_win32.cpp 3050 2010-01-27 19:58:38Z chrfranke $" -ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSICMDS_H_CVSID UTILITY_H_CVSID; - +// Disable Win9x/ME specific code if no longer supported by compiler. +#ifndef WIN9X_SUPPORT + #if defined(CYGWIN_VERSION_DLL_MAJOR) && (CYGWIN_VERSION_DLL_MAJOR >= 1007) + // Win9x/ME support was dropped in Cygwin 1.7 + #elif defined(_MSC_VER) && (_MSC_VER >= 1500) + // Win9x/ME support was dropped in MSVC9 (cl.exe 15.0) + #else + #define WIN9X_SUPPORT 1 + #endif +#endif ///////////////////////////////////////////////////////////////////////////// @@ -60,6 +71,16 @@ namespace os_win32 { // no need to publish anything, name provided for Doxygen #pragma warning(disable:4250) #endif +// Running on Win9x/ME ? +#if WIN9X_SUPPORT +// Set true in win9x_smart_interface ctor. +static bool win9x = false; +#else +// Never true (const allows compiler to remove dead code). +const bool win9x = false; +#endif + + class win_smart_device : virtual public /*implements*/ smart_device { @@ -112,6 +133,7 @@ private: std::string m_options; bool m_usr_options; // options set by user? bool m_admin; // open with admin access? + bool m_id_is_cached; // ata_identify_is_cached() return value. int m_drive, m_port; int m_smartver_state; }; @@ -137,6 +159,8 @@ private: ///////////////////////////////////////////////////////////////////////////// +#if WIN9X_SUPPORT + class win_aspi_device : public /*implements*/ scsi_device { @@ -156,6 +180,7 @@ private: unsigned char m_id; }; +#endif // WIN9X_SUPPORT ////////////////////////////////////////////////////////////////////// @@ -208,10 +233,16 @@ protected: virtual bool scsi_scan(smart_device_list & devlist) = 0; }; +#if WIN9X_SUPPORT + // Win9x/ME reduced functionality class win9x_smart_interface : public /*extends*/ win_smart_interface { +public: + win9x_smart_interface() + { win9x = true; } + protected: virtual scsi_device * get_scsi_device(const char * name, const char * type); @@ -220,6 +251,8 @@ protected: virtual bool scsi_scan(smart_device_list & devlist); }; +#endif // WIN9X_SUPPORT + // WinNT,2000,XP,... class winnt_smart_interface : public /*extends*/ win_smart_interface @@ -237,12 +270,6 @@ protected: ////////////////////////////////////////////////////////////////////// -// Running on Win9x/ME ? -static inline bool is_win9x() -{ - return !!(GetVersion() & 0x80000000); -} - // Running on 64-bit Windows as 32-bit app ? static bool is_wow64() { @@ -369,16 +396,24 @@ ata_device * win_smart_interface::get_ata_device(const char * name, const char * return new win_ata_device(this, name, type); } +#ifdef WIN9X_SUPPORT + scsi_device * win9x_smart_interface::get_scsi_device(const char * name, const char * type) { return new win_aspi_device(this, name, type); } +#endif + scsi_device * winnt_smart_interface::get_scsi_device(const char * name, const char * type) { const char * testname = skipdev(name); if (!strncmp(testname, "scsi", 4)) +#if WIN9X_SUPPORT return new win_aspi_device(this, name, type); +#else + return (set_err(EINVAL, "ASPI interface not supported"), (scsi_device *)0); +#endif return new win_scsi_device(this, name, type); } @@ -416,8 +451,10 @@ smart_device * win_smart_interface::autodetect_smart_device(const char * name) const char * testname = skipdev(name); if (!strncmp(testname, "hd", 2)) return new win_ata_device(this, name, ""); +#if WIN9X_SUPPORT if (!strncmp(testname, "scsi", 4)) return new win_aspi_device(this, name, ""); +#endif if (!strncmp(testname, "tw_cli", 6)) return new win_tw_cli_device(this, name, ""); return 0; @@ -778,7 +815,7 @@ static int smart_ioctl(HANDLE hdevice, int drive, IDEREGS * regs, char * data, u if (datasize) memcpy(data, outpar->bBuffer, 512); else if (regs->bFeaturesReg == ATA_SMART_STATUS) { - if (nonempty(const_cast(outpar->bBuffer), sizeof(IDEREGS))) + if (nonempty(outpar->bBuffer, sizeof(IDEREGS))) *regs = *(const IDEREGS *)(outpar->bBuffer); else { // Workaround for driver not returning regs if (con->reportataioctl) @@ -1599,7 +1636,6 @@ bool win_tw_cli_device::open() id->words047_079[60-47] = (unsigned short)(nblocks ); // secs_16 id->words047_079[61-47] = (unsigned short)(nblocks>>16); // secs_32 } - id->major_rev_num = 0x1<<3; // ATA-3 id->command_set_1 = 0x0001; id->command_set_2 = 0x4000; // SMART supported, words 82,83 valid id->cfs_enable_1 = 0x0001; id->csf_default = 0x4000; // SMART enabled, words 85,87 valid @@ -1674,20 +1710,6 @@ int win_tw_cli_device::ata_command_interface(smart_command_set command, int /*se break; memcpy(data, &m_smart_buf, 512); return 0; - case READ_THRESHOLDS: - if (!m_smart_valid) - break; - // Fake zero thresholds - { - const ata_smart_values * sv = &m_smart_buf; - ata_smart_thresholds_pvt * tr = (ata_smart_thresholds_pvt *)data; - memset(tr, 0, 512); - // TODO: Indicate missing thresholds in ataprint.cpp:PrintSmartAttribWithThres() - // (ATA_SMART_READ_THRESHOLDS is marked obsolete since ATA-5) - for (int i = 0; i < NUMBER_ATA_SMART_ATTRIBUTES; i++) - tr->chksum -= tr->thres_entries[i].id = sv->vendor_attributes[i].id; - } - return 0; case ENABLE: case STATUS: case STATUS_CHECK: // Fake "good" SMART status @@ -1949,7 +1971,6 @@ static int get_identify_from_device_property(HANDLE hdevice, ata_identify_device copy_swapped(id->model, data.raw+data.desc.ProductIdOffset, sizeof(id->model)); if (data.desc.ProductRevisionOffset) copy_swapped(id->fw_rev, data.raw+data.desc.ProductRevisionOffset, sizeof(id->fw_rev)); - id->major_rev_num = 0x1<<3; // ATA-3 id->command_set_1 = 0x0001; id->command_set_2 = 0x4000; // SMART supported, words 82,83 valid id->cfs_enable_1 = 0x0001; id->csf_default = 0x4000; // SMART enabled, words 85,87 valid return 0; @@ -2150,6 +2171,7 @@ static int get_device_power_state(HANDLE hdevice) ///////////////////////////////////////////////////////////////////////////// +#if WIN9X_SUPPORT // Print SMARTVSD error message, return errno static int smartvsd_error() @@ -2197,6 +2219,7 @@ static int smartvsd_error() } } +#endif // WIN9X_SUPPORT // Get default ATA device options @@ -2241,6 +2264,7 @@ win_ata_device::win_ata_device(smart_interface * intf, const char * dev_name, co : smart_device(intf, dev_name, "ata", req_type), m_usr_options(false), m_admin(false), + m_id_is_cached(false), m_drive(0), m_port(-1), m_smartver_state(0) @@ -2289,7 +2313,6 @@ bool win_ata_device::open() bool win_ata_device::open(int phydrive, int logdrive, const char * options, int port) { // path depends on Windows Version - bool win9x = is_win9x(); // TODO: Member variable char devpath[30]; if (win9x && 0 <= phydrive && phydrive <= 7) // Use patched "smartvse.vxd" for drives 4-7, see INSTALL file for details @@ -2319,9 +2342,12 @@ bool win_ata_device::open(int phydrive, int logdrive, const char * options, int } if (h == INVALID_HANDLE_VALUE) { long err = GetLastError(); - pout("Cannot open device %s, Error=%ld\n", devpath, err); +#if WIN9X_SUPPORT + if (win9x && phydrive <= 3 && err == ERROR_FILE_NOT_FOUND) + smartvsd_error(); +#endif if (err == ERROR_FILE_NOT_FOUND) - set_err((win9x && phydrive <= 3 ? smartvsd_error() : ENOENT), "%s: not found", devpath); + set_err(ENOENT, "%s: not found", devpath); else if (err == ERROR_ACCESS_DENIED) set_err(EACCES, "%s: access denied", devpath); else @@ -2330,6 +2356,15 @@ bool win_ata_device::open(int phydrive, int logdrive, const char * options, int } set_fh(h); + // Warn once if admin rights are missing + if (!m_admin) { + static bool noadmin_warning = false; + if (!noadmin_warning) { + pout("Warning: Limited functionality due to missing admin rights\n"); + noadmin_warning = true; + } + } + if (con->reportataioctl > 1) pout("%s: successfully opened%s\n", devpath, (!m_admin ? " (without admin rights)" :"")); @@ -2415,6 +2450,8 @@ bool win_ata_device::open(int phydrive, int logdrive, const char * options, int } +#if WIN9X_SUPPORT + // Scan for ATA drives on Win9x/ME bool win9x_smart_interface::ata_scan(smart_device_list & devlist) @@ -2447,6 +2484,8 @@ bool win9x_smart_interface::ata_scan(smart_device_list & devlist) return true; } +#endif // WIN9X_SUPPORT + // Scan for ATA drives @@ -2531,7 +2570,7 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) case ATA_SMART_IMMEDIATE_OFFLINE: // SMART_SEND_DRIVE_COMMAND supports ABORT_SELF_TEST only on Win9x/ME - valid_options = (m_usr_options || in.in_regs.lba_low != 127/*ABORT*/ || is_win9x() ? + valid_options = (m_usr_options || in.in_regs.lba_low != 127/*ABORT*/ || win9x ? "saicm3" : "aicm3"); break; @@ -2540,7 +2579,7 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) // Try SCSI_MINIPORT also to skip buggy class driver // SMART functions do not support multi sector I/O. if (in.size == 512) - valid_options = (m_usr_options || is_win9x() ? "saicm3" : "aicm3"); + valid_options = (m_usr_options || win9x ? "saicm3" : "aicm3"); else valid_options = "a"; break; @@ -2642,6 +2681,7 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) // Try all valid ioctls in the order specified in m_options bool powered_up = false; bool out_regs_set = false; + bool id_is_cached = false; const char * options = m_options.c_str(); for (int i = 0; ; i++) { @@ -2689,9 +2729,11 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) } rc = smart_ioctl(get_fh(), m_drive, ®s, data, datasize, m_port); out_regs_set = (in.in_regs.features == ATA_SMART_STATUS); + id_is_cached = (m_port < 0 && !win9x); // Not cached by 3ware or Win9x/ME driver break; case 'm': rc = ata_via_scsi_miniport_smart_ioctl(get_fh(), ®s, data, datasize); + id_is_cached = (m_port < 0 && !win9x); break; case 'a': rc = ata_pass_through_ioctl(get_fh(), ®s, @@ -2709,6 +2751,7 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) case 'f': if (in.in_regs.command == ATA_IDENTIFY_DEVICE) { rc = get_identify_from_device_property(get_fh(), (ata_identify_device *)data); + id_is_cached = true; } else if (in.in_regs.command == ATA_SMART_CMD) switch (in.in_regs.features) { case ATA_SMART_READ_VALUES: @@ -2716,31 +2759,19 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) if (rc > 0) rc = 0; break; - case ATA_SMART_READ_THRESHOLDS: - { - ata_smart_values sv; - rc = storage_predict_failure_ioctl(get_fh(), (char *)&sv); - if (rc < 0) - break; - rc = 0; - // Fake zero thresholds - ata_smart_thresholds_pvt * tr = (ata_smart_thresholds_pvt *)data; - memset(tr, 0, 512); - for (int i = 0; i < NUMBER_ATA_SMART_ATTRIBUTES; i++) - tr->chksum -= tr->thres_entries[i].id = sv.vendor_attributes[i].id; - } - break; case ATA_SMART_ENABLE: rc = 0; break; case ATA_SMART_STATUS: rc = storage_predict_failure_ioctl(get_fh()); - if (rc >= 0) { - if (rc > 0) { - regs.bCylHighReg = 0x2c; regs.bCylLowReg = 0xf4; - rc = 0; - } - out_regs_set = true; + if (rc == 0) { + // Good SMART status + out.out_regs.lba_high = 0xc2; out.out_regs.lba_mid = 0x4f; + } + else if (rc > 0) { + // Bad SMART status + out.out_regs.lba_high = 0x2c; out.out_regs.lba_mid = 0xf4; + rc = 0; } break; default: @@ -2803,22 +2834,28 @@ bool win_ata_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) hi.lba_high = prev_regs.bCylHighReg; } } + + if ( in.in_regs.command == ATA_IDENTIFY_DEVICE + || in.in_regs.command == ATA_IDENTIFY_PACKET_DEVICE) + // Update ata_identify_is_cached() result according to ioctl used. + m_id_is_cached = id_is_cached; + return true; } // Return true if OS caches the ATA identify sector bool win_ata_device::ata_identify_is_cached() const { - // Not RAID and WinNT4/2000/XP => true, RAID or Win9x/ME => false - // TODO: Set according to ioctl used. - return (m_port < 0 && !is_win9x()); + return m_id_is_cached; } ///////////////////////////////////////////////////////////////////////////// -// ASPI Interface (for SCSI devices) +// ASPI Interface (for SCSI devices on 9x/ME) ///////////////////////////////////////////////////////////////////////////// +#if WIN9X_SUPPORT + #pragma pack(1) #define ASPI_SENSE_SIZE 18 @@ -3348,6 +3385,7 @@ bool win_aspi_device::scsi_pass_through(scsi_cmnd_io * iop) return true; } +#endif // WIN9X_SUPPORT ///////////////////////////////////////////////////////////////////////////// // SPT Interface (for SCSI devices and ATA devices behind SATLs) @@ -3567,7 +3605,7 @@ bool win_scsi_device::scsi_pass_through(struct scsi_cmnd_io * iop) sb.spt.DataTransferLength = iop->dxfer_len; sb.spt.DataBuffer = iop->dxferp; // IOCTL_SCSI_PASS_THROUGH_DIRECT does not support single byte - // transfers (needed for SMART STATUS check of JMicron USB briges) + // transfers (needed for SMART STATUS check of JMicron USB bridges) if (sb.spt.DataTransferLength == 1) direct = false; break; @@ -3645,9 +3683,13 @@ bool win_scsi_device::scsi_pass_through(struct scsi_cmnd_io * iop) void smart_interface::init() { // Select interface for Windows flavor - if (os_win32::is_win9x()) { + if (GetVersion() & 0x80000000) { +#if WIN9X_SUPPORT static os_win32::win9x_smart_interface the_win9x_interface; smart_interface::set(&the_win9x_interface); +#else + throw std::runtime_error("Win9x/ME not supported"); +#endif } else { static os_win32::winnt_smart_interface the_winnt_interface; diff --git a/os_win32/smartctl_vc8.vcproj b/os_win32/smartctl_vc8.vcproj new file mode 100644 index 0000000..d531052 --- /dev/null +++ b/os_win32/smartctl_vc8.vcproj @@ -0,0 +1,1055 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/os_win32/smartd_vc8.vcproj b/os_win32/smartd_vc8.vcproj new file mode 100644 index 0000000..2f7b69b --- /dev/null +++ b/os_win32/smartd_vc8.vcproj @@ -0,0 +1,1007 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/os_win32/smartmontools_vc8.sln b/os_win32/smartmontools_vc8.sln new file mode 100644 index 0000000..77be5f8 --- /dev/null +++ b/os_win32/smartmontools_vc8.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smartctl_vc8", "smartctl_vc8.vcproj", "{3AFEDCDD-D289-4543-A91D-EFBA6C710247}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smartd_vc8", "smartd_vc8.vcproj", "{C0762191-C2AC-40B6-A2EB-F1658BBDC4C6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "syslogevt_vc8", "syslogevt_vc8.vcproj", "{FAB7557B-86EA-405D-B49D-33AB3F4D3E33}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AFEDCDD-D289-4543-A91D-EFBA6C710247}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AFEDCDD-D289-4543-A91D-EFBA6C710247}.Debug|Win32.Build.0 = Debug|Win32 + {3AFEDCDD-D289-4543-A91D-EFBA6C710247}.Release|Win32.ActiveCfg = Release|Win32 + {3AFEDCDD-D289-4543-A91D-EFBA6C710247}.Release|Win32.Build.0 = Release|Win32 + {C0762191-C2AC-40B6-A2EB-F1658BBDC4C6}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0762191-C2AC-40B6-A2EB-F1658BBDC4C6}.Debug|Win32.Build.0 = Debug|Win32 + {C0762191-C2AC-40B6-A2EB-F1658BBDC4C6}.Release|Win32.ActiveCfg = Release|Win32 + {C0762191-C2AC-40B6-A2EB-F1658BBDC4C6}.Release|Win32.Build.0 = Release|Win32 + {FAB7557B-86EA-405D-B49D-33AB3F4D3E33}.Debug|Win32.ActiveCfg = Debug|Win32 + {FAB7557B-86EA-405D-B49D-33AB3F4D3E33}.Debug|Win32.Build.0 = Debug|Win32 + {FAB7557B-86EA-405D-B49D-33AB3F4D3E33}.Release|Win32.ActiveCfg = Release|Win32 + {FAB7557B-86EA-405D-B49D-33AB3F4D3E33}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/os_win32/syslogevt.c b/os_win32/syslogevt.c new file mode 100644 index 0000000..73e1230 --- /dev/null +++ b/os_win32/syslogevt.c @@ -0,0 +1,156 @@ +/* + * os_win32/syslogevt.c + * + * Home page of code is: http://smartmontools.sourceforge.net + * + * Copyright (C) 2004-8 Christian Franke + * + * 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. + * + * You should have received a copy of the GNU General Public License + * (for example COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +static char rcsid[] = "$Id: syslogevt.c,v 1.5 2008/03/04 22:09:48 ballen4705 Exp $"; + +#include +#include +#include + +#define WIN32_LEAN_AND_MEAN +#include + +#ifdef _DEBUG +#include "syslogevt.h" +#endif + + +static int usage() +{ + puts( + "syslogevt $Revision: 1.5 $ Copyright (C) 2004-8 Christian Franke\n" + "Home page is http://smartmontools.sourceforge.net/\n" + "\n" + "Usage: syslogevt [-ru] name [ident ...]\n" + "\n" + "Creates registry files \"name-r.reg\" and \"name-u.reg\" to (un)register\n" + "this program as an event message file for message source(s) \"ident\".\n" + "If \"ident\" is ommited, \"name\" is used. Options:\n" + "\n" + " -r run \"regedit name-r.reg\" after creating files\n" + " -u run \"regedit name-u.reg\" after creating files\n" + "\n" + "Examples:\n" + "\n" + "syslogevt smartd (Create smartd-r.reg and smartd-u.reg)\n" + "regedit smartd-r.reg (Register syslogevt.exe for smartd messages)\n" + "\n" + "syslogevt -r smartd (Same as above in one step)\n" + "\n" + "regedit smartd-u.reg (Undo the registration)\n" + "\n" + "CAUTION: A registry entry of an existing event source with the same \"ident\"\n" + " will be overwritten by regedit without notice." + ); + return 1; +} + +main(int argc, char ** argv) +{ + int regedit, a1, ai; + char name1[30+1], name2[30+1], mypath[MAX_PATH+1]; + const char * ident; + FILE * f1, * f2; + +#ifdef _DEBUG + if (!(MSG_SYSLOG == 0 && MSG_SYSLOG_01 == 1 && MSG_SYSLOG_10 == 10)) { + puts("Internal error: MSG_SYSLOG_n != n"); return 1; + } +#endif + + if (argc < 2) + return usage(); + + a1 = 1; + regedit = 0; + if (!strcmp(argv[a1], "-r")) { + regedit = 1; a1++; + } + else if (!strcmp(argv[a1], "-u")) { + regedit = -1; a1++; + } + + for (ai = a1; ai < argc; ai++) { + ident = argv[ai]; + if (!(ident[0] && strlen(ident) < sizeof(name1)-10 + && strcspn(ident, "-.:/\\") == strlen(ident) )) { + return usage(); + } + } + + if (!GetModuleFileName(NULL, mypath, sizeof(mypath)-1)) { + fputs("GetModuleFileName failed\n", stderr); + return 1; + } + + ident = argv[a1]; + strcpy(name1, ident); strcat(name1, "-r.reg"); + strcpy(name2, ident); strcat(name2, "-u.reg"); + + if (!(f1 = fopen(name1, "w"))) { + perror(name1); return 1; + } + if (!(f2 = fopen(name2, "w"))) { + perror(name2); unlink(name1); return 1; + } + + fputs("REGEDIT4\n\n", f1); + fputs("REGEDIT4\n\n", f2); + + for (ai = (argc > a1+1 ? a1+1 : a1); ai < argc; ai++) { + int i; + ident = argv[ai]; + fputs("[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Eventlog\\Application\\", f1); + fputs(ident, f1); fputs("]\n\"EventMessageFile\"=\"", f1); + for (i = 0; mypath[i]; i++) { + if (mypath[i] == '\\') + fputc('\\', f1); + fputc(mypath[i], f1); + } + fputs("\"\n\"TypesSupported\"=dword:00000007\n\n", f1); + + fputs("[-HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Eventlog\\Application\\", f2); + fputs(ident, f2); fputs("]\n\n", f2); + } + + fclose(f1); + fclose(f2); + + if (GetVersion() & 0x80000000) { + puts("Warning: Event log not supported on Win9x/ME\n"); + if (regedit) + return 1; + } + + if (regedit) { + if (spawnlp(P_WAIT, "regedit", "regedit", (regedit > 0 ? name1 : name2), (const char *)0) == -1) { + fputs("regedit: cannot execute\n", stderr); + return 1; + } + } + else { + fputs("Files generated. Use\n\n regedit ", stdout); + puts(name1); + fputs("\nto register event message file, and\n\n regedit ", stdout); + puts(name2); + fputs("\nto remove registration later.\n\n" + "Do not remove this program when registered.\n", stdout); + } + + return 0; +} diff --git a/os_win32/syslogevt.mc b/os_win32/syslogevt.mc new file mode 100644 index 0000000..a1d421d --- /dev/null +++ b/os_win32/syslogevt.mc @@ -0,0 +1,161 @@ +;/* +; * os_win32/syslogevt.mc +; * +; * Home page of code is: http://smartmontools.sourceforge.net +; * +; * Copyright (C) 2004-8 Christian Franke +; * +; * 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. +; * +; * You should have received a copy of the GNU General Public License +; * (for example COPYING); if not, write to the Free +; * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +; * +; */ +; +;// $Id: syslogevt.mc,v 1.5 2008/03/04 22:09:48 ballen4705 Exp $ +; +;// Use message compiler "mc" to generate +;// syslogevt.rc, syslogevt.h, msg00001.bin +;// from this file. +;// MSG_SYSLOG in syslogmsg.h must be zero +;// MSG_SYSLOG_nn must be == nn +; +; + +MessageId=0x0 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG +Language=English +%1 +. +;// 1-10 Line SYSLOG Messages +;// %1=Ident, %2=PID, %3=Severity, %[4-13]=Line 1-10 +MessageId=0x1 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_01 +Language=English +%1[%2]:%3: %4 +. +MessageId=0x2 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_02 +Language=English +%1[%2]:%3%n +%4%n +%5 +. +MessageId=0x3 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_03 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6 +. +MessageId=0x4 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_04 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7 +. +MessageId=0x5 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_05 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7%n +%8 +. +MessageId=0x6 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_06 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7%n +%8%n +%9 +. +MessageId=0x7 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_07 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7%n +%8%n +%9%n +%10 +. +MessageId=0x8 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_08 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7%n +%8%n +%9%n +%10%n +%11 +. +MessageId=0x9 +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_09 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7%n +%8%n +%9%n +%10%n +%11%n +%12 +. +MessageId=0xa +Severity=Success +Facility=Application +SymbolicName=MSG_SYSLOG_10 +Language=English +%1[%2]:%3%n +%4%n +%5%n +%6%n +%7%n +%8%n +%9%n +%10%n +%11%n +%12%n +%13 +. diff --git a/os_win32/syslogevt_vc8.vcproj b/os_win32/syslogevt_vc8.vcproj new file mode 100644 index 0000000..b7fe8b7 --- /dev/null +++ b/os_win32/syslogevt_vc8.vcproj @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/posix/getopt.c b/posix/getopt.c new file mode 100644 index 0000000..289d137 --- /dev/null +++ b/posix/getopt.c @@ -0,0 +1,1277 @@ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to drepper@gnu.org + before changing it! + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ +#ifndef _NO_PROTO +# define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if !defined __STDC__ || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +# ifndef const +# define const +# endif +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 +# include +# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +# define ELIDE_CODE +# endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +# include +# include +#endif /* GNU C library. */ + +#ifdef VMS +# include +# if HAVE_STRING_H - 0 +# include +# endif +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. */ +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifndef _ +# define _(msgid) gettext (msgid) +# endif +# else +# define _(msgid) (msgid) +# endif +# if defined _LIBC && defined USE_IN_LIBIO +# include +# endif +#endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized attribute_hidden; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +# include +# define my_index strchr +#else + +# if HAVE_STRING_H +# include +# else +# include +# endif + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +#ifndef getenv +extern char *getenv (); +#endif + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +# if (!defined __STDC__ || !__STDC__) && !defined strlen +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +# endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +#if defined __STDC__ && __STDC__ +static void exchange (char **); +#endif + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +#if defined __STDC__ && __STDC__ +static const char *_getopt_initialize (int, char *const *, const char *); +#endif +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (posixly_correct == NULL + && argc == __libc_argc && argv == __libc_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + int print_errors = opterr; + if (optstring[0] == ':') + print_errors = 0; + + if (argc < 1) + return -1; + + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]) >= 0) + { + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (posixly_correct) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); +#endif + } + else + { +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option requires an argument -- %c\n"), + argv[0], c) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/posix/getopt.h b/posix/getopt.h new file mode 100644 index 0000000..4283c35 --- /dev/null +++ b/posix/getopt.h @@ -0,0 +1,181 @@ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _GETOPT_H + +#ifndef __need_getopt +# define _GETOPT_H 1 +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +# if (defined __STDC__ && __STDC__) || defined __cplusplus + const char *name; +# else + char *name; +# endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `--', then non-option arguments are treated as + arguments to the option '\0'. This behavior is specific to the GNU + `getopt'. */ + +#if (defined __STDC__ && __STDC__) || defined __cplusplus +# ifdef __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); +# else /* not __GNU_LIBRARY__ */ +extern int getopt (); +# endif /* __GNU_LIBRARY__ */ + +# ifndef __need_getopt +extern int getopt_long (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); +extern int getopt_long_only (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only); +# endif +#else /* not __STDC__ */ +extern int getopt (); +# ifndef __need_getopt +extern int getopt_long (); +extern int getopt_long_only (); + +extern int _getopt_internal (); +# endif +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* getopt.h */ diff --git a/posix/getopt1.c b/posix/getopt1.c new file mode 100644 index 0000000..ad06cc7 --- /dev/null +++ b/posix/getopt1.c @@ -0,0 +1,196 @@ +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef _LIBC +# include +#else +# include "getopt.h" +#endif + +#if !defined __STDC__ || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +#ifndef const +#define const +#endif +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 +#include +#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +#define ELIDE_CODE +#endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +#include +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int +getopt_long (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 1); +} + +# ifdef _LIBC +libc_hidden_def (getopt_long) +libc_hidden_def (getopt_long_only) +# endif + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +#include + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case 'd': + printf ("option d with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/scsiata.cpp b/scsiata.cpp index 495bcbf..0727017 100644 --- a/scsiata.cpp +++ b/scsiata.cpp @@ -3,8 +3,8 @@ * * Home page of code is: http://smartmontools.sourceforge.net * - * Copyright (C) 2006-9 Douglas Gilbert - * Copyright (C) 2009 Christian Franke + * Copyright (C) 2006-10 Douglas Gilbert + * Copyright (C) 2009-10 Christian Franke * * 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 @@ -61,7 +61,7 @@ #include "dev_ata_cmd_set.h" // ata_device_with_command_set #include "dev_tunnelled.h" // tunnelled_device<> -const char * scsiata_cpp_cvsid = "$Id: scsiata.cpp 2988 2009-11-29 16:21:07Z samm2 $"; +const char * scsiata_cpp_cvsid = "$Id: scsiata.cpp 3048 2010-01-23 17:54:42Z chrfranke $"; /* for passing global control variables */ extern smartmonctrl *con; @@ -1341,6 +1341,8 @@ const usb_id_entry usb_ids[] = { //{ 0x04b4, 0x6831, -1, d_cypress }, // Cypress CY7C68310 (ISD-300LP) // Myson Century { 0x04cf, 0x8818, 0xb007, d_unsup }, // Myson Century CS8818 + // Samsung + { 0x04e8, 0x5f06, -1, d_sat }, // Samsung Story Station // Sunplus { 0x04fc, 0x0c15, 0xf615, d_sunplus }, // SunPlus SPDIF215 { 0x04fc, 0x0c25, 0x0103, d_sunplus }, // SunPlus SPDIF225 (USB+SATA->SATA) @@ -1360,10 +1362,14 @@ const usb_id_entry usb_ids[] = { // Freecom { 0x07ab, 0xfc8e, 0x010f, d_sunplus }, // Freecom Hard Drive XS // Toshiba + { 0x0930, 0x0b03, -1, d_sunplus }, // Toshiba PX1270E-1G16 { 0x0930, 0x0b09, -1, d_sunplus }, // Toshiba PX1396E-3T01 (similar to Dura Micro 501) // Seagate { 0x0bc2, 0x2000, -1, d_sat }, // Seagate FreeAgent Go { 0x0bc2, 0x2100, -1, d_sat }, // Seagate FreeAgent Go + { 0x0bc2, 0x2101, -1, d_sat }, // Seagate FreeAgent Go + { 0x0bc2, 0x2300, -1, d_sat }, // Seagate Expansion Portable + { 0x0bc2, 0x3000, -1, d_sat }, // Seagate FreeAgent Desktop { 0x0bc2, 0x3001, -1, d_sat }, // Seagate FreeAgent Desk // Dura Micro { 0x0c0b, 0xb159, 0x0103, d_sunplus }, // Dura Micro 509 @@ -1373,7 +1379,8 @@ const usb_id_entry usb_ids[] = { { 0x0d49, 0x7410, 0x0122, d_sat }, // Maxtor Basics Desktop { 0x0d49, 0x7450, 0x0122, d_sat }, // Maxtor Basics Portable // Western Digital - { 0x1058, 0x0702, 0x0104, d_sat }, // WD My Passport Portable + { 0x1058, 0x0701, 0x0240, d_cypress }, // WD My Passport (IDE) + { 0x1058, 0x0702, 0x0102, d_sat }, // WD My Passport Portable { 0x1058, 0x0704, 0x0175, d_sat }, // WD My Passport Essential { 0x1058, 0x0705, 0x0175, d_sat }, // WD My Passport Elite { 0x1058, 0x070a, 0x1028, d_sat }, // WD My Passport 070A diff --git a/smartctl.8.in b/smartctl.8.in index 7082f5c..9df3d04 100644 --- a/smartctl.8.in +++ b/smartctl.8.in @@ -1,7 +1,7 @@ .ig Copyright (C) 2002-9 Bruce Allen - $Id: smartctl.8.in 2978 2009-10-30 23:20:39Z chrfranke $ + $Id: smartctl.8.in 3001 2009-12-19 15:25:27Z chrfranke $ 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 @@ -1017,14 +1017,26 @@ writes a binary representation of the one sector log 0x11 (SATA Phy Event Counters) to file log.bin. .TP -.B \-v ID,FORMAT[,NAME], \-\-vendorattribute=ID,FORMAT[,NAME] -[ATA only] Sets a vendor\-specific raw value print FORMAT and -optional NAME for Attribute ID. +.B \-v ID,FORMAT[:BYTEORDER][,NAME], \-\-vendorattribute=ID,FORMAT[:BYTEORDER][,NAME] +[ATA only] Sets a vendor\-specific raw value print FORMAT, an optional +BYTEORDER and an optional NAME for Attribute ID. This option may be used multiple times. The Attribute ID can be in the range 1 to 255. If \'N\' is specified as -ID, the settings for all Attributes are changed. The NAME is a string of -letters, digits and underscore. +ID, the settings for all Attributes are changed. + +The optional BYTEORDER consists of 1 to 8 characters from the +set \'012345rvwz\'. The characters \'0\' to \'5\' select the byte 0 +to 5 from the 48\-bit raw value, \'r\' selects the reserved byte of +the attribute data block, \'v\' selects the normalized value, \'w\' +selects the worst value and \'z\' inserts a zero byte. +The default BYTEORDER is \'543210\' for all 48-bit formats, +and \'543210wv\' for the 64-bit formats. +For example, \'\-v 5,raw48:012345\' prints the raw value of +attribute 5 with big endian instead of little endian +byte ordering. + +The NAME is a string of letters, digits and underscore. .I \-v help \- Prints (to STDOUT) a list of all valid arguments to this option, @@ -1828,7 +1840,7 @@ these documents may be found in the References section of the .SH SVN ID OF THIS PAGE: -$Id: smartctl.8.in 2978 2009-10-30 23:20:39Z chrfranke $ +$Id: smartctl.8.in 3001 2009-12-19 15:25:27Z chrfranke $ .\" Local Variables: .\" mode: nroff .\" End: diff --git a/smartctl.cpp b/smartctl.cpp index a5f165a..76924af 100644 --- a/smartctl.cpp +++ b/smartctl.cpp @@ -56,7 +56,7 @@ #include "smartctl.h" #include "utility.h" -const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3046 2010-01-22 21:30:02Z chrfranke $" +const char * smartctl_cpp_cvsid = "$Id: smartctl.cpp 3032 2010-01-16 13:04:55Z chrfranke $" CONFIG_H_CVSID EXTERN_H_CVSID SMARTCTL_H_CVSID; // This is a block containing all the "control variables". We declare diff --git a/smartd.8.in b/smartd.8.in index 000abfa..4568e45 100644 --- a/smartd.8.in +++ b/smartd.8.in @@ -1,7 +1,7 @@ .ig Copyright (C) 2002-8 Bruce Allen -$Id: smartd.8.in 2977 2009-10-30 22:29:05Z chrfranke $ +$Id: smartd.8.in 3057 2010-02-03 20:56:41Z chrfranke $ 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 @@ -174,6 +174,14 @@ input. This is useful for commands like: .fi to perform quick and simple checks without a configuration file. +.\" BEGIN ENABLE_CAPABILITIES +.TP +.B \-C, \-\-capabilities +Use \fBcapabilities(7)\fP (EXPERIMENTAL). + +Warning: Mail notification does not work when used. + +.\" END ENABLE_CAPABILITIES .TP .B \-d, \-\-debug Runs \fBsmartd\fP in "debug" mode. In this mode, it displays status @@ -1605,9 +1613,9 @@ values for \'\-F\' (see the \'\-P\' option below). [Please see the \fBsmartctl \-F\fP command-line option.] .TP -.B \-v ID,FORMAT[,NAME] -[ATA only] Sets a vendor\-specific raw value print FORMAT and -optional NAME for Attribute ID. +.B \-v ID,FORMAT[:BYTEORDER][,NAME] +[ATA only] Sets a vendor\-specific raw value print FORMAT, an optional +BYTEORDER and an optional NAME for Attribute ID. This directive may be used multiple times. Please see \fBsmartctl -v\fP command-line option for further details. @@ -2067,4 +2075,4 @@ smartmontools home page at \fBhttp://smartmontools.sourceforge.net/#references\f .SH SVN ID OF THIS PAGE: -$Id: smartd.8.in 2977 2009-10-30 22:29:05Z chrfranke $ +$Id: smartd.8.in 3057 2010-02-03 20:56:41Z chrfranke $ diff --git a/smartd.conf.5.in b/smartd.conf.5.in index 1fdee49..ab71770 100644 --- a/smartd.conf.5.in +++ b/smartd.conf.5.in @@ -1,7 +1,7 @@ .ig Copyright (C) 2002-8 Bruce Allen -$Id: smartd.conf.5.in 2977 2009-10-30 22:29:05Z chrfranke $ +$Id: smartd.conf.5.in 3001 2009-12-19 15:25:27Z chrfranke $ 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 @@ -1167,9 +1167,9 @@ values for \'\-F\' (see the \'\-P\' option below). [Please see the \fBsmartctl \-F\fP command-line option.] .TP -.B \-v ID,FORMAT[,NAME] -[ATA only] Sets a vendor\-specific raw value print FORMAT and -optional NAME for Attribute ID. +.B \-v ID,FORMAT[:BYTEORDER][,NAME] +[ATA only] Sets a vendor\-specific raw value print FORMAT, an optional +BYTEORDER and an optional NAME for Attribute ID. This directive may be used multiple times. Please see \fBsmartctl -v\fP command-line option for further details. @@ -1399,4 +1399,4 @@ SEE ALSO: .SH SVN ID OF THIS PAGE: -$Id: smartd.conf.5.in 2977 2009-10-30 22:29:05Z chrfranke $ +$Id: smartd.conf.5.in 3001 2009-12-19 15:25:27Z chrfranke $ diff --git a/smartd.cpp b/smartd.cpp index 43164a6..a2a053b 100644 --- a/smartd.cpp +++ b/smartd.cpp @@ -1,10 +1,10 @@ /* * Home page of code is: http://smartmontools.sourceforge.net * - * Copyright (C) 2002-9 Bruce Allen - * Copyright (C) 2000 Michael Cornwell - * Copyright (C) 2008 Oliver Bock - * Copyright (C) 2008-9 Christian Franke + * Copyright (C) 2002-10 Bruce Allen + * Copyright (C) 2000 Michael Cornwell + * Copyright (C) 2008 Oliver Bock + * Copyright (C) 2008-10 Christian Franke * * 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 @@ -77,6 +77,10 @@ extern "C" int __stdcall FreeConsole(void); #include // setmode() #endif // __CYGWIN__ +#ifdef HAVE_LIBCAP_NG +#include +#endif // LIBCAP_NG + // locally included files #include "int64.h" #include "atacmds.h" @@ -122,7 +126,7 @@ extern "C" int getdomainname(char *, int); // no declaration in header files! #define ARGUSED(x) ((void)(x)) -const char * smartd_cpp_cvsid = "$Id: smartd.cpp 2984 2009-11-14 22:46:31Z chrfranke $" +const char * smartd_cpp_cvsid = "$Id: smartd.cpp 3058 2010-02-03 21:04:24Z chrfranke $" CONFIG_H_CVSID EXTERN_H_CVSID; extern const char *reportbug; @@ -190,6 +194,11 @@ static int facility=LOG_DAEMON; static bool do_fork=true; #endif +#ifdef HAVE_LIBCAP_NG +// command-line: enable capabilities? +static bool enable_capabilities = false; +#endif + // used for control of printing, passing arguments to atacmds.c smartmonctrl *con=NULL; @@ -918,6 +927,14 @@ static void MailWarning(const dev_config & cfg, dev_state & state, int which, co return; } +#ifdef HAVE_LIBCAP_NG + if (enable_capabilities) { + PrintOut(LOG_ERR, "Sending a mail was supressed. " + "Mails can't be send when capabilites are enabled\n"); + return; + } +#endif + // record the time of this mail message, and the first mail message if (!mail->logged) mail->firstsent=epoch; @@ -1464,6 +1481,11 @@ void Usage (void){ PrintOut(LOG_INFO,"\n"); PrintOut(LOG_INFO," -c NAME|-, --configfile=NAME|-\n"); PrintOut(LOG_INFO," Read configuration file NAME or stdin [default is %s]\n\n", configfile); +#ifdef HAVE_LIBCAP_NG + PrintOut(LOG_INFO," -C, --capabilities\n"); + PrintOut(LOG_INFO," Use capabilities (EXPERIMENTAL).\n" + " Warning: Mail notification does not work when used.\n\n"); +#endif PrintOut(LOG_INFO," -d, --debug\n"); PrintOut(LOG_INFO," Start smartd in debug mode\n\n"); PrintOut(LOG_INFO," -D, --showdirectives\n"); @@ -1698,23 +1720,29 @@ static int ATADeviceScan(dev_config & cfg, dev_state & state, ata_device * atade // information was ALSO reproduced in the IDENTIFY DEVICE response, // but sadly not for ATA-5. Sigh. - // do we need to retain SMART data after returning from this routine? - bool retainsmartdata = (cfg.usagefailed || cfg.prefail || cfg.usage || cfg.tempdiff || cfg.tempinfo || cfg.tempcrit); - // do we need to get SMART data? bool smart_val_ok = false; - if ( retainsmartdata || cfg.autoofflinetest || cfg.selftest || cfg.errorlog - || cfg.curr_pending_id || cfg.offl_pending_id ) { + if ( cfg.autoofflinetest || cfg.errorlog || cfg.selftest + || cfg.usagefailed || cfg.prefail || cfg.usage + || cfg.tempdiff || cfg.tempinfo || cfg.tempcrit + || cfg.curr_pending_id || cfg.offl_pending_id ) { - if (ataReadSmartValues(atadev, &state.smartval) || - ataReadSmartThresholds (atadev, &state.smartthres)) { - PrintOut(LOG_INFO,"Device: %s, Read SMART Values and/or Thresholds Failed\n",name); - retainsmartdata = cfg.usagefailed = cfg.prefail = cfg.usage = false; + if (ataReadSmartValues(atadev, &state.smartval)) { + PrintOut(LOG_INFO, "Device: %s, Read SMART Values failed\n", name); + cfg.usagefailed = cfg.prefail = cfg.usage = false; cfg.tempdiff = cfg.tempinfo = cfg.tempcrit = 0; cfg.curr_pending_id = cfg.offl_pending_id = 0; } - else + else { smart_val_ok = true; + if (ataReadSmartThresholds(atadev, &state.smartthres)) { + PrintOut(LOG_INFO, "Device: %s, Read SMART Thresholds failed%s\n", + name, (cfg.usagefailed ? ", ignoring -f Directive" : "")); + cfg.usagefailed = false; + // Let ata_get_attr_state() return ATTRSTATE_NO_THRESHOLD: + memset(&state.smartthres, 0, sizeof(state.smartthres)); + } + } // see if the necessary Attribute is there to monitor offline or // current pending sectors or temperature @@ -3701,7 +3729,11 @@ void ParseOpts(int argc, char **argv){ char *tailptr; long lchecktime; // Please update GetValidArgList() if you edit shortopts - const char *shortopts = "c:l:q:dDni:p:r:s:A:B:Vh?"; + static const char shortopts[] = "c:l:q:dDni:p:r:s:A:B:Vh?" +#ifdef HAVE_LIBCAP_NG + "C" +#endif + ; char *arg; // Please update GetValidArgList() if you edit longopts struct option longopts[] = { @@ -3727,6 +3759,9 @@ void ParseOpts(int argc, char **argv){ { "copyright", no_argument, 0, 'V' }, { "help", no_argument, 0, 'h' }, { "usage", no_argument, 0, 'h' }, +#ifdef HAVE_LIBCAP_NG + { "capabilities", no_argument, 0, 'C' }, +#endif { 0, 0, 0, 0 } }; @@ -3885,6 +3920,12 @@ void ParseOpts(int argc, char **argv){ PrintOut(LOG_INFO, "%s", format_version_info("smartd", true /*full*/).c_str()); EXIT(0); break; +#ifdef HAVE_LIBCAP_NG + case 'C': + // enable capabilities + enable_capabilities = true; + break; +#endif case 'h': // help: print summary of command-line options debugmode=1; @@ -4224,6 +4265,16 @@ int main_worker(int argc, char **argv) bool write_states_always = true; +#ifdef HAVE_LIBCAP_NG + // Drop capabilities + if (enable_capabilities) { + capng_clear(CAPNG_SELECT_BOTH); + capng_updatev(CAPNG_ADD, (capng_type_t)(CAPNG_EFFECTIVE|CAPNG_PERMITTED), + CAP_SYS_ADMIN, CAP_MKNOD, CAP_SYS_RAWIO, -1); + capng_apply(CAPNG_SELECT_BOTH); + } +#endif + // the main loop of the code for (;;) { @@ -4293,8 +4344,7 @@ int main_worker(int argc, char **argv) } else { // exit with configuration file error status - int status = (entries==-3 ? EXIT_READCONF : entries==-2 ? EXIT_NOCONF : EXIT_BADCONF); - EXIT(status); + return (entries==-3 ? EXIT_READCONF : entries==-2 ? EXIT_NOCONF : EXIT_BADCONF); } } @@ -4310,15 +4360,26 @@ int main_worker(int argc, char **argv) } else { PrintOut(LOG_INFO,"Unable to monitor any SMART enabled devices. Try debug (-d) option. Exiting...\n"); - EXIT(EXIT_NODEV); + return EXIT_NODEV; } if (quit==4) { // user has asked to print test schedule PrintTestSchedule(configs, states, devices); - EXIT(0); + return 0; } - + +#ifdef HAVE_LIBCAP_NG + if (enable_capabilities) { + for (unsigned i = 0; i < configs.size(); i++) { + if (!configs[i].emailaddress.empty() || !configs[i].emailcmdline.empty()) { + PrintOut(LOG_WARNING, "Mail can't be enabled together with --capabilities. All mail will be suppressed.\n"); + break; + } + } + } +#endif + // reset signal caughtsigHUP=0; @@ -4343,7 +4404,7 @@ int main_worker(int argc, char **argv) if (quit==3) { PrintOut(LOG_INFO,"Started with '-q onecheck' option. All devices sucessfully checked once.\n" "smartd is exiting (exit status 0)\n"); - EXIT(0); + return 0; } // fork into background if needed diff --git a/smartd.initd.in b/smartd.initd.in index 2cd36ad..3050f19 100755 --- a/smartd.initd.in +++ b/smartd.initd.in @@ -2,7 +2,7 @@ # smartmontools init file for smartd # Copyright (C) 2002-8 Bruce Allen -# $Id: smartd.initd.in,v 1.38 2008/03/04 22:09:47 ballen4705 Exp $ +# $Id: smartd.initd.in 3003 2009-12-19 18:47:47Z chrfranke $ # For RedHat and cousins: # chkconfig: 2345 40 40 @@ -439,15 +439,30 @@ http://smartmontools.sourceforge.net/" install) shift [ $# -eq 0 ] || smartd_opts="$*" - dep= + dep=; dep2= if cygrunsrv -L 2>/dev/null | grep "^syslogd$" >/dev/null 2>&1; then - dep="-y syslogd" - else - echo "Warning: syslogd service not installed, smartd will write to windows event log."; + dep="syslogd" fi - echo "Installing service ${smartd_svcname}${smartd_opts+ with options '$smartd_opts'}:" - cygrunsrv -I "$smartd_svcname" -d "$smartd_svcdisp" -f "$smartd_svcdesc" $dep \ - -e CYGWIN="$CYGWIN" -p $SMARTD_BIN -a "-n -p ${PID_FILE}${smartd_opts+ }$smartd_opts" + if cygrunsrv -L 2>/dev/null | grep "^syslog-ng" >/dev/null 2>&1; then + dep2="syslog-ng" + fi + if [ -z "$dep" ]; then + if [ -z "$dep2" ]; then + echo "Warning: no syslog service installed, smartd will write to windows event log."; + else + dep="$dep2" + fi + else + if [ -z "$dep2" ]; then + : + else + dep= + echo "Warning: both syslogd and syslog-ng installed, dependency not set." + fi + fi + echo "Installing service ${smartd_svcname}${dep:+ (depending on '$dep')}${smartd_opts:+ with options '$smartd_opts'}:" + cygrunsrv -I "$smartd_svcname" -d "$smartd_svcdisp" -f "$smartd_svcdesc" ${dep:+-y} $dep \ + -e CYGWIN="$CYGWIN" -p $SMARTD_BIN -a "-n -p ${PID_FILE}${smartd_opts:+ }$smartd_opts" RETVAL=$? ;; remove) diff --git a/utility.cpp b/utility.cpp index 36163c7..5f6bf10 100644 --- a/utility.cpp +++ b/utility.cpp @@ -50,7 +50,7 @@ #include "atacmds.h" #include "dev_interface.h" -const char * utility_cpp_cvsid = "$Id: utility.cpp 3046 2010-01-22 21:30:02Z chrfranke $" +const char * utility_cpp_cvsid = "$Id: utility.cpp 3022 2010-01-01 17:02:00Z chrfranke $" UTILITY_H_CVSID INT64_H_CVSID; const char * packet_types[] = { @@ -778,3 +778,4 @@ int safe_snprintf(char *buf, int size, const char *fmt, ...) } #endif + diff --git a/utility.h b/utility.h index 3533948..cb39b95 100644 --- a/utility.h +++ b/utility.h @@ -26,7 +26,7 @@ #ifndef UTILITY_H_ #define UTILITY_H_ -#define UTILITY_H_CVSID "$Id: utility.h 2848 2009-07-18 20:14:38Z chrfranke $" +#define UTILITY_H_CVSID "$Id: utility.h 3020 2009-12-31 01:11:51Z dlukes $" #include #include // for regex.h (according to POSIX) @@ -335,3 +335,4 @@ private: #endif #endif +